ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.4

This commit is contained in:
speakeasybot
2025-03-09 00:26:13 +00:00
parent 26e1ac258e
commit 8194abfa99
114 changed files with 8170 additions and 11121 deletions

View File

@@ -27,8 +27,6 @@ import dev.plexapi.sdk.models.errors.GetMediaMetaDataBadRequest;
import dev.plexapi.sdk.models.errors.GetMediaMetaDataUnauthorized;
import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest;
import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized;
import dev.plexapi.sdk.models.errors.GetOnDeckBadRequest;
import dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized;
import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest;
@@ -85,9 +83,6 @@ import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest;
import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequestBuilder;
import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse;
import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponseBody;
import dev.plexapi.sdk.models.operations.GetOnDeckRequestBuilder;
import dev.plexapi.sdk.models.operations.GetOnDeckResponse;
import dev.plexapi.sdk.models.operations.GetOnDeckResponseBody;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequestBuilder;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponse;
@@ -147,8 +142,7 @@ public class Library implements
MethodCallGetSearchAllLibraries,
MethodCallGetMediaMetaData,
MethodCallGetMetadataChildren,
MethodCallGetTopWatchedContent,
MethodCallGetOnDeck {
MethodCallGetTopWatchedContent {
private final SDKConfiguration sdkConfiguration;
@@ -3160,161 +3154,4 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
/**
* Get On Deck
* This endpoint will return the on deck content.
*
* @return The call builder
*/
public GetOnDeckRequestBuilder getOnDeck() {
return new GetOnDeckRequestBuilder(this);
}
/**
* Get On Deck
* This endpoint will return the on deck content.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetOnDeckResponse getOnDeckDirect() throws Exception {
String _baseUrl = Utils.templateUrl(
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
String _url = Utils.generateURL(
_baseUrl,
"/library/onDeck");
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
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(
"getOnDeck",
Optional.of(List.of()),
_hookSecuritySource),
_req.build());
HttpResponse<InputStream> _httpRes;
try {
_httpRes = _client.send(_r);
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "4XX", "5XX")) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"getOnDeck",
Optional.of(List.of()),
_hookSecuritySource),
Optional.of(_httpRes),
Optional.empty());
} else {
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
"getOnDeck",
Optional.of(List.of()),
_hookSecuritySource),
_httpRes);
}
} catch (Exception _e) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"getOnDeck",
Optional.of(List.of()),
_hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
String _contentType = _httpRes
.headers()
.firstValue("Content-Type")
.orElse("application/octet-stream");
GetOnDeckResponse.Builder _resBuilder =
GetOnDeckResponse
.builder()
.contentType(_contentType)
.statusCode(_httpRes.statusCode())
.rawResponse(_httpRes);
GetOnDeckResponse _res = _resBuilder.build();
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetOnDeckResponseBody _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetOnDeckResponseBody>() {});
_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")) {
GetOnDeckBadRequest _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetOnDeckBadRequest>() {});
_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")) {
GetOnDeckUnauthorized _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetOnDeckUnauthorized>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// 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));
}
}

View File

@@ -43,8 +43,8 @@ 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.13.0";
public static final String GEN_VERSION = "2.545.2";
public static final String SDK_VERSION = "0.13.1";
public static final String GEN_VERSION = "2.545.4";
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",

View File

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

View File

@@ -1,192 +0,0 @@
/*
* 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 GetOnDeckErrors {
@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 GetOnDeckErrors(
@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 GetOnDeckErrors() {
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 GetOnDeckErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetOnDeckErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetOnDeckErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetOnDeckErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetOnDeckErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetOnDeckErrors 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;
}
GetOnDeckErrors other = (GetOnDeckErrors) 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(GetOnDeckErrors.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 GetOnDeckErrors build() {
return new GetOnDeckErrors(
code,
message,
status);
}
}
}

View File

@@ -1,192 +0,0 @@
/*
* 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 GetOnDeckLibraryErrors {
@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 GetOnDeckLibraryErrors(
@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 GetOnDeckLibraryErrors() {
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 GetOnDeckLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetOnDeckLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetOnDeckLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetOnDeckLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetOnDeckLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetOnDeckLibraryErrors 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;
}
GetOnDeckLibraryErrors other = (GetOnDeckLibraryErrors) 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(GetOnDeckLibraryErrors.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 GetOnDeckLibraryErrors build() {
return new GetOnDeckLibraryErrors(
code,
message,
status);
}
}
}

View File

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

View File

@@ -6,34 +6,32 @@
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 Collection {
@JsonInclude(Include.NON_ABSENT)
/**
* The user-made collection this media item belongs to
*/
@JsonProperty("tag")
private Optional<String> tag;
private String tag;
@JsonCreator
public Collection(
@JsonProperty("tag") Optional<String> tag) {
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
public Collection() {
this(Optional.empty());
}
/**
* The user-made collection this media item belongs to
*/
@JsonIgnore
public Optional<String> tag() {
public String tag() {
return tag;
}
@@ -41,13 +39,10 @@ public class Collection {
return new Builder();
}
/**
* The user-made collection this media item belongs to
*/
public Collection withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
return this;
}
public Collection withTag(Optional<String> tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
@@ -80,19 +75,16 @@ public class Collection {
public final static class Builder {
private Optional<String> tag = Optional.empty();
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 = Optional.ofNullable(tag);
return this;
}
public Builder tag(Optional<String> tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;

View File

@@ -10,48 +10,97 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* Country - The filter query string for country media items.
*/
public class Country {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private long id;
/**
* The country of origin of this media item
*/
@JsonProperty("tag")
private Optional<String> tag;
private String tag;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("filter")
private Optional<String> filter;
@JsonCreator
public Country(
@JsonProperty("tag") Optional<String> tag) {
@JsonProperty("id") long id,
@JsonProperty("tag") String tag,
@JsonProperty("filter") Optional<String> filter) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(tag, "tag");
Utils.checkNotNull(filter, "filter");
this.id = id;
this.tag = tag;
this.filter = filter;
}
public Country() {
this(Optional.empty());
public Country(
long id,
String tag) {
this(id, tag, Optional.empty());
}
@JsonIgnore
public Optional<String> tag() {
public long id() {
return id;
}
/**
* The country of origin of this media item
*/
@JsonIgnore
public String tag() {
return tag;
}
@JsonIgnore
public Optional<String> filter() {
return filter;
}
public final static Builder builder() {
return new Builder();
}
public Country withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
public Country withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Country withTag(Optional<String> tag) {
/**
* The country of origin of this media item
*/
public Country withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public Country withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.ofNullable(filter);
return this;
}
public Country withFilter(Optional<String> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -63,44 +112,71 @@ public class Country {
}
Country other = (Country) o;
return
Objects.deepEquals(this.tag, other.tag);
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.tag, other.tag) &&
Objects.deepEquals(this.filter, other.filter);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
id,
tag,
filter);
}
@Override
public String toString() {
return Utils.toString(Country.class,
"tag", tag);
"id", id,
"tag", tag,
"filter", filter);
}
public final static class Builder {
private Optional<String> tag = Optional.empty();
private Long id;
private String tag;
private Optional<String> filter = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Builder tag(Optional<String> tag) {
/**
* The country of origin of this media item
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.ofNullable(filter);
return this;
}
public Builder filter(Optional<String> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
public Country build() {
return new Country(
tag);
id,
tag,
filter);
}
}
}

View File

@@ -6,34 +6,32 @@
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 Director {
@JsonInclude(Include.NON_ABSENT)
/**
* The role of Director
*/
@JsonProperty("tag")
private Optional<String> tag;
private String tag;
@JsonCreator
public Director(
@JsonProperty("tag") Optional<String> tag) {
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
public Director() {
this(Optional.empty());
}
/**
* The role of Director
*/
@JsonIgnore
public Optional<String> tag() {
public String tag() {
return tag;
}
@@ -41,13 +39,10 @@ public class Director {
return new Builder();
}
/**
* The role of Director
*/
public Director withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
return this;
}
public Director withTag(Optional<String> tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
@@ -80,19 +75,16 @@ public class Director {
public final static class Builder {
private Optional<String> tag = Optional.empty();
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 = Optional.ofNullable(tag);
return this;
}
public Builder tag(Optional<String> tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;

View File

@@ -6,34 +6,60 @@
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* Genre - The filter query string for similar items.
*/
public class Genre {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private long id;
@JsonProperty("filter")
private String filter;
/**
* The genre name of this media-item
*
*/
@JsonProperty("tag")
private Optional<String> tag;
private String tag;
@JsonCreator
public Genre(
@JsonProperty("tag") Optional<String> tag) {
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(tag, "tag");
this.id = id;
this.filter = filter;
this.tag = tag;
}
public Genre() {
this(Optional.empty());
}
@JsonIgnore
public Optional<String> tag() {
public long id() {
return id;
}
@JsonIgnore
public String filter() {
return filter;
}
/**
* The genre name of this media-item
*
*/
@JsonIgnore
public String tag() {
return tag;
}
@@ -41,13 +67,23 @@ public class Genre {
return new Builder();
}
public Genre withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
public Genre withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Genre withTag(Optional<String> tag) {
public Genre withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The genre name of this media-item
*
*/
public Genre withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
@@ -63,36 +99,56 @@ public class Genre {
}
Genre other = (Genre) o;
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
id,
filter,
tag);
}
@Override
public String toString() {
return Utils.toString(Genre.class,
"id", id,
"filter", filter,
"tag", tag);
}
public final static class Builder {
private Optional<String> tag = Optional.empty();
private Long id;
private String filter;
private String tag;
private Builder() {
// force use of static builder() method
}
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Builder tag(Optional<String> tag) {
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The genre name of this media-item
*
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
@@ -100,6 +156,8 @@ public class Genre {
public Genre build() {
return new Genre(
id,
filter,
tag);
}
}

View File

@@ -15,7 +15,8 @@ import java.util.Objects;
public class GetAllMediaLibraryGenre {
/**
* The country of origin of this media item
* The genre name of this media-item
*
*/
@JsonProperty("tag")
private String tag;
@@ -28,7 +29,8 @@ public class GetAllMediaLibraryGenre {
}
/**
* The country of origin of this media item
* The genre name of this media-item
*
*/
@JsonIgnore
public String tag() {
@@ -40,7 +42,8 @@ public class GetAllMediaLibraryGenre {
}
/**
* The country of origin of this media item
* The genre name of this media-item
*
*/
public GetAllMediaLibraryGenre withTag(String tag) {
Utils.checkNotNull(tag, "tag");
@@ -82,7 +85,8 @@ public class GetAllMediaLibraryGenre {
}
/**
* The country of origin of this media item
* The genre name of this media-item
*
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");

View File

@@ -15,23 +15,31 @@ import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetOnDeckGuids {
public class GetAllMediaLibraryGuids {
/**
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private Optional<String> id;
@JsonCreator
public GetOnDeckGuids(
public GetAllMediaLibraryGuids(
@JsonProperty("id") Optional<String> id) {
Utils.checkNotNull(id, "id");
this.id = id;
}
public GetOnDeckGuids() {
public GetAllMediaLibraryGuids() {
this(Optional.empty());
}
/**
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
@JsonIgnore
public Optional<String> id() {
return id;
@@ -41,13 +49,21 @@ public class GetOnDeckGuids {
return new Builder();
}
public GetOnDeckGuids withId(String id) {
/**
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
public GetAllMediaLibraryGuids withId(String id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public GetOnDeckGuids withId(Optional<String> id) {
/**
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
public GetAllMediaLibraryGuids withId(Optional<String> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
@@ -61,7 +77,7 @@ public class GetOnDeckGuids {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetOnDeckGuids other = (GetOnDeckGuids) o;
GetAllMediaLibraryGuids other = (GetAllMediaLibraryGuids) o;
return
Objects.deepEquals(this.id, other.id);
}
@@ -74,7 +90,7 @@ public class GetOnDeckGuids {
@Override
public String toString() {
return Utils.toString(GetOnDeckGuids.class,
return Utils.toString(GetAllMediaLibraryGuids.class,
"id", id);
}
@@ -86,20 +102,28 @@ public class GetOnDeckGuids {
// force use of static builder() method
}
/**
* 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;
}
public GetOnDeckGuids build() {
return new GetOnDeckGuids(
public GetAllMediaLibraryGuids build() {
return new GetAllMediaLibraryGuids(
id);
}
}

View File

@@ -121,8 +121,9 @@ public class GetAllMediaLibraryMedia {
/**
* Indicates whether voice activity is detected.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hasVoiceActivity")
private boolean hasVoiceActivity;
private Optional<Boolean> hasVoiceActivity;
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
@@ -145,8 +146,9 @@ public class GetAllMediaLibraryMedia {
/**
* An array of parts for this media item.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Part")
private List<GetAllMediaLibraryPart> part;
private Optional<? extends List<GetAllMediaLibraryPart>> part;
@JsonCreator
public GetAllMediaLibraryMedia(
@@ -164,11 +166,11 @@ public class GetAllMediaLibraryMedia {
@JsonProperty("container") Optional<String> container,
@JsonProperty("videoFrameRate") Optional<String> videoFrameRate,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("hasVoiceActivity") boolean hasVoiceActivity,
@JsonProperty("hasVoiceActivity") Optional<Boolean> hasVoiceActivity,
@JsonProperty("audioProfile") Optional<String> audioProfile,
@JsonProperty("optimizedForStreaming") Optional<? extends GetAllMediaLibraryOptimizedForStreaming> optimizedForStreaming,
@JsonProperty("has64bitOffsets") Optional<Boolean> has64bitOffsets,
@JsonProperty("Part") List<GetAllMediaLibraryPart> part) {
@JsonProperty("Part") Optional<? extends List<GetAllMediaLibraryPart>> part) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(duration, "duration");
Utils.checkNotNull(bitrate, "bitrate");
@@ -210,10 +212,8 @@ public class GetAllMediaLibraryMedia {
}
public GetAllMediaLibraryMedia(
long id,
boolean hasVoiceActivity,
List<GetAllMediaLibraryPart> part) {
this(id, 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(), hasVoiceActivity, Optional.empty(), Optional.empty(), Optional.empty(), part);
long id) {
this(id, 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());
}
/**
@@ -330,7 +330,7 @@ public class GetAllMediaLibraryMedia {
* Indicates whether voice activity is detected.
*/
@JsonIgnore
public boolean hasVoiceActivity() {
public Optional<Boolean> hasVoiceActivity() {
return hasVoiceActivity;
}
@@ -359,9 +359,10 @@ public class GetAllMediaLibraryMedia {
/**
* An array of parts for this media item.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public List<GetAllMediaLibraryPart> part() {
return part;
public Optional<List<GetAllMediaLibraryPart>> part() {
return (Optional<List<GetAllMediaLibraryPart>>) part;
}
public final static Builder builder() {
@@ -611,6 +612,15 @@ public class GetAllMediaLibraryMedia {
* Indicates whether voice activity is detected.
*/
public GetAllMediaLibraryMedia withHasVoiceActivity(boolean hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity);
return this;
}
/**
* Indicates whether voice activity is detected.
*/
public GetAllMediaLibraryMedia withHasVoiceActivity(Optional<Boolean> hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = hasVoiceActivity;
return this;
@@ -668,6 +678,15 @@ public class GetAllMediaLibraryMedia {
* An array of parts for this media item.
*/
public GetAllMediaLibraryMedia withPart(List<GetAllMediaLibraryPart> part) {
Utils.checkNotNull(part, "part");
this.part = Optional.ofNullable(part);
return this;
}
/**
* An array of parts for this media item.
*/
public GetAllMediaLibraryMedia withPart(Optional<? extends List<GetAllMediaLibraryPart>> part) {
Utils.checkNotNull(part, "part");
this.part = part;
return this;
@@ -782,7 +801,7 @@ public class GetAllMediaLibraryMedia {
private Optional<String> videoProfile = Optional.empty();
private Boolean hasVoiceActivity;
private Optional<Boolean> hasVoiceActivity = Optional.empty();
private Optional<String> audioProfile = Optional.empty();
@@ -790,7 +809,7 @@ public class GetAllMediaLibraryMedia {
private Optional<Boolean> has64bitOffsets = Optional.empty();
private List<GetAllMediaLibraryPart> part;
private Optional<? extends List<GetAllMediaLibraryPart>> part = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -1039,6 +1058,15 @@ public class GetAllMediaLibraryMedia {
* Indicates whether voice activity is detected.
*/
public Builder hasVoiceActivity(boolean hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity);
return this;
}
/**
* Indicates whether voice activity is detected.
*/
public Builder hasVoiceActivity(Optional<Boolean> hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = hasVoiceActivity;
return this;
@@ -1096,6 +1124,15 @@ public class GetAllMediaLibraryMedia {
* An array of parts for this media item.
*/
public Builder part(List<GetAllMediaLibraryPart> part) {
Utils.checkNotNull(part, "part");
this.part = Optional.ofNullable(part);
return this;
}
/**
* An array of parts for this media item.
*/
public Builder part(Optional<? extends List<GetAllMediaLibraryPart>> part) {
Utils.checkNotNull(part, "part");
this.part = part;
return this;

View File

@@ -102,8 +102,9 @@ public class GetAllMediaLibraryMetadata {
/**
* The release year of the media item.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("year")
private int year;
private Optional<Integer> year;
/**
* A brief tagline for the media item.
@@ -413,7 +414,7 @@ public class GetAllMediaLibraryMetadata {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Guid")
private Optional<? extends List<Guids>> guids;
private Optional<? extends List<GetAllMediaLibraryGuids>> guids;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Collection")
@@ -433,7 +434,7 @@ public class GetAllMediaLibraryMetadata {
@JsonProperty("summary") String summary,
@JsonProperty("rating") float rating,
@JsonProperty("audienceRating") double audienceRating,
@JsonProperty("year") int year,
@JsonProperty("year") Optional<Integer> year,
@JsonProperty("tagline") String tagline,
@JsonProperty("thumb") String thumb,
@JsonProperty("art") String art,
@@ -483,7 +484,7 @@ public class GetAllMediaLibraryMetadata {
@JsonProperty("Director") Optional<? extends List<GetAllMediaLibraryDirector>> director,
@JsonProperty("Writer") Optional<? extends List<GetAllMediaLibraryWriter>> writer,
@JsonProperty("Role") Optional<? extends List<GetAllMediaLibraryRole>> role,
@JsonProperty("Guid") Optional<? extends List<Guids>> guids,
@JsonProperty("Guid") Optional<? extends List<GetAllMediaLibraryGuids>> guids,
@JsonProperty("Collection") Optional<? extends List<GetAllMediaLibraryCollection>> collection) {
Utils.checkNotNull(ratingKey, "ratingKey");
Utils.checkNotNull(key, "key");
@@ -626,7 +627,6 @@ public class GetAllMediaLibraryMetadata {
String summary,
float rating,
double audienceRating,
int year,
String tagline,
String thumb,
String art,
@@ -637,7 +637,7 @@ public class GetAllMediaLibraryMetadata {
int duration,
LocalDate originallyAvailableAt,
long addedAt) {
this(ratingKey, key, guid, slug, Optional.empty(), type, title, titleSort, Optional.empty(), summary, rating, audienceRating, year, tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, originallyAvailableAt, addedAt, 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(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
this(ratingKey, key, guid, slug, Optional.empty(), type, title, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, originallyAvailableAt, addedAt, 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(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -737,7 +737,7 @@ public class GetAllMediaLibraryMetadata {
* The release year of the media item.
*/
@JsonIgnore
public int year() {
public Optional<Integer> year() {
return year;
}
@@ -1116,8 +1116,8 @@ public class GetAllMediaLibraryMetadata {
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Guids>> guids() {
return (Optional<List<Guids>>) guids;
public Optional<List<GetAllMediaLibraryGuids>> guids() {
return (Optional<List<GetAllMediaLibraryGuids>>) guids;
}
@SuppressWarnings("unchecked")
@@ -1257,6 +1257,15 @@ public class GetAllMediaLibraryMetadata {
* The release year of the media item.
*/
public GetAllMediaLibraryMetadata withYear(int year) {
Utils.checkNotNull(year, "year");
this.year = Optional.ofNullable(year);
return this;
}
/**
* The release year of the media item.
*/
public GetAllMediaLibraryMetadata withYear(Optional<Integer> year) {
Utils.checkNotNull(year, "year");
this.year = year;
return this;
@@ -2003,13 +2012,13 @@ public class GetAllMediaLibraryMetadata {
return this;
}
public GetAllMediaLibraryMetadata withGuids(List<Guids> guids) {
public GetAllMediaLibraryMetadata withGuids(List<GetAllMediaLibraryGuids> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = Optional.ofNullable(guids);
return this;
}
public GetAllMediaLibraryMetadata withGuids(Optional<? extends List<Guids>> guids) {
public GetAllMediaLibraryMetadata withGuids(Optional<? extends List<GetAllMediaLibraryGuids>> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = guids;
return this;
@@ -2267,7 +2276,7 @@ public class GetAllMediaLibraryMetadata {
private Double audienceRating;
private Integer year;
private Optional<Integer> year = Optional.empty();
private String tagline;
@@ -2367,7 +2376,7 @@ public class GetAllMediaLibraryMetadata {
private Optional<? extends List<GetAllMediaLibraryRole>> role = Optional.empty();
private Optional<? extends List<Guids>> guids = Optional.empty();
private Optional<? extends List<GetAllMediaLibraryGuids>> guids = Optional.empty();
private Optional<? extends List<GetAllMediaLibraryCollection>> collection = Optional.empty();
@@ -2502,6 +2511,15 @@ public class GetAllMediaLibraryMetadata {
* The release year of the media item.
*/
public Builder year(int year) {
Utils.checkNotNull(year, "year");
this.year = Optional.ofNullable(year);
return this;
}
/**
* The release year of the media item.
*/
public Builder year(Optional<Integer> year) {
Utils.checkNotNull(year, "year");
this.year = year;
return this;
@@ -3248,13 +3266,13 @@ public class GetAllMediaLibraryMetadata {
return this;
}
public Builder guids(List<Guids> guids) {
public Builder guids(List<GetAllMediaLibraryGuids> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = Optional.ofNullable(guids);
return this;
}
public Builder guids(Optional<? extends List<Guids>> guids) {
public Builder guids(Optional<? extends List<GetAllMediaLibraryGuids>> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = guids;
return this;

View File

@@ -31,9 +31,9 @@ public class GetAllMediaLibraryOptimizedForStreaming {
this.value = value;
}
public static GetAllMediaLibraryOptimizedForStreaming of(One value) {
public static GetAllMediaLibraryOptimizedForStreaming of(OptimizedForStreaming1 value) {
Utils.checkNotNull(value, "value");
return new GetAllMediaLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<One>(){}));
return new GetAllMediaLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<OptimizedForStreaming1>(){}));
}
public static GetAllMediaLibraryOptimizedForStreaming of(boolean value) {
@@ -44,7 +44,7 @@ public class GetAllMediaLibraryOptimizedForStreaming {
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.One}</li>
* <li>{@code dev.plexapi.sdk.models.operations.OptimizedForStreaming1}</li>
* <li>{@code boolean}</li>
* </ul>
*
@@ -86,7 +86,7 @@ public class GetAllMediaLibraryOptimizedForStreaming {
public _Deserializer() {
super(GetAllMediaLibraryOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<One>() {}, JsonShape.DEFAULT));
TypeReferenceWithShape.of(new TypeReference<OptimizedForStreaming1>() {}, JsonShape.DEFAULT));
}
}

View File

@@ -15,7 +15,7 @@ import java.util.Objects;
public class GetAllMediaLibraryRole {
/**
* The name of the actor for this role
* The display tag for the actor (typically the actor's name).
*/
@JsonProperty("tag")
private String tag;
@@ -28,7 +28,7 @@ public class GetAllMediaLibraryRole {
}
/**
* The name of the actor for this role
* The display tag for the actor (typically the actor's name).
*/
@JsonIgnore
public String tag() {
@@ -40,7 +40,7 @@ public class GetAllMediaLibraryRole {
}
/**
* The name of the actor for this role
* The display tag for the actor (typically the actor's name).
*/
public GetAllMediaLibraryRole withTag(String tag) {
Utils.checkNotNull(tag, "tag");
@@ -82,7 +82,7 @@ public class GetAllMediaLibraryRole {
}
/**
* The name of the actor for this role
* The display tag for the actor (typically the actor's name).
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");

View File

@@ -62,20 +62,23 @@ public class GetAllMediaLibraryStream {
/**
* Language of the stream.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("language")
private String language;
private Optional<String> language;
/**
* Language tag (e.g., en).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("languageTag")
private String languageTag;
private Optional<String> languageTag;
/**
* ISO language code.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("languageCode")
private String languageCode;
private Optional<String> languageCode;
/**
* Indicates whether header compression is enabled.
@@ -175,6 +178,10 @@ public class GetAllMediaLibraryStream {
@JsonProperty("codedWidth")
private Optional<Integer> codedWidth;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("closedCaptions")
private Optional<Boolean> closedCaptions;
/**
* Color primaries used.
*/
@@ -246,6 +253,10 @@ public class GetAllMediaLibraryStream {
@JsonProperty("scanType")
private Optional<String> scanType;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("embeddedInVideo")
private Optional<String> embeddedInVideo;
/**
* Number of reference frames.
*/
@@ -340,9 +351,9 @@ public class GetAllMediaLibraryStream {
@JsonProperty("codec") String codec,
@JsonProperty("index") int index,
@JsonProperty("bitrate") Optional<Integer> bitrate,
@JsonProperty("language") String language,
@JsonProperty("languageTag") String languageTag,
@JsonProperty("languageCode") String languageCode,
@JsonProperty("language") Optional<String> language,
@JsonProperty("languageTag") Optional<String> languageTag,
@JsonProperty("languageCode") Optional<String> languageCode,
@JsonProperty("headerCompression") Optional<Boolean> headerCompression,
@JsonProperty("DOVIBLCompatID") Optional<Integer> doviblCompatID,
@JsonProperty("DOVIBLPresent") Optional<Boolean> doviblPresent,
@@ -357,6 +368,7 @@ public class GetAllMediaLibraryStream {
@JsonProperty("chromaSubsampling") Optional<String> chromaSubsampling,
@JsonProperty("codedHeight") Optional<Integer> codedHeight,
@JsonProperty("codedWidth") Optional<Integer> codedWidth,
@JsonProperty("closedCaptions") Optional<Boolean> closedCaptions,
@JsonProperty("colorPrimaries") Optional<String> colorPrimaries,
@JsonProperty("colorRange") Optional<String> colorRange,
@JsonProperty("colorSpace") Optional<String> colorSpace,
@@ -368,6 +380,7 @@ public class GetAllMediaLibraryStream {
@JsonProperty("hasScalingMatrix") Optional<Boolean> hasScalingMatrix,
@JsonProperty("profile") Optional<String> profile,
@JsonProperty("scanType") Optional<String> scanType,
@JsonProperty("embeddedInVideo") Optional<String> embeddedInVideo,
@JsonProperty("refFrames") Optional<Integer> refFrames,
@JsonProperty("width") Optional<Integer> width,
@JsonProperty("displayTitle") String displayTitle,
@@ -404,6 +417,7 @@ public class GetAllMediaLibraryStream {
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
Utils.checkNotNull(codedHeight, "codedHeight");
Utils.checkNotNull(codedWidth, "codedWidth");
Utils.checkNotNull(closedCaptions, "closedCaptions");
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
Utils.checkNotNull(colorRange, "colorRange");
Utils.checkNotNull(colorSpace, "colorSpace");
@@ -415,6 +429,7 @@ public class GetAllMediaLibraryStream {
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
Utils.checkNotNull(profile, "profile");
Utils.checkNotNull(scanType, "scanType");
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
Utils.checkNotNull(refFrames, "refFrames");
Utils.checkNotNull(width, "width");
Utils.checkNotNull(displayTitle, "displayTitle");
@@ -451,6 +466,7 @@ public class GetAllMediaLibraryStream {
this.chromaSubsampling = chromaSubsampling;
this.codedHeight = codedHeight;
this.codedWidth = codedWidth;
this.closedCaptions = closedCaptions;
this.colorPrimaries = colorPrimaries;
this.colorRange = colorRange;
this.colorSpace = colorSpace;
@@ -462,6 +478,7 @@ public class GetAllMediaLibraryStream {
this.hasScalingMatrix = hasScalingMatrix;
this.profile = profile;
this.scanType = scanType;
this.embeddedInVideo = embeddedInVideo;
this.refFrames = refFrames;
this.width = width;
this.displayTitle = displayTitle;
@@ -482,12 +499,9 @@ public class GetAllMediaLibraryStream {
int streamType,
String codec,
int index,
String language,
String languageTag,
String languageCode,
String displayTitle,
String extendedDisplayTitle) {
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());
this(id, streamType, Optional.empty(), codec, index, 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(), 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());
}
/**
@@ -542,7 +556,7 @@ public class GetAllMediaLibraryStream {
* Language of the stream.
*/
@JsonIgnore
public String language() {
public Optional<String> language() {
return language;
}
@@ -550,7 +564,7 @@ public class GetAllMediaLibraryStream {
* Language tag (e.g., en).
*/
@JsonIgnore
public String languageTag() {
public Optional<String> languageTag() {
return languageTag;
}
@@ -558,7 +572,7 @@ public class GetAllMediaLibraryStream {
* ISO language code.
*/
@JsonIgnore
public String languageCode() {
public Optional<String> languageCode() {
return languageCode;
}
@@ -674,6 +688,11 @@ public class GetAllMediaLibraryStream {
return codedWidth;
}
@JsonIgnore
public Optional<Boolean> closedCaptions() {
return closedCaptions;
}
/**
* Color primaries used.
*/
@@ -756,6 +775,11 @@ public class GetAllMediaLibraryStream {
return scanType;
}
@JsonIgnore
public Optional<String> embeddedInVideo() {
return embeddedInVideo;
}
/**
* Number of reference frames.
*/
@@ -937,6 +961,15 @@ public class GetAllMediaLibraryStream {
* Language of the stream.
*/
public GetAllMediaLibraryStream withLanguage(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
/**
* Language of the stream.
*/
public GetAllMediaLibraryStream withLanguage(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
@@ -946,6 +979,15 @@ public class GetAllMediaLibraryStream {
* Language tag (e.g., en).
*/
public GetAllMediaLibraryStream withLanguageTag(String languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = Optional.ofNullable(languageTag);
return this;
}
/**
* Language tag (e.g., en).
*/
public GetAllMediaLibraryStream withLanguageTag(Optional<String> languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = languageTag;
return this;
@@ -955,6 +997,15 @@ public class GetAllMediaLibraryStream {
* ISO language code.
*/
public GetAllMediaLibraryStream withLanguageCode(String languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = Optional.ofNullable(languageCode);
return this;
}
/**
* ISO language code.
*/
public GetAllMediaLibraryStream withLanguageCode(Optional<String> languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = languageCode;
return this;
@@ -1212,6 +1263,18 @@ public class GetAllMediaLibraryStream {
return this;
}
public GetAllMediaLibraryStream withClosedCaptions(boolean closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = Optional.ofNullable(closedCaptions);
return this;
}
public GetAllMediaLibraryStream withClosedCaptions(Optional<Boolean> closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = closedCaptions;
return this;
}
/**
* Color primaries used.
*/
@@ -1398,6 +1461,18 @@ public class GetAllMediaLibraryStream {
return this;
}
public GetAllMediaLibraryStream withEmbeddedInVideo(String embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = Optional.ofNullable(embeddedInVideo);
return this;
}
public GetAllMediaLibraryStream withEmbeddedInVideo(Optional<String> embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = embeddedInVideo;
return this;
}
/**
* Number of reference frames.
*/
@@ -1641,6 +1716,7 @@ public class GetAllMediaLibraryStream {
Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) &&
Objects.deepEquals(this.codedHeight, other.codedHeight) &&
Objects.deepEquals(this.codedWidth, other.codedWidth) &&
Objects.deepEquals(this.closedCaptions, other.closedCaptions) &&
Objects.deepEquals(this.colorPrimaries, other.colorPrimaries) &&
Objects.deepEquals(this.colorRange, other.colorRange) &&
Objects.deepEquals(this.colorSpace, other.colorSpace) &&
@@ -1652,6 +1728,7 @@ public class GetAllMediaLibraryStream {
Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) &&
Objects.deepEquals(this.profile, other.profile) &&
Objects.deepEquals(this.scanType, other.scanType) &&
Objects.deepEquals(this.embeddedInVideo, other.embeddedInVideo) &&
Objects.deepEquals(this.refFrames, other.refFrames) &&
Objects.deepEquals(this.width, other.width) &&
Objects.deepEquals(this.displayTitle, other.displayTitle) &&
@@ -1693,6 +1770,7 @@ public class GetAllMediaLibraryStream {
chromaSubsampling,
codedHeight,
codedWidth,
closedCaptions,
colorPrimaries,
colorRange,
colorSpace,
@@ -1704,6 +1782,7 @@ public class GetAllMediaLibraryStream {
hasScalingMatrix,
profile,
scanType,
embeddedInVideo,
refFrames,
width,
displayTitle,
@@ -1745,6 +1824,7 @@ public class GetAllMediaLibraryStream {
"chromaSubsampling", chromaSubsampling,
"codedHeight", codedHeight,
"codedWidth", codedWidth,
"closedCaptions", closedCaptions,
"colorPrimaries", colorPrimaries,
"colorRange", colorRange,
"colorSpace", colorSpace,
@@ -1756,6 +1836,7 @@ public class GetAllMediaLibraryStream {
"hasScalingMatrix", hasScalingMatrix,
"profile", profile,
"scanType", scanType,
"embeddedInVideo", embeddedInVideo,
"refFrames", refFrames,
"width", width,
"displayTitle", displayTitle,
@@ -1785,11 +1866,11 @@ public class GetAllMediaLibraryStream {
private Optional<Integer> bitrate = Optional.empty();
private String language;
private Optional<String> language = Optional.empty();
private String languageTag;
private Optional<String> languageTag = Optional.empty();
private String languageCode;
private Optional<String> languageCode = Optional.empty();
private Optional<Boolean> headerCompression = Optional.empty();
@@ -1819,6 +1900,8 @@ public class GetAllMediaLibraryStream {
private Optional<Integer> codedWidth = Optional.empty();
private Optional<Boolean> closedCaptions = Optional.empty();
private Optional<String> colorPrimaries = Optional.empty();
private Optional<String> colorRange = Optional.empty();
@@ -1841,6 +1924,8 @@ public class GetAllMediaLibraryStream {
private Optional<String> scanType = Optional.empty();
private Optional<String> embeddedInVideo = Optional.empty();
private Optional<Integer> refFrames = Optional.empty();
private Optional<Integer> width = Optional.empty();
@@ -1947,6 +2032,15 @@ public class GetAllMediaLibraryStream {
* Language of the stream.
*/
public Builder language(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
/**
* Language of the stream.
*/
public Builder language(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
@@ -1956,6 +2050,15 @@ public class GetAllMediaLibraryStream {
* Language tag (e.g., en).
*/
public Builder languageTag(String languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = Optional.ofNullable(languageTag);
return this;
}
/**
* Language tag (e.g., en).
*/
public Builder languageTag(Optional<String> languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = languageTag;
return this;
@@ -1965,6 +2068,15 @@ public class GetAllMediaLibraryStream {
* ISO language code.
*/
public Builder languageCode(String languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = Optional.ofNullable(languageCode);
return this;
}
/**
* ISO language code.
*/
public Builder languageCode(Optional<String> languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = languageCode;
return this;
@@ -2222,6 +2334,18 @@ public class GetAllMediaLibraryStream {
return this;
}
public Builder closedCaptions(boolean closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = Optional.ofNullable(closedCaptions);
return this;
}
public Builder closedCaptions(Optional<Boolean> closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = closedCaptions;
return this;
}
/**
* Color primaries used.
*/
@@ -2408,6 +2532,18 @@ public class GetAllMediaLibraryStream {
return this;
}
public Builder embeddedInVideo(String embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = Optional.ofNullable(embeddedInVideo);
return this;
}
public Builder embeddedInVideo(Optional<String> embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = embeddedInVideo;
return this;
}
/**
* Number of reference frames.
*/
@@ -2643,6 +2779,7 @@ public class GetAllMediaLibraryStream {
chromaSubsampling,
codedHeight,
codedWidth,
closedCaptions,
colorPrimaries,
colorRange,
colorSpace,
@@ -2654,6 +2791,7 @@ public class GetAllMediaLibraryStream {
hasScalingMatrix,
profile,
scanType,
embeddedInVideo,
refFrames,
width,
displayTitle,

View File

@@ -1,37 +0,0 @@
/*
* 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;
/**
* GetLibraryItemsEnableCreditsMarkerGeneration - Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
public enum GetLibraryItemsEnableCreditsMarkerGeneration {
LibraryDefault("-1"),
Disabled("0");
@JsonValue
private final String value;
private GetLibraryItemsEnableCreditsMarkerGeneration(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetLibraryItemsEnableCreditsMarkerGeneration> fromValue(String value) {
for (GetLibraryItemsEnableCreditsMarkerGeneration o: GetLibraryItemsEnableCreditsMarkerGeneration.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -1,38 +0,0 @@
/*
* 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;
/**
* GetLibraryItemsEpisodeSort - Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
public enum GetLibraryItemsEpisodeSort {
LibraryDefault("-1"),
OldestFirst("0"),
NewestFirst("1");
@JsonValue
private final String value;
private GetLibraryItemsEpisodeSort(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetLibraryItemsEpisodeSort> fromValue(String value) {
for (GetLibraryItemsEpisodeSort o: GetLibraryItemsEpisodeSort.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -1,38 +0,0 @@
/*
* 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;
/**
* GetLibraryItemsFlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
public enum GetLibraryItemsFlattenSeasons {
LibraryDefault("-1"),
Hide("0"),
Show("1");
@JsonValue
private final String value;
private GetLibraryItemsFlattenSeasons(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetLibraryItemsFlattenSeasons> fromValue(String value) {
for (GetLibraryItemsFlattenSeasons o: GetLibraryItemsFlattenSeasons.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -1,107 +0,0 @@
/*
* 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 GetLibraryItemsMediaGuid {
/**
* Can be one of the following formats:
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
*
*/
@JsonProperty("id")
private String id;
@JsonCreator
public GetLibraryItemsMediaGuid(
@JsonProperty("id") String id) {
Utils.checkNotNull(id, "id");
this.id = id;
}
/**
* Can be one of the following formats:
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
*
*/
@JsonIgnore
public String id() {
return id;
}
public final static Builder builder() {
return new Builder();
}
/**
* Can be one of the following formats:
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
*
*/
public GetLibraryItemsMediaGuid 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;
}
GetLibraryItemsMediaGuid other = (GetLibraryItemsMediaGuid) o;
return
Objects.deepEquals(this.id, other.id);
}
@Override
public int hashCode() {
return Objects.hash(
id);
}
@Override
public String toString() {
return Utils.toString(GetLibraryItemsMediaGuid.class,
"id", id);
}
public final static class Builder {
private String id;
private Builder() {
// force use of static builder() method
}
/**
* Can be one of the following formats:
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
*
*/
public Builder id(String id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public GetLibraryItemsMediaGuid build() {
return new GetLibraryItemsMediaGuid(
id);
}
}
}

View File

@@ -104,21 +104,21 @@ public class GetLibraryItemsMetadata {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("flattenSeasons")
private Optional<? extends GetLibraryItemsFlattenSeasons> flattenSeasons;
private Optional<? extends FlattenSeasons> flattenSeasons;
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("episodeSort")
private Optional<? extends GetLibraryItemsEpisodeSort> episodeSort;
private Optional<? extends EpisodeSort> episodeSort;
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("enableCreditsMarkerGeneration")
private Optional<? extends GetLibraryItemsEnableCreditsMarkerGeneration> enableCreditsMarkerGeneration;
private Optional<? extends EnableCreditsMarkerGeneration> enableCreditsMarkerGeneration;
/**
* Setting that indicates the episode ordering for the show.
@@ -131,7 +131,7 @@ public class GetLibraryItemsMetadata {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("showOrdering")
private Optional<? extends GetLibraryItemsShowOrdering> showOrdering;
private Optional<? extends ShowOrdering> showOrdering;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
@@ -260,7 +260,7 @@ public class GetLibraryItemsMetadata {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Guid")
private Optional<? extends List<GetLibraryItemsMediaGuid>> mediaGuid;
private Optional<? extends List<MediaGuid>> mediaGuid;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("UltraBlurColors")
@@ -268,7 +268,7 @@ public class GetLibraryItemsMetadata {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Rating")
private Optional<? extends List<GetLibraryItemsMetaDataRating>> metaDataRating;
private Optional<? extends List<MetaDataRating>> metaDataRating;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Image")
@@ -386,10 +386,10 @@ public class GetLibraryItemsMetadata {
@JsonProperty("year") Optional<Integer> year,
@JsonProperty("seasonCount") Optional<Integer> seasonCount,
@JsonProperty("tagline") Optional<String> tagline,
@JsonProperty("flattenSeasons") Optional<? extends GetLibraryItemsFlattenSeasons> flattenSeasons,
@JsonProperty("episodeSort") Optional<? extends GetLibraryItemsEpisodeSort> episodeSort,
@JsonProperty("enableCreditsMarkerGeneration") Optional<? extends GetLibraryItemsEnableCreditsMarkerGeneration> enableCreditsMarkerGeneration,
@JsonProperty("showOrdering") Optional<? extends GetLibraryItemsShowOrdering> showOrdering,
@JsonProperty("flattenSeasons") Optional<? extends FlattenSeasons> flattenSeasons,
@JsonProperty("episodeSort") Optional<? extends EpisodeSort> episodeSort,
@JsonProperty("enableCreditsMarkerGeneration") Optional<? extends EnableCreditsMarkerGeneration> enableCreditsMarkerGeneration,
@JsonProperty("showOrdering") Optional<? extends ShowOrdering> showOrdering,
@JsonProperty("thumb") Optional<String> thumb,
@JsonProperty("art") Optional<String> art,
@JsonProperty("banner") Optional<String> banner,
@@ -418,9 +418,9 @@ public class GetLibraryItemsMetadata {
@JsonProperty("Collection") Optional<? extends List<GetLibraryItemsCollection>> collection,
@JsonProperty("Role") Optional<? extends List<GetLibraryItemsRole>> role,
@JsonProperty("Location") Optional<? extends List<GetLibraryItemsLocation>> location,
@JsonProperty("Guid") Optional<? extends List<GetLibraryItemsMediaGuid>> mediaGuid,
@JsonProperty("Guid") Optional<? extends List<MediaGuid>> mediaGuid,
@JsonProperty("UltraBlurColors") Optional<? extends GetLibraryItemsUltraBlurColors> ultraBlurColors,
@JsonProperty("Rating") Optional<? extends List<GetLibraryItemsMetaDataRating>> metaDataRating,
@JsonProperty("Rating") Optional<? extends List<MetaDataRating>> metaDataRating,
@JsonProperty("Image") Optional<? extends List<GetLibraryItemsImage>> image,
@JsonProperty("titleSort") Optional<String> titleSort,
@JsonProperty("viewCount") Optional<Integer> viewCount,
@@ -713,8 +713,8 @@ public class GetLibraryItemsMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetLibraryItemsFlattenSeasons> flattenSeasons() {
return (Optional<GetLibraryItemsFlattenSeasons>) flattenSeasons;
public Optional<FlattenSeasons> flattenSeasons() {
return (Optional<FlattenSeasons>) flattenSeasons;
}
/**
@@ -722,8 +722,8 @@ public class GetLibraryItemsMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetLibraryItemsEpisodeSort> episodeSort() {
return (Optional<GetLibraryItemsEpisodeSort>) episodeSort;
public Optional<EpisodeSort> episodeSort() {
return (Optional<EpisodeSort>) episodeSort;
}
/**
@@ -731,8 +731,8 @@ public class GetLibraryItemsMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetLibraryItemsEnableCreditsMarkerGeneration> enableCreditsMarkerGeneration() {
return (Optional<GetLibraryItemsEnableCreditsMarkerGeneration>) enableCreditsMarkerGeneration;
public Optional<EnableCreditsMarkerGeneration> enableCreditsMarkerGeneration() {
return (Optional<EnableCreditsMarkerGeneration>) enableCreditsMarkerGeneration;
}
/**
@@ -746,8 +746,8 @@ public class GetLibraryItemsMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetLibraryItemsShowOrdering> showOrdering() {
return (Optional<GetLibraryItemsShowOrdering>) showOrdering;
public Optional<ShowOrdering> showOrdering() {
return (Optional<ShowOrdering>) showOrdering;
}
@JsonIgnore
@@ -914,8 +914,8 @@ public class GetLibraryItemsMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetLibraryItemsMediaGuid>> mediaGuid() {
return (Optional<List<GetLibraryItemsMediaGuid>>) mediaGuid;
public Optional<List<MediaGuid>> mediaGuid() {
return (Optional<List<MediaGuid>>) mediaGuid;
}
@SuppressWarnings("unchecked")
@@ -926,8 +926,8 @@ public class GetLibraryItemsMetadata {
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetLibraryItemsMetaDataRating>> metaDataRating() {
return (Optional<List<GetLibraryItemsMetaDataRating>>) metaDataRating;
public Optional<List<MetaDataRating>> metaDataRating() {
return (Optional<List<MetaDataRating>>) metaDataRating;
}
@SuppressWarnings("unchecked")
@@ -1246,7 +1246,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
public GetLibraryItemsMetadata withFlattenSeasons(GetLibraryItemsFlattenSeasons flattenSeasons) {
public GetLibraryItemsMetadata withFlattenSeasons(FlattenSeasons flattenSeasons) {
Utils.checkNotNull(flattenSeasons, "flattenSeasons");
this.flattenSeasons = Optional.ofNullable(flattenSeasons);
return this;
@@ -1255,7 +1255,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
public GetLibraryItemsMetadata withFlattenSeasons(Optional<? extends GetLibraryItemsFlattenSeasons> flattenSeasons) {
public GetLibraryItemsMetadata withFlattenSeasons(Optional<? extends FlattenSeasons> flattenSeasons) {
Utils.checkNotNull(flattenSeasons, "flattenSeasons");
this.flattenSeasons = flattenSeasons;
return this;
@@ -1264,7 +1264,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
public GetLibraryItemsMetadata withEpisodeSort(GetLibraryItemsEpisodeSort episodeSort) {
public GetLibraryItemsMetadata withEpisodeSort(EpisodeSort episodeSort) {
Utils.checkNotNull(episodeSort, "episodeSort");
this.episodeSort = Optional.ofNullable(episodeSort);
return this;
@@ -1273,7 +1273,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
public GetLibraryItemsMetadata withEpisodeSort(Optional<? extends GetLibraryItemsEpisodeSort> episodeSort) {
public GetLibraryItemsMetadata withEpisodeSort(Optional<? extends EpisodeSort> episodeSort) {
Utils.checkNotNull(episodeSort, "episodeSort");
this.episodeSort = episodeSort;
return this;
@@ -1282,7 +1282,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
public GetLibraryItemsMetadata withEnableCreditsMarkerGeneration(GetLibraryItemsEnableCreditsMarkerGeneration enableCreditsMarkerGeneration) {
public GetLibraryItemsMetadata withEnableCreditsMarkerGeneration(EnableCreditsMarkerGeneration enableCreditsMarkerGeneration) {
Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration");
this.enableCreditsMarkerGeneration = Optional.ofNullable(enableCreditsMarkerGeneration);
return this;
@@ -1291,7 +1291,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
public GetLibraryItemsMetadata withEnableCreditsMarkerGeneration(Optional<? extends GetLibraryItemsEnableCreditsMarkerGeneration> enableCreditsMarkerGeneration) {
public GetLibraryItemsMetadata withEnableCreditsMarkerGeneration(Optional<? extends EnableCreditsMarkerGeneration> enableCreditsMarkerGeneration) {
Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration");
this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration;
return this;
@@ -1306,7 +1306,7 @@ public class GetLibraryItemsMetadata {
* absolute = TheTVDB (Absolute)).
*
*/
public GetLibraryItemsMetadata withShowOrdering(GetLibraryItemsShowOrdering showOrdering) {
public GetLibraryItemsMetadata withShowOrdering(ShowOrdering showOrdering) {
Utils.checkNotNull(showOrdering, "showOrdering");
this.showOrdering = Optional.ofNullable(showOrdering);
return this;
@@ -1321,7 +1321,7 @@ public class GetLibraryItemsMetadata {
* absolute = TheTVDB (Absolute)).
*
*/
public GetLibraryItemsMetadata withShowOrdering(Optional<? extends GetLibraryItemsShowOrdering> showOrdering) {
public GetLibraryItemsMetadata withShowOrdering(Optional<? extends ShowOrdering> showOrdering) {
Utils.checkNotNull(showOrdering, "showOrdering");
this.showOrdering = showOrdering;
return this;
@@ -1678,7 +1678,7 @@ public class GetLibraryItemsMetadata {
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public GetLibraryItemsMetadata withMediaGuid(List<GetLibraryItemsMediaGuid> mediaGuid) {
public GetLibraryItemsMetadata withMediaGuid(List<MediaGuid> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = Optional.ofNullable(mediaGuid);
return this;
@@ -1688,7 +1688,7 @@ public class GetLibraryItemsMetadata {
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public GetLibraryItemsMetadata withMediaGuid(Optional<? extends List<GetLibraryItemsMediaGuid>> mediaGuid) {
public GetLibraryItemsMetadata withMediaGuid(Optional<? extends List<MediaGuid>> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = mediaGuid;
return this;
@@ -1706,13 +1706,13 @@ public class GetLibraryItemsMetadata {
return this;
}
public GetLibraryItemsMetadata withMetaDataRating(List<GetLibraryItemsMetaDataRating> metaDataRating) {
public GetLibraryItemsMetadata withMetaDataRating(List<MetaDataRating> metaDataRating) {
Utils.checkNotNull(metaDataRating, "metaDataRating");
this.metaDataRating = Optional.ofNullable(metaDataRating);
return this;
}
public GetLibraryItemsMetadata withMetaDataRating(Optional<? extends List<GetLibraryItemsMetaDataRating>> metaDataRating) {
public GetLibraryItemsMetadata withMetaDataRating(Optional<? extends List<MetaDataRating>> metaDataRating) {
Utils.checkNotNull(metaDataRating, "metaDataRating");
this.metaDataRating = metaDataRating;
return this;
@@ -2290,13 +2290,13 @@ public class GetLibraryItemsMetadata {
private Optional<String> tagline = Optional.empty();
private Optional<? extends GetLibraryItemsFlattenSeasons> flattenSeasons = Optional.empty();
private Optional<? extends FlattenSeasons> flattenSeasons = Optional.empty();
private Optional<? extends GetLibraryItemsEpisodeSort> episodeSort = Optional.empty();
private Optional<? extends EpisodeSort> episodeSort = Optional.empty();
private Optional<? extends GetLibraryItemsEnableCreditsMarkerGeneration> enableCreditsMarkerGeneration = Optional.empty();
private Optional<? extends EnableCreditsMarkerGeneration> enableCreditsMarkerGeneration = Optional.empty();
private Optional<? extends GetLibraryItemsShowOrdering> showOrdering = Optional.empty();
private Optional<? extends ShowOrdering> showOrdering = Optional.empty();
private Optional<String> thumb = Optional.empty();
@@ -2354,11 +2354,11 @@ public class GetLibraryItemsMetadata {
private Optional<? extends List<GetLibraryItemsLocation>> location = Optional.empty();
private Optional<? extends List<GetLibraryItemsMediaGuid>> mediaGuid = Optional.empty();
private Optional<? extends List<MediaGuid>> mediaGuid = Optional.empty();
private Optional<? extends GetLibraryItemsUltraBlurColors> ultraBlurColors = Optional.empty();
private Optional<? extends List<GetLibraryItemsMetaDataRating>> metaDataRating = Optional.empty();
private Optional<? extends List<MetaDataRating>> metaDataRating = Optional.empty();
private Optional<? extends List<GetLibraryItemsImage>> image = Optional.empty();
@@ -2602,7 +2602,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
public Builder flattenSeasons(GetLibraryItemsFlattenSeasons flattenSeasons) {
public Builder flattenSeasons(FlattenSeasons flattenSeasons) {
Utils.checkNotNull(flattenSeasons, "flattenSeasons");
this.flattenSeasons = Optional.ofNullable(flattenSeasons);
return this;
@@ -2611,7 +2611,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
public Builder flattenSeasons(Optional<? extends GetLibraryItemsFlattenSeasons> flattenSeasons) {
public Builder flattenSeasons(Optional<? extends FlattenSeasons> flattenSeasons) {
Utils.checkNotNull(flattenSeasons, "flattenSeasons");
this.flattenSeasons = flattenSeasons;
return this;
@@ -2620,7 +2620,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
public Builder episodeSort(GetLibraryItemsEpisodeSort episodeSort) {
public Builder episodeSort(EpisodeSort episodeSort) {
Utils.checkNotNull(episodeSort, "episodeSort");
this.episodeSort = Optional.ofNullable(episodeSort);
return this;
@@ -2629,7 +2629,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
public Builder episodeSort(Optional<? extends GetLibraryItemsEpisodeSort> episodeSort) {
public Builder episodeSort(Optional<? extends EpisodeSort> episodeSort) {
Utils.checkNotNull(episodeSort, "episodeSort");
this.episodeSort = episodeSort;
return this;
@@ -2638,7 +2638,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
public Builder enableCreditsMarkerGeneration(GetLibraryItemsEnableCreditsMarkerGeneration enableCreditsMarkerGeneration) {
public Builder enableCreditsMarkerGeneration(EnableCreditsMarkerGeneration enableCreditsMarkerGeneration) {
Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration");
this.enableCreditsMarkerGeneration = Optional.ofNullable(enableCreditsMarkerGeneration);
return this;
@@ -2647,7 +2647,7 @@ public class GetLibraryItemsMetadata {
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
public Builder enableCreditsMarkerGeneration(Optional<? extends GetLibraryItemsEnableCreditsMarkerGeneration> enableCreditsMarkerGeneration) {
public Builder enableCreditsMarkerGeneration(Optional<? extends EnableCreditsMarkerGeneration> enableCreditsMarkerGeneration) {
Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration");
this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration;
return this;
@@ -2662,7 +2662,7 @@ public class GetLibraryItemsMetadata {
* absolute = TheTVDB (Absolute)).
*
*/
public Builder showOrdering(GetLibraryItemsShowOrdering showOrdering) {
public Builder showOrdering(ShowOrdering showOrdering) {
Utils.checkNotNull(showOrdering, "showOrdering");
this.showOrdering = Optional.ofNullable(showOrdering);
return this;
@@ -2677,7 +2677,7 @@ public class GetLibraryItemsMetadata {
* absolute = TheTVDB (Absolute)).
*
*/
public Builder showOrdering(Optional<? extends GetLibraryItemsShowOrdering> showOrdering) {
public Builder showOrdering(Optional<? extends ShowOrdering> showOrdering) {
Utils.checkNotNull(showOrdering, "showOrdering");
this.showOrdering = showOrdering;
return this;
@@ -3034,7 +3034,7 @@ public class GetLibraryItemsMetadata {
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public Builder mediaGuid(List<GetLibraryItemsMediaGuid> mediaGuid) {
public Builder mediaGuid(List<MediaGuid> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = Optional.ofNullable(mediaGuid);
return this;
@@ -3044,7 +3044,7 @@ public class GetLibraryItemsMetadata {
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public Builder mediaGuid(Optional<? extends List<GetLibraryItemsMediaGuid>> mediaGuid) {
public Builder mediaGuid(Optional<? extends List<MediaGuid>> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = mediaGuid;
return this;
@@ -3062,13 +3062,13 @@ public class GetLibraryItemsMetadata {
return this;
}
public Builder metaDataRating(List<GetLibraryItemsMetaDataRating> metaDataRating) {
public Builder metaDataRating(List<MetaDataRating> metaDataRating) {
Utils.checkNotNull(metaDataRating, "metaDataRating");
this.metaDataRating = Optional.ofNullable(metaDataRating);
return this;
}
public Builder metaDataRating(Optional<? extends List<GetLibraryItemsMetaDataRating>> metaDataRating) {
public Builder metaDataRating(Optional<? extends List<MetaDataRating>> metaDataRating) {
Utils.checkNotNull(metaDataRating, "metaDataRating");
this.metaDataRating = metaDataRating;
return this;

View File

@@ -1,46 +0,0 @@
/*
* 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;
/**
* GetLibraryItemsShowOrdering - Setting that indicates the episode ordering for the show.
* None = Library default,
* tmdbAiring = The Movie Database (Aired),
* aired = TheTVDB (Aired),
* dvd = TheTVDB (DVD),
* absolute = TheTVDB (Absolute)).
*
*/
public enum GetLibraryItemsShowOrdering {
None("None"),
TmdbAiring("tmdbAiring"),
TvdbAired("aired"),
TvdbDvd("dvd"),
TvdbAbsolute("absolute");
@JsonValue
private final String value;
private GetLibraryItemsShowOrdering(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetLibraryItemsShowOrdering> fromValue(String value) {
for (GetLibraryItemsShowOrdering o: GetLibraryItemsShowOrdering.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -31,9 +31,9 @@ public class GetMediaMetaDataLibraryOptimizedForStreaming {
this.value = value;
}
public static GetMediaMetaDataLibraryOptimizedForStreaming of(GetMediaMetaDataOptimizedForStreaming1 value) {
public static GetMediaMetaDataLibraryOptimizedForStreaming of(GetMediaMetaDataOptimizedForStreamingLibrary1 value) {
Utils.checkNotNull(value, "value");
return new GetMediaMetaDataLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetMediaMetaDataOptimizedForStreaming1>(){}));
return new GetMediaMetaDataLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetMediaMetaDataOptimizedForStreamingLibrary1>(){}));
}
public static GetMediaMetaDataLibraryOptimizedForStreaming of(boolean value) {
@@ -44,7 +44,7 @@ public class GetMediaMetaDataLibraryOptimizedForStreaming {
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.GetMediaMetaDataOptimizedForStreaming1}</li>
* <li>{@code dev.plexapi.sdk.models.operations.GetMediaMetaDataOptimizedForStreamingLibrary1}</li>
* <li>{@code boolean}</li>
* </ul>
*
@@ -86,7 +86,7 @@ public class GetMediaMetaDataLibraryOptimizedForStreaming {
public _Deserializer() {
super(GetMediaMetaDataLibraryOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<GetMediaMetaDataOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
TypeReferenceWithShape.of(new TypeReference<GetMediaMetaDataOptimizedForStreamingLibrary1>() {}, JsonShape.DEFAULT));
}
}

View File

@@ -121,8 +121,9 @@ public class GetMediaMetaDataMedia {
/**
* Indicates whether voice activity is detected.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hasVoiceActivity")
private boolean hasVoiceActivity;
private Optional<Boolean> hasVoiceActivity;
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
@@ -145,8 +146,9 @@ public class GetMediaMetaDataMedia {
/**
* An array of parts for this media item.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Part")
private List<GetMediaMetaDataPart> part;
private Optional<? extends List<GetMediaMetaDataPart>> part;
@JsonCreator
public GetMediaMetaDataMedia(
@@ -164,11 +166,11 @@ public class GetMediaMetaDataMedia {
@JsonProperty("container") Optional<String> container,
@JsonProperty("videoFrameRate") Optional<String> videoFrameRate,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("hasVoiceActivity") boolean hasVoiceActivity,
@JsonProperty("hasVoiceActivity") Optional<Boolean> hasVoiceActivity,
@JsonProperty("audioProfile") Optional<String> audioProfile,
@JsonProperty("optimizedForStreaming") Optional<? extends GetMediaMetaDataOptimizedForStreaming> optimizedForStreaming,
@JsonProperty("has64bitOffsets") Optional<Boolean> has64bitOffsets,
@JsonProperty("Part") List<GetMediaMetaDataPart> part) {
@JsonProperty("Part") Optional<? extends List<GetMediaMetaDataPart>> part) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(duration, "duration");
Utils.checkNotNull(bitrate, "bitrate");
@@ -210,10 +212,8 @@ public class GetMediaMetaDataMedia {
}
public GetMediaMetaDataMedia(
long id,
boolean hasVoiceActivity,
List<GetMediaMetaDataPart> part) {
this(id, 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(), hasVoiceActivity, Optional.empty(), Optional.empty(), Optional.empty(), part);
long id) {
this(id, 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());
}
/**
@@ -330,7 +330,7 @@ public class GetMediaMetaDataMedia {
* Indicates whether voice activity is detected.
*/
@JsonIgnore
public boolean hasVoiceActivity() {
public Optional<Boolean> hasVoiceActivity() {
return hasVoiceActivity;
}
@@ -359,9 +359,10 @@ public class GetMediaMetaDataMedia {
/**
* An array of parts for this media item.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public List<GetMediaMetaDataPart> part() {
return part;
public Optional<List<GetMediaMetaDataPart>> part() {
return (Optional<List<GetMediaMetaDataPart>>) part;
}
public final static Builder builder() {
@@ -611,6 +612,15 @@ public class GetMediaMetaDataMedia {
* Indicates whether voice activity is detected.
*/
public GetMediaMetaDataMedia withHasVoiceActivity(boolean hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity);
return this;
}
/**
* Indicates whether voice activity is detected.
*/
public GetMediaMetaDataMedia withHasVoiceActivity(Optional<Boolean> hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = hasVoiceActivity;
return this;
@@ -668,6 +678,15 @@ public class GetMediaMetaDataMedia {
* An array of parts for this media item.
*/
public GetMediaMetaDataMedia withPart(List<GetMediaMetaDataPart> part) {
Utils.checkNotNull(part, "part");
this.part = Optional.ofNullable(part);
return this;
}
/**
* An array of parts for this media item.
*/
public GetMediaMetaDataMedia withPart(Optional<? extends List<GetMediaMetaDataPart>> part) {
Utils.checkNotNull(part, "part");
this.part = part;
return this;
@@ -782,7 +801,7 @@ public class GetMediaMetaDataMedia {
private Optional<String> videoProfile = Optional.empty();
private Boolean hasVoiceActivity;
private Optional<Boolean> hasVoiceActivity = Optional.empty();
private Optional<String> audioProfile = Optional.empty();
@@ -790,7 +809,7 @@ public class GetMediaMetaDataMedia {
private Optional<Boolean> has64bitOffsets = Optional.empty();
private List<GetMediaMetaDataPart> part;
private Optional<? extends List<GetMediaMetaDataPart>> part = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -1039,6 +1058,15 @@ public class GetMediaMetaDataMedia {
* Indicates whether voice activity is detected.
*/
public Builder hasVoiceActivity(boolean hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity);
return this;
}
/**
* Indicates whether voice activity is detected.
*/
public Builder hasVoiceActivity(Optional<Boolean> hasVoiceActivity) {
Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity");
this.hasVoiceActivity = hasVoiceActivity;
return this;
@@ -1096,6 +1124,15 @@ public class GetMediaMetaDataMedia {
* An array of parts for this media item.
*/
public Builder part(List<GetMediaMetaDataPart> part) {
Utils.checkNotNull(part, "part");
this.part = Optional.ofNullable(part);
return this;
}
/**
* An array of parts for this media item.
*/
public Builder part(Optional<? extends List<GetMediaMetaDataPart>> part) {
Utils.checkNotNull(part, "part");
this.part = part;
return this;

View File

@@ -399,14 +399,14 @@ public class GetMediaMetaDataMetadata {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Producer")
private Optional<? extends List<Producer>> producer;
private Optional<? extends List<GetMediaMetaDataProducer>> producer;
/**
* An array of similar content objects.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Similar")
private Optional<? extends List<Similar>> similar;
private Optional<? extends List<GetMediaMetaDataSimilar>> similar;
/**
* An array of location objects.
@@ -475,8 +475,8 @@ public class GetMediaMetaDataMetadata {
@JsonProperty("Role") Optional<? extends List<GetMediaMetaDataRole>> role,
@JsonProperty("Director") Optional<? extends List<GetMediaMetaDataDirector>> director,
@JsonProperty("Writer") Optional<? extends List<GetMediaMetaDataWriter>> writer,
@JsonProperty("Producer") Optional<? extends List<Producer>> producer,
@JsonProperty("Similar") Optional<? extends List<Similar>> similar,
@JsonProperty("Producer") Optional<? extends List<GetMediaMetaDataProducer>> producer,
@JsonProperty("Similar") Optional<? extends List<GetMediaMetaDataSimilar>> similar,
@JsonProperty("Location") Optional<? extends List<GetMediaMetaDataLocation>> location) {
Utils.checkNotNull(ratingKey, "ratingKey");
Utils.checkNotNull(parentRatingKey, "parentRatingKey");
@@ -1082,8 +1082,8 @@ public class GetMediaMetaDataMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Producer>> producer() {
return (Optional<List<Producer>>) producer;
public Optional<List<GetMediaMetaDataProducer>> producer() {
return (Optional<List<GetMediaMetaDataProducer>>) producer;
}
/**
@@ -1091,8 +1091,8 @@ public class GetMediaMetaDataMetadata {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Similar>> similar() {
return (Optional<List<Similar>>) similar;
public Optional<List<GetMediaMetaDataSimilar>> similar() {
return (Optional<List<GetMediaMetaDataSimilar>>) similar;
}
/**
@@ -1975,7 +1975,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of Writer roles.
*/
public GetMediaMetaDataMetadata withProducer(List<Producer> producer) {
public GetMediaMetaDataMetadata withProducer(List<GetMediaMetaDataProducer> producer) {
Utils.checkNotNull(producer, "producer");
this.producer = Optional.ofNullable(producer);
return this;
@@ -1984,7 +1984,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of Writer roles.
*/
public GetMediaMetaDataMetadata withProducer(Optional<? extends List<Producer>> producer) {
public GetMediaMetaDataMetadata withProducer(Optional<? extends List<GetMediaMetaDataProducer>> producer) {
Utils.checkNotNull(producer, "producer");
this.producer = producer;
return this;
@@ -1993,7 +1993,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of similar content objects.
*/
public GetMediaMetaDataMetadata withSimilar(List<Similar> similar) {
public GetMediaMetaDataMetadata withSimilar(List<GetMediaMetaDataSimilar> similar) {
Utils.checkNotNull(similar, "similar");
this.similar = Optional.ofNullable(similar);
return this;
@@ -2002,7 +2002,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of similar content objects.
*/
public GetMediaMetaDataMetadata withSimilar(Optional<? extends List<Similar>> similar) {
public GetMediaMetaDataMetadata withSimilar(Optional<? extends List<GetMediaMetaDataSimilar>> similar) {
Utils.checkNotNull(similar, "similar");
this.similar = similar;
return this;
@@ -2349,9 +2349,9 @@ public class GetMediaMetaDataMetadata {
private Optional<? extends List<GetMediaMetaDataWriter>> writer = Optional.empty();
private Optional<? extends List<Producer>> producer = Optional.empty();
private Optional<? extends List<GetMediaMetaDataProducer>> producer = Optional.empty();
private Optional<? extends List<Similar>> similar = Optional.empty();
private Optional<? extends List<GetMediaMetaDataSimilar>> similar = Optional.empty();
private Optional<? extends List<GetMediaMetaDataLocation>> location = Optional.empty();
@@ -3226,7 +3226,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of Writer roles.
*/
public Builder producer(List<Producer> producer) {
public Builder producer(List<GetMediaMetaDataProducer> producer) {
Utils.checkNotNull(producer, "producer");
this.producer = Optional.ofNullable(producer);
return this;
@@ -3235,7 +3235,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of Writer roles.
*/
public Builder producer(Optional<? extends List<Producer>> producer) {
public Builder producer(Optional<? extends List<GetMediaMetaDataProducer>> producer) {
Utils.checkNotNull(producer, "producer");
this.producer = producer;
return this;
@@ -3244,7 +3244,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of similar content objects.
*/
public Builder similar(List<Similar> similar) {
public Builder similar(List<GetMediaMetaDataSimilar> similar) {
Utils.checkNotNull(similar, "similar");
this.similar = Optional.ofNullable(similar);
return this;
@@ -3253,7 +3253,7 @@ public class GetMediaMetaDataMetadata {
/**
* An array of similar content objects.
*/
public Builder similar(Optional<? extends List<Similar>> similar) {
public Builder similar(Optional<? extends List<GetMediaMetaDataSimilar>> similar) {
Utils.checkNotNull(similar, "similar");
this.similar = similar;
return this;

View File

@@ -31,9 +31,9 @@ public class GetMediaMetaDataOptimizedForStreaming {
this.value = value;
}
public static GetMediaMetaDataOptimizedForStreaming of(OptimizedForStreaming1 value) {
public static GetMediaMetaDataOptimizedForStreaming of(GetMediaMetaDataOptimizedForStreaming1 value) {
Utils.checkNotNull(value, "value");
return new GetMediaMetaDataOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<OptimizedForStreaming1>(){}));
return new GetMediaMetaDataOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetMediaMetaDataOptimizedForStreaming1>(){}));
}
public static GetMediaMetaDataOptimizedForStreaming of(boolean value) {
@@ -44,7 +44,7 @@ public class GetMediaMetaDataOptimizedForStreaming {
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.OptimizedForStreaming1}</li>
* <li>{@code dev.plexapi.sdk.models.operations.GetMediaMetaDataOptimizedForStreaming1}</li>
* <li>{@code boolean}</li>
* </ul>
*
@@ -86,7 +86,7 @@ public class GetMediaMetaDataOptimizedForStreaming {
public _Deserializer() {
super(GetMediaMetaDataOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<OptimizedForStreaming1>() {}, JsonShape.DEFAULT));
TypeReferenceWithShape.of(new TypeReference<GetMediaMetaDataOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
}
}

View File

@@ -0,0 +1,33 @@
/*
* 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 GetMediaMetaDataOptimizedForStreamingLibrary1 {
ZERO(0),
ONE(1);
@JsonValue
private final int value;
private GetMediaMetaDataOptimizedForStreamingLibrary1(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetMediaMetaDataOptimizedForStreamingLibrary1> fromValue(int value) {
for (GetMediaMetaDataOptimizedForStreamingLibrary1 o: GetMediaMetaDataOptimizedForStreamingLibrary1.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,354 @@
/*
* 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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetMediaMetaDataProducer {
/**
* The unique role identifier.
*/
@JsonProperty("id")
private long id;
/**
* The filter string for the role.
*/
@JsonProperty("filter")
private String filter;
/**
* The actor's name.
*/
@JsonProperty("tag")
private String tag;
/**
* A key associated with the actor tag.
*/
@JsonProperty("tagKey")
private String tagKey;
/**
* The character name or role.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("role")
private Optional<String> role;
/**
* URL for the role thumbnail image.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
private Optional<String> thumb;
@JsonCreator
public GetMediaMetaDataProducer(
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag,
@JsonProperty("tagKey") String tagKey,
@JsonProperty("role") Optional<String> role,
@JsonProperty("thumb") Optional<String> thumb) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(tag, "tag");
Utils.checkNotNull(tagKey, "tagKey");
Utils.checkNotNull(role, "role");
Utils.checkNotNull(thumb, "thumb");
this.id = id;
this.filter = filter;
this.tag = tag;
this.tagKey = tagKey;
this.role = role;
this.thumb = thumb;
}
public GetMediaMetaDataProducer(
long id,
String filter,
String tag,
String tagKey) {
this(id, filter, tag, tagKey, Optional.empty(), Optional.empty());
}
/**
* The unique role identifier.
*/
@JsonIgnore
public long id() {
return id;
}
/**
* The filter string for the role.
*/
@JsonIgnore
public String filter() {
return filter;
}
/**
* The actor's name.
*/
@JsonIgnore
public String tag() {
return tag;
}
/**
* A key associated with the actor tag.
*/
@JsonIgnore
public String tagKey() {
return tagKey;
}
/**
* The character name or role.
*/
@JsonIgnore
public Optional<String> role() {
return role;
}
/**
* URL for the role thumbnail image.
*/
@JsonIgnore
public Optional<String> thumb() {
return thumb;
}
public final static Builder builder() {
return new Builder();
}
/**
* The unique role identifier.
*/
public GetMediaMetaDataProducer withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter string for the role.
*/
public GetMediaMetaDataProducer withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The actor's name.
*/
public GetMediaMetaDataProducer withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
/**
* A key associated with the actor tag.
*/
public GetMediaMetaDataProducer withTagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = tagKey;
return this;
}
/**
* The character name or role.
*/
public GetMediaMetaDataProducer withRole(String role) {
Utils.checkNotNull(role, "role");
this.role = Optional.ofNullable(role);
return this;
}
/**
* The character name or role.
*/
public GetMediaMetaDataProducer withRole(Optional<String> role) {
Utils.checkNotNull(role, "role");
this.role = role;
return this;
}
/**
* URL for the role thumbnail image.
*/
public GetMediaMetaDataProducer withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
/**
* URL for the role thumbnail image.
*/
public GetMediaMetaDataProducer withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaMetaDataProducer other = (GetMediaMetaDataProducer) o;
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.tag, other.tag) &&
Objects.deepEquals(this.tagKey, other.tagKey) &&
Objects.deepEquals(this.role, other.role) &&
Objects.deepEquals(this.thumb, other.thumb);
}
@Override
public int hashCode() {
return Objects.hash(
id,
filter,
tag,
tagKey,
role,
thumb);
}
@Override
public String toString() {
return Utils.toString(GetMediaMetaDataProducer.class,
"id", id,
"filter", filter,
"tag", tag,
"tagKey", tagKey,
"role", role,
"thumb", thumb);
}
public final static class Builder {
private Long id;
private String filter;
private String tag;
private String tagKey;
private Optional<String> role = Optional.empty();
private Optional<String> thumb = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* The unique role identifier.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter string for the role.
*/
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The actor's name.
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
/**
* A key associated with the actor tag.
*/
public Builder tagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = tagKey;
return this;
}
/**
* The character name or role.
*/
public Builder role(String role) {
Utils.checkNotNull(role, "role");
this.role = Optional.ofNullable(role);
return this;
}
/**
* The character name or role.
*/
public Builder role(Optional<String> role) {
Utils.checkNotNull(role, "role");
this.role = role;
return this;
}
/**
* URL for the role thumbnail image.
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
/**
* URL for the role thumbnail image.
*/
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public GetMediaMetaDataProducer build() {
return new GetMediaMetaDataProducer(
id,
filter,
tag,
tagKey,
role,
thumb);
}
}
}

View File

@@ -0,0 +1,182 @@
/*
* 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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetMediaMetaDataSimilar {
/**
* The unique similar item identifier.
*/
@JsonProperty("id")
private long id;
/**
* The filter string for similar items.
*/
@JsonProperty("filter")
private String filter;
/**
* The tag or title of the similar content.
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetMediaMetaDataSimilar(
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(tag, "tag");
this.id = id;
this.filter = filter;
this.tag = tag;
}
/**
* The unique similar item identifier.
*/
@JsonIgnore
public long id() {
return id;
}
/**
* The filter string for similar items.
*/
@JsonIgnore
public String filter() {
return filter;
}
/**
* The tag or title of the similar content.
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The unique similar item identifier.
*/
public GetMediaMetaDataSimilar withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter string for similar items.
*/
public GetMediaMetaDataSimilar withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The tag or title of the similar content.
*/
public GetMediaMetaDataSimilar 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;
}
GetMediaMetaDataSimilar other = (GetMediaMetaDataSimilar) o;
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
id,
filter,
tag);
}
@Override
public String toString() {
return Utils.toString(GetMediaMetaDataSimilar.class,
"id", id,
"filter", filter,
"tag", tag);
}
public final static class Builder {
private Long id;
private String filter;
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The unique similar item identifier.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter string for similar items.
*/
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The tag or title of the similar content.
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetMediaMetaDataSimilar build() {
return new GetMediaMetaDataSimilar(
id,
filter,
tag);
}
}
}

View File

@@ -62,20 +62,23 @@ public class GetMediaMetaDataStream {
/**
* Language of the stream.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("language")
private String language;
private Optional<String> language;
/**
* Language tag (e.g., en).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("languageTag")
private String languageTag;
private Optional<String> languageTag;
/**
* ISO language code.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("languageCode")
private String languageCode;
private Optional<String> languageCode;
/**
* Indicates whether header compression is enabled.
@@ -175,6 +178,10 @@ public class GetMediaMetaDataStream {
@JsonProperty("codedWidth")
private Optional<Integer> codedWidth;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("closedCaptions")
private Optional<Boolean> closedCaptions;
/**
* Color primaries used.
*/
@@ -246,6 +253,10 @@ public class GetMediaMetaDataStream {
@JsonProperty("scanType")
private Optional<String> scanType;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("embeddedInVideo")
private Optional<String> embeddedInVideo;
/**
* Number of reference frames.
*/
@@ -340,9 +351,9 @@ public class GetMediaMetaDataStream {
@JsonProperty("codec") String codec,
@JsonProperty("index") int index,
@JsonProperty("bitrate") Optional<Integer> bitrate,
@JsonProperty("language") String language,
@JsonProperty("languageTag") String languageTag,
@JsonProperty("languageCode") String languageCode,
@JsonProperty("language") Optional<String> language,
@JsonProperty("languageTag") Optional<String> languageTag,
@JsonProperty("languageCode") Optional<String> languageCode,
@JsonProperty("headerCompression") Optional<Boolean> headerCompression,
@JsonProperty("DOVIBLCompatID") Optional<Integer> doviblCompatID,
@JsonProperty("DOVIBLPresent") Optional<Boolean> doviblPresent,
@@ -357,6 +368,7 @@ public class GetMediaMetaDataStream {
@JsonProperty("chromaSubsampling") Optional<String> chromaSubsampling,
@JsonProperty("codedHeight") Optional<Integer> codedHeight,
@JsonProperty("codedWidth") Optional<Integer> codedWidth,
@JsonProperty("closedCaptions") Optional<Boolean> closedCaptions,
@JsonProperty("colorPrimaries") Optional<String> colorPrimaries,
@JsonProperty("colorRange") Optional<String> colorRange,
@JsonProperty("colorSpace") Optional<String> colorSpace,
@@ -368,6 +380,7 @@ public class GetMediaMetaDataStream {
@JsonProperty("hasScalingMatrix") Optional<Boolean> hasScalingMatrix,
@JsonProperty("profile") Optional<String> profile,
@JsonProperty("scanType") Optional<String> scanType,
@JsonProperty("embeddedInVideo") Optional<String> embeddedInVideo,
@JsonProperty("refFrames") Optional<Integer> refFrames,
@JsonProperty("width") Optional<Integer> width,
@JsonProperty("displayTitle") String displayTitle,
@@ -404,6 +417,7 @@ public class GetMediaMetaDataStream {
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
Utils.checkNotNull(codedHeight, "codedHeight");
Utils.checkNotNull(codedWidth, "codedWidth");
Utils.checkNotNull(closedCaptions, "closedCaptions");
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
Utils.checkNotNull(colorRange, "colorRange");
Utils.checkNotNull(colorSpace, "colorSpace");
@@ -415,6 +429,7 @@ public class GetMediaMetaDataStream {
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
Utils.checkNotNull(profile, "profile");
Utils.checkNotNull(scanType, "scanType");
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
Utils.checkNotNull(refFrames, "refFrames");
Utils.checkNotNull(width, "width");
Utils.checkNotNull(displayTitle, "displayTitle");
@@ -451,6 +466,7 @@ public class GetMediaMetaDataStream {
this.chromaSubsampling = chromaSubsampling;
this.codedHeight = codedHeight;
this.codedWidth = codedWidth;
this.closedCaptions = closedCaptions;
this.colorPrimaries = colorPrimaries;
this.colorRange = colorRange;
this.colorSpace = colorSpace;
@@ -462,6 +478,7 @@ public class GetMediaMetaDataStream {
this.hasScalingMatrix = hasScalingMatrix;
this.profile = profile;
this.scanType = scanType;
this.embeddedInVideo = embeddedInVideo;
this.refFrames = refFrames;
this.width = width;
this.displayTitle = displayTitle;
@@ -482,12 +499,9 @@ public class GetMediaMetaDataStream {
int streamType,
String codec,
int index,
String language,
String languageTag,
String languageCode,
String displayTitle,
String extendedDisplayTitle) {
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());
this(id, streamType, Optional.empty(), codec, index, 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(), 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());
}
/**
@@ -542,7 +556,7 @@ public class GetMediaMetaDataStream {
* Language of the stream.
*/
@JsonIgnore
public String language() {
public Optional<String> language() {
return language;
}
@@ -550,7 +564,7 @@ public class GetMediaMetaDataStream {
* Language tag (e.g., en).
*/
@JsonIgnore
public String languageTag() {
public Optional<String> languageTag() {
return languageTag;
}
@@ -558,7 +572,7 @@ public class GetMediaMetaDataStream {
* ISO language code.
*/
@JsonIgnore
public String languageCode() {
public Optional<String> languageCode() {
return languageCode;
}
@@ -674,6 +688,11 @@ public class GetMediaMetaDataStream {
return codedWidth;
}
@JsonIgnore
public Optional<Boolean> closedCaptions() {
return closedCaptions;
}
/**
* Color primaries used.
*/
@@ -756,6 +775,11 @@ public class GetMediaMetaDataStream {
return scanType;
}
@JsonIgnore
public Optional<String> embeddedInVideo() {
return embeddedInVideo;
}
/**
* Number of reference frames.
*/
@@ -937,6 +961,15 @@ public class GetMediaMetaDataStream {
* Language of the stream.
*/
public GetMediaMetaDataStream withLanguage(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
/**
* Language of the stream.
*/
public GetMediaMetaDataStream withLanguage(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
@@ -946,6 +979,15 @@ public class GetMediaMetaDataStream {
* Language tag (e.g., en).
*/
public GetMediaMetaDataStream withLanguageTag(String languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = Optional.ofNullable(languageTag);
return this;
}
/**
* Language tag (e.g., en).
*/
public GetMediaMetaDataStream withLanguageTag(Optional<String> languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = languageTag;
return this;
@@ -955,6 +997,15 @@ public class GetMediaMetaDataStream {
* ISO language code.
*/
public GetMediaMetaDataStream withLanguageCode(String languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = Optional.ofNullable(languageCode);
return this;
}
/**
* ISO language code.
*/
public GetMediaMetaDataStream withLanguageCode(Optional<String> languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = languageCode;
return this;
@@ -1212,6 +1263,18 @@ public class GetMediaMetaDataStream {
return this;
}
public GetMediaMetaDataStream withClosedCaptions(boolean closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = Optional.ofNullable(closedCaptions);
return this;
}
public GetMediaMetaDataStream withClosedCaptions(Optional<Boolean> closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = closedCaptions;
return this;
}
/**
* Color primaries used.
*/
@@ -1398,6 +1461,18 @@ public class GetMediaMetaDataStream {
return this;
}
public GetMediaMetaDataStream withEmbeddedInVideo(String embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = Optional.ofNullable(embeddedInVideo);
return this;
}
public GetMediaMetaDataStream withEmbeddedInVideo(Optional<String> embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = embeddedInVideo;
return this;
}
/**
* Number of reference frames.
*/
@@ -1641,6 +1716,7 @@ public class GetMediaMetaDataStream {
Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) &&
Objects.deepEquals(this.codedHeight, other.codedHeight) &&
Objects.deepEquals(this.codedWidth, other.codedWidth) &&
Objects.deepEquals(this.closedCaptions, other.closedCaptions) &&
Objects.deepEquals(this.colorPrimaries, other.colorPrimaries) &&
Objects.deepEquals(this.colorRange, other.colorRange) &&
Objects.deepEquals(this.colorSpace, other.colorSpace) &&
@@ -1652,6 +1728,7 @@ public class GetMediaMetaDataStream {
Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) &&
Objects.deepEquals(this.profile, other.profile) &&
Objects.deepEquals(this.scanType, other.scanType) &&
Objects.deepEquals(this.embeddedInVideo, other.embeddedInVideo) &&
Objects.deepEquals(this.refFrames, other.refFrames) &&
Objects.deepEquals(this.width, other.width) &&
Objects.deepEquals(this.displayTitle, other.displayTitle) &&
@@ -1693,6 +1770,7 @@ public class GetMediaMetaDataStream {
chromaSubsampling,
codedHeight,
codedWidth,
closedCaptions,
colorPrimaries,
colorRange,
colorSpace,
@@ -1704,6 +1782,7 @@ public class GetMediaMetaDataStream {
hasScalingMatrix,
profile,
scanType,
embeddedInVideo,
refFrames,
width,
displayTitle,
@@ -1745,6 +1824,7 @@ public class GetMediaMetaDataStream {
"chromaSubsampling", chromaSubsampling,
"codedHeight", codedHeight,
"codedWidth", codedWidth,
"closedCaptions", closedCaptions,
"colorPrimaries", colorPrimaries,
"colorRange", colorRange,
"colorSpace", colorSpace,
@@ -1756,6 +1836,7 @@ public class GetMediaMetaDataStream {
"hasScalingMatrix", hasScalingMatrix,
"profile", profile,
"scanType", scanType,
"embeddedInVideo", embeddedInVideo,
"refFrames", refFrames,
"width", width,
"displayTitle", displayTitle,
@@ -1785,11 +1866,11 @@ public class GetMediaMetaDataStream {
private Optional<Integer> bitrate = Optional.empty();
private String language;
private Optional<String> language = Optional.empty();
private String languageTag;
private Optional<String> languageTag = Optional.empty();
private String languageCode;
private Optional<String> languageCode = Optional.empty();
private Optional<Boolean> headerCompression = Optional.empty();
@@ -1819,6 +1900,8 @@ public class GetMediaMetaDataStream {
private Optional<Integer> codedWidth = Optional.empty();
private Optional<Boolean> closedCaptions = Optional.empty();
private Optional<String> colorPrimaries = Optional.empty();
private Optional<String> colorRange = Optional.empty();
@@ -1841,6 +1924,8 @@ public class GetMediaMetaDataStream {
private Optional<String> scanType = Optional.empty();
private Optional<String> embeddedInVideo = Optional.empty();
private Optional<Integer> refFrames = Optional.empty();
private Optional<Integer> width = Optional.empty();
@@ -1947,6 +2032,15 @@ public class GetMediaMetaDataStream {
* Language of the stream.
*/
public Builder language(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
/**
* Language of the stream.
*/
public Builder language(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
@@ -1956,6 +2050,15 @@ public class GetMediaMetaDataStream {
* Language tag (e.g., en).
*/
public Builder languageTag(String languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = Optional.ofNullable(languageTag);
return this;
}
/**
* Language tag (e.g., en).
*/
public Builder languageTag(Optional<String> languageTag) {
Utils.checkNotNull(languageTag, "languageTag");
this.languageTag = languageTag;
return this;
@@ -1965,6 +2068,15 @@ public class GetMediaMetaDataStream {
* ISO language code.
*/
public Builder languageCode(String languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = Optional.ofNullable(languageCode);
return this;
}
/**
* ISO language code.
*/
public Builder languageCode(Optional<String> languageCode) {
Utils.checkNotNull(languageCode, "languageCode");
this.languageCode = languageCode;
return this;
@@ -2222,6 +2334,18 @@ public class GetMediaMetaDataStream {
return this;
}
public Builder closedCaptions(boolean closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = Optional.ofNullable(closedCaptions);
return this;
}
public Builder closedCaptions(Optional<Boolean> closedCaptions) {
Utils.checkNotNull(closedCaptions, "closedCaptions");
this.closedCaptions = closedCaptions;
return this;
}
/**
* Color primaries used.
*/
@@ -2408,6 +2532,18 @@ public class GetMediaMetaDataStream {
return this;
}
public Builder embeddedInVideo(String embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = Optional.ofNullable(embeddedInVideo);
return this;
}
public Builder embeddedInVideo(Optional<String> embeddedInVideo) {
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
this.embeddedInVideo = embeddedInVideo;
return this;
}
/**
* Number of reference frames.
*/
@@ -2643,6 +2779,7 @@ public class GetMediaMetaDataStream {
chromaSubsampling,
codedHeight,
codedWidth,
closedCaptions,
colorPrimaries,
colorRange,
colorSpace,
@@ -2654,6 +2791,7 @@ public class GetMediaMetaDataStream {
hasScalingMatrix,
profile,
scanType,
embeddedInVideo,
refFrames,
width,
displayTitle,

View File

@@ -1,699 +0,0 @@
/*
* 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.Double;
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 GetOnDeckMedia {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private Optional<Double> id;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("duration")
private Optional<Double> duration;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("bitrate")
private Optional<Double> bitrate;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("width")
private Optional<Double> width;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("height")
private Optional<Double> height;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("aspectRatio")
private Optional<Double> aspectRatio;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audioChannels")
private Optional<Double> audioChannels;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audioCodec")
private Optional<String> audioCodec;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoCodec")
private Optional<String> videoCodec;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoResolution")
private Optional<String> videoResolution;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("container")
private Optional<String> container;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoFrameRate")
private Optional<String> videoFrameRate;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audioProfile")
private Optional<String> audioProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoProfile")
private Optional<String> videoProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Part")
private Optional<? extends List<GetOnDeckPart>> part;
@JsonCreator
public GetOnDeckMedia(
@JsonProperty("id") Optional<Double> id,
@JsonProperty("duration") Optional<Double> duration,
@JsonProperty("bitrate") Optional<Double> bitrate,
@JsonProperty("width") Optional<Double> width,
@JsonProperty("height") Optional<Double> height,
@JsonProperty("aspectRatio") Optional<Double> aspectRatio,
@JsonProperty("audioChannels") Optional<Double> audioChannels,
@JsonProperty("audioCodec") Optional<String> audioCodec,
@JsonProperty("videoCodec") Optional<String> videoCodec,
@JsonProperty("videoResolution") Optional<String> videoResolution,
@JsonProperty("container") Optional<String> container,
@JsonProperty("videoFrameRate") Optional<String> videoFrameRate,
@JsonProperty("audioProfile") Optional<String> audioProfile,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("Part") Optional<? extends List<GetOnDeckPart>> part) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(duration, "duration");
Utils.checkNotNull(bitrate, "bitrate");
Utils.checkNotNull(width, "width");
Utils.checkNotNull(height, "height");
Utils.checkNotNull(aspectRatio, "aspectRatio");
Utils.checkNotNull(audioChannels, "audioChannels");
Utils.checkNotNull(audioCodec, "audioCodec");
Utils.checkNotNull(videoCodec, "videoCodec");
Utils.checkNotNull(videoResolution, "videoResolution");
Utils.checkNotNull(container, "container");
Utils.checkNotNull(videoFrameRate, "videoFrameRate");
Utils.checkNotNull(audioProfile, "audioProfile");
Utils.checkNotNull(videoProfile, "videoProfile");
Utils.checkNotNull(part, "part");
this.id = id;
this.duration = duration;
this.bitrate = bitrate;
this.width = width;
this.height = height;
this.aspectRatio = aspectRatio;
this.audioChannels = audioChannels;
this.audioCodec = audioCodec;
this.videoCodec = videoCodec;
this.videoResolution = videoResolution;
this.container = container;
this.videoFrameRate = videoFrameRate;
this.audioProfile = audioProfile;
this.videoProfile = videoProfile;
this.part = part;
}
public GetOnDeckMedia() {
this(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());
}
@JsonIgnore
public Optional<Double> id() {
return id;
}
@JsonIgnore
public Optional<Double> duration() {
return duration;
}
@JsonIgnore
public Optional<Double> bitrate() {
return bitrate;
}
@JsonIgnore
public Optional<Double> width() {
return width;
}
@JsonIgnore
public Optional<Double> height() {
return height;
}
@JsonIgnore
public Optional<Double> aspectRatio() {
return aspectRatio;
}
@JsonIgnore
public Optional<Double> audioChannels() {
return audioChannels;
}
@JsonIgnore
public Optional<String> audioCodec() {
return audioCodec;
}
@JsonIgnore
public Optional<String> videoCodec() {
return videoCodec;
}
@JsonIgnore
public Optional<String> videoResolution() {
return videoResolution;
}
@JsonIgnore
public Optional<String> container() {
return container;
}
@JsonIgnore
public Optional<String> videoFrameRate() {
return videoFrameRate;
}
@JsonIgnore
public Optional<String> audioProfile() {
return audioProfile;
}
@JsonIgnore
public Optional<String> videoProfile() {
return videoProfile;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetOnDeckPart>> part() {
return (Optional<List<GetOnDeckPart>>) part;
}
public final static Builder builder() {
return new Builder();
}
public GetOnDeckMedia withId(double id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public GetOnDeckMedia withId(Optional<Double> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public GetOnDeckMedia withDuration(double duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
public GetOnDeckMedia withDuration(Optional<Double> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
public GetOnDeckMedia withBitrate(double bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = Optional.ofNullable(bitrate);
return this;
}
public GetOnDeckMedia withBitrate(Optional<Double> bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = bitrate;
return this;
}
public GetOnDeckMedia withWidth(double width) {
Utils.checkNotNull(width, "width");
this.width = Optional.ofNullable(width);
return this;
}
public GetOnDeckMedia withWidth(Optional<Double> width) {
Utils.checkNotNull(width, "width");
this.width = width;
return this;
}
public GetOnDeckMedia withHeight(double height) {
Utils.checkNotNull(height, "height");
this.height = Optional.ofNullable(height);
return this;
}
public GetOnDeckMedia withHeight(Optional<Double> height) {
Utils.checkNotNull(height, "height");
this.height = height;
return this;
}
public GetOnDeckMedia withAspectRatio(double aspectRatio) {
Utils.checkNotNull(aspectRatio, "aspectRatio");
this.aspectRatio = Optional.ofNullable(aspectRatio);
return this;
}
public GetOnDeckMedia withAspectRatio(Optional<Double> aspectRatio) {
Utils.checkNotNull(aspectRatio, "aspectRatio");
this.aspectRatio = aspectRatio;
return this;
}
public GetOnDeckMedia withAudioChannels(double audioChannels) {
Utils.checkNotNull(audioChannels, "audioChannels");
this.audioChannels = Optional.ofNullable(audioChannels);
return this;
}
public GetOnDeckMedia withAudioChannels(Optional<Double> audioChannels) {
Utils.checkNotNull(audioChannels, "audioChannels");
this.audioChannels = audioChannels;
return this;
}
public GetOnDeckMedia withAudioCodec(String audioCodec) {
Utils.checkNotNull(audioCodec, "audioCodec");
this.audioCodec = Optional.ofNullable(audioCodec);
return this;
}
public GetOnDeckMedia withAudioCodec(Optional<String> audioCodec) {
Utils.checkNotNull(audioCodec, "audioCodec");
this.audioCodec = audioCodec;
return this;
}
public GetOnDeckMedia withVideoCodec(String videoCodec) {
Utils.checkNotNull(videoCodec, "videoCodec");
this.videoCodec = Optional.ofNullable(videoCodec);
return this;
}
public GetOnDeckMedia withVideoCodec(Optional<String> videoCodec) {
Utils.checkNotNull(videoCodec, "videoCodec");
this.videoCodec = videoCodec;
return this;
}
public GetOnDeckMedia withVideoResolution(String videoResolution) {
Utils.checkNotNull(videoResolution, "videoResolution");
this.videoResolution = Optional.ofNullable(videoResolution);
return this;
}
public GetOnDeckMedia withVideoResolution(Optional<String> videoResolution) {
Utils.checkNotNull(videoResolution, "videoResolution");
this.videoResolution = videoResolution;
return this;
}
public GetOnDeckMedia withContainer(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
public GetOnDeckMedia withContainer(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
public GetOnDeckMedia withVideoFrameRate(String videoFrameRate) {
Utils.checkNotNull(videoFrameRate, "videoFrameRate");
this.videoFrameRate = Optional.ofNullable(videoFrameRate);
return this;
}
public GetOnDeckMedia withVideoFrameRate(Optional<String> videoFrameRate) {
Utils.checkNotNull(videoFrameRate, "videoFrameRate");
this.videoFrameRate = videoFrameRate;
return this;
}
public GetOnDeckMedia withAudioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
public GetOnDeckMedia withAudioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public GetOnDeckMedia withVideoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
public GetOnDeckMedia withVideoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
public GetOnDeckMedia withPart(List<GetOnDeckPart> part) {
Utils.checkNotNull(part, "part");
this.part = Optional.ofNullable(part);
return this;
}
public GetOnDeckMedia withPart(Optional<? extends List<GetOnDeckPart>> part) {
Utils.checkNotNull(part, "part");
this.part = part;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetOnDeckMedia other = (GetOnDeckMedia) o;
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.duration, other.duration) &&
Objects.deepEquals(this.bitrate, other.bitrate) &&
Objects.deepEquals(this.width, other.width) &&
Objects.deepEquals(this.height, other.height) &&
Objects.deepEquals(this.aspectRatio, other.aspectRatio) &&
Objects.deepEquals(this.audioChannels, other.audioChannels) &&
Objects.deepEquals(this.audioCodec, other.audioCodec) &&
Objects.deepEquals(this.videoCodec, other.videoCodec) &&
Objects.deepEquals(this.videoResolution, other.videoResolution) &&
Objects.deepEquals(this.container, other.container) &&
Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) &&
Objects.deepEquals(this.audioProfile, other.audioProfile) &&
Objects.deepEquals(this.videoProfile, other.videoProfile) &&
Objects.deepEquals(this.part, other.part);
}
@Override
public int hashCode() {
return Objects.hash(
id,
duration,
bitrate,
width,
height,
aspectRatio,
audioChannels,
audioCodec,
videoCodec,
videoResolution,
container,
videoFrameRate,
audioProfile,
videoProfile,
part);
}
@Override
public String toString() {
return Utils.toString(GetOnDeckMedia.class,
"id", id,
"duration", duration,
"bitrate", bitrate,
"width", width,
"height", height,
"aspectRatio", aspectRatio,
"audioChannels", audioChannels,
"audioCodec", audioCodec,
"videoCodec", videoCodec,
"videoResolution", videoResolution,
"container", container,
"videoFrameRate", videoFrameRate,
"audioProfile", audioProfile,
"videoProfile", videoProfile,
"part", part);
}
public final static class Builder {
private Optional<Double> id = Optional.empty();
private Optional<Double> duration = Optional.empty();
private Optional<Double> bitrate = Optional.empty();
private Optional<Double> width = Optional.empty();
private Optional<Double> height = Optional.empty();
private Optional<Double> aspectRatio = Optional.empty();
private Optional<Double> audioChannels = Optional.empty();
private Optional<String> audioCodec = Optional.empty();
private Optional<String> videoCodec = Optional.empty();
private Optional<String> videoResolution = Optional.empty();
private Optional<String> container = Optional.empty();
private Optional<String> videoFrameRate = Optional.empty();
private Optional<String> audioProfile = Optional.empty();
private Optional<String> videoProfile = Optional.empty();
private Optional<? extends List<GetOnDeckPart>> part = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder id(double id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public Builder id(Optional<Double> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Builder duration(double duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
public Builder duration(Optional<Double> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
public Builder bitrate(double bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = Optional.ofNullable(bitrate);
return this;
}
public Builder bitrate(Optional<Double> bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = bitrate;
return this;
}
public Builder width(double width) {
Utils.checkNotNull(width, "width");
this.width = Optional.ofNullable(width);
return this;
}
public Builder width(Optional<Double> width) {
Utils.checkNotNull(width, "width");
this.width = width;
return this;
}
public Builder height(double height) {
Utils.checkNotNull(height, "height");
this.height = Optional.ofNullable(height);
return this;
}
public Builder height(Optional<Double> height) {
Utils.checkNotNull(height, "height");
this.height = height;
return this;
}
public Builder aspectRatio(double aspectRatio) {
Utils.checkNotNull(aspectRatio, "aspectRatio");
this.aspectRatio = Optional.ofNullable(aspectRatio);
return this;
}
public Builder aspectRatio(Optional<Double> aspectRatio) {
Utils.checkNotNull(aspectRatio, "aspectRatio");
this.aspectRatio = aspectRatio;
return this;
}
public Builder audioChannels(double audioChannels) {
Utils.checkNotNull(audioChannels, "audioChannels");
this.audioChannels = Optional.ofNullable(audioChannels);
return this;
}
public Builder audioChannels(Optional<Double> audioChannels) {
Utils.checkNotNull(audioChannels, "audioChannels");
this.audioChannels = audioChannels;
return this;
}
public Builder audioCodec(String audioCodec) {
Utils.checkNotNull(audioCodec, "audioCodec");
this.audioCodec = Optional.ofNullable(audioCodec);
return this;
}
public Builder audioCodec(Optional<String> audioCodec) {
Utils.checkNotNull(audioCodec, "audioCodec");
this.audioCodec = audioCodec;
return this;
}
public Builder videoCodec(String videoCodec) {
Utils.checkNotNull(videoCodec, "videoCodec");
this.videoCodec = Optional.ofNullable(videoCodec);
return this;
}
public Builder videoCodec(Optional<String> videoCodec) {
Utils.checkNotNull(videoCodec, "videoCodec");
this.videoCodec = videoCodec;
return this;
}
public Builder videoResolution(String videoResolution) {
Utils.checkNotNull(videoResolution, "videoResolution");
this.videoResolution = Optional.ofNullable(videoResolution);
return this;
}
public Builder videoResolution(Optional<String> videoResolution) {
Utils.checkNotNull(videoResolution, "videoResolution");
this.videoResolution = videoResolution;
return this;
}
public Builder container(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
public Builder container(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
public Builder videoFrameRate(String videoFrameRate) {
Utils.checkNotNull(videoFrameRate, "videoFrameRate");
this.videoFrameRate = Optional.ofNullable(videoFrameRate);
return this;
}
public Builder videoFrameRate(Optional<String> videoFrameRate) {
Utils.checkNotNull(videoFrameRate, "videoFrameRate");
this.videoFrameRate = videoFrameRate;
return this;
}
public Builder audioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
public Builder audioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public Builder videoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
public Builder videoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
public Builder part(List<GetOnDeckPart> part) {
Utils.checkNotNull(part, "part");
this.part = Optional.ofNullable(part);
return this;
}
public Builder part(Optional<? extends List<GetOnDeckPart>> part) {
Utils.checkNotNull(part, "part");
this.part = part;
return this;
}
public GetOnDeckMedia build() {
return new GetOnDeckMedia(
id,
duration,
bitrate,
width,
height,
aspectRatio,
audioChannels,
audioCodec,
videoCodec,
videoResolution,
container,
videoFrameRate,
audioProfile,
videoProfile,
part);
}
}
}

View File

@@ -1,364 +0,0 @@
/*
* 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.Double;
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 GetOnDeckMediaContainer {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("size")
private Optional<Double> size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("allowSync")
private Optional<Boolean> allowSync;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("identifier")
private Optional<String> identifier;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("mediaTagPrefix")
private Optional<String> mediaTagPrefix;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("mediaTagVersion")
private Optional<Double> mediaTagVersion;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("mixedParents")
private Optional<Boolean> mixedParents;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Metadata")
private Optional<? extends List<GetOnDeckMetadata>> metadata;
@JsonCreator
public GetOnDeckMediaContainer(
@JsonProperty("size") Optional<Double> size,
@JsonProperty("allowSync") Optional<Boolean> allowSync,
@JsonProperty("identifier") Optional<String> identifier,
@JsonProperty("mediaTagPrefix") Optional<String> mediaTagPrefix,
@JsonProperty("mediaTagVersion") Optional<Double> mediaTagVersion,
@JsonProperty("mixedParents") Optional<Boolean> mixedParents,
@JsonProperty("Metadata") Optional<? extends List<GetOnDeckMetadata>> metadata) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
Utils.checkNotNull(mixedParents, "mixedParents");
Utils.checkNotNull(metadata, "metadata");
this.size = size;
this.allowSync = allowSync;
this.identifier = identifier;
this.mediaTagPrefix = mediaTagPrefix;
this.mediaTagVersion = mediaTagVersion;
this.mixedParents = mixedParents;
this.metadata = metadata;
}
public GetOnDeckMediaContainer() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Double> size() {
return size;
}
@JsonIgnore
public Optional<Boolean> allowSync() {
return allowSync;
}
@JsonIgnore
public Optional<String> identifier() {
return identifier;
}
@JsonIgnore
public Optional<String> mediaTagPrefix() {
return mediaTagPrefix;
}
@JsonIgnore
public Optional<Double> mediaTagVersion() {
return mediaTagVersion;
}
@JsonIgnore
public Optional<Boolean> mixedParents() {
return mixedParents;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetOnDeckMetadata>> metadata() {
return (Optional<List<GetOnDeckMetadata>>) metadata;
}
public final static Builder builder() {
return new Builder();
}
public GetOnDeckMediaContainer withSize(double size) {
Utils.checkNotNull(size, "size");
this.size = Optional.ofNullable(size);
return this;
}
public GetOnDeckMediaContainer withSize(Optional<Double> size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetOnDeckMediaContainer withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public GetOnDeckMediaContainer withAllowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public GetOnDeckMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = Optional.ofNullable(identifier);
return this;
}
public GetOnDeckMediaContainer withIdentifier(Optional<String> identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
public GetOnDeckMediaContainer withMediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix);
return this;
}
public GetOnDeckMediaContainer withMediaTagPrefix(Optional<String> mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
public GetOnDeckMediaContainer withMediaTagVersion(double mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = Optional.ofNullable(mediaTagVersion);
return this;
}
public GetOnDeckMediaContainer withMediaTagVersion(Optional<Double> mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
public GetOnDeckMediaContainer withMixedParents(boolean mixedParents) {
Utils.checkNotNull(mixedParents, "mixedParents");
this.mixedParents = Optional.ofNullable(mixedParents);
return this;
}
public GetOnDeckMediaContainer withMixedParents(Optional<Boolean> mixedParents) {
Utils.checkNotNull(mixedParents, "mixedParents");
this.mixedParents = mixedParents;
return this;
}
public GetOnDeckMediaContainer withMetadata(List<GetOnDeckMetadata> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = Optional.ofNullable(metadata);
return this;
}
public GetOnDeckMediaContainer withMetadata(Optional<? extends List<GetOnDeckMetadata>> 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;
}
GetOnDeckMediaContainer other = (GetOnDeckMediaContainer) o;
return
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.allowSync, other.allowSync) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) &&
Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) &&
Objects.deepEquals(this.mixedParents, other.mixedParents) &&
Objects.deepEquals(this.metadata, other.metadata);
}
@Override
public int hashCode() {
return Objects.hash(
size,
allowSync,
identifier,
mediaTagPrefix,
mediaTagVersion,
mixedParents,
metadata);
}
@Override
public String toString() {
return Utils.toString(GetOnDeckMediaContainer.class,
"size", size,
"allowSync", allowSync,
"identifier", identifier,
"mediaTagPrefix", mediaTagPrefix,
"mediaTagVersion", mediaTagVersion,
"mixedParents", mixedParents,
"metadata", metadata);
}
public final static class Builder {
private Optional<Double> size = Optional.empty();
private Optional<Boolean> allowSync = Optional.empty();
private Optional<String> identifier = Optional.empty();
private Optional<String> mediaTagPrefix = Optional.empty();
private Optional<Double> mediaTagVersion = Optional.empty();
private Optional<Boolean> mixedParents = Optional.empty();
private Optional<? extends List<GetOnDeckMetadata>> metadata = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder size(double size) {
Utils.checkNotNull(size, "size");
this.size = Optional.ofNullable(size);
return this;
}
public Builder size(Optional<Double> size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public Builder allowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = Optional.ofNullable(identifier);
return this;
}
public Builder identifier(Optional<String> identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
public Builder mediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix);
return this;
}
public Builder mediaTagPrefix(Optional<String> mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
public Builder mediaTagVersion(double mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = Optional.ofNullable(mediaTagVersion);
return this;
}
public Builder mediaTagVersion(Optional<Double> mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
public Builder mixedParents(boolean mixedParents) {
Utils.checkNotNull(mixedParents, "mixedParents");
this.mixedParents = Optional.ofNullable(mixedParents);
return this;
}
public Builder mixedParents(Optional<Boolean> mixedParents) {
Utils.checkNotNull(mixedParents, "mixedParents");
this.mixedParents = mixedParents;
return this;
}
public Builder metadata(List<GetOnDeckMetadata> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = Optional.ofNullable(metadata);
return this;
}
public Builder metadata(Optional<? extends List<GetOnDeckMetadata>> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = metadata;
return this;
}
public GetOnDeckMediaContainer build() {
return new GetOnDeckMediaContainer(
size,
allowSync,
identifier,
mediaTagPrefix,
mediaTagVersion,
mixedParents,
metadata);
}
}
}

View File

@@ -1,447 +0,0 @@
/*
* 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.Double;
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 GetOnDeckPart {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private Optional<Double> id;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("key")
private Optional<String> key;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("duration")
private Optional<Double> duration;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("file")
private Optional<String> file;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("size")
private Optional<Double> size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audioProfile")
private Optional<String> audioProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("container")
private Optional<String> container;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoProfile")
private Optional<String> videoProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Stream")
private Optional<? extends List<GetOnDeckStream>> stream;
@JsonCreator
public GetOnDeckPart(
@JsonProperty("id") Optional<Double> id,
@JsonProperty("key") Optional<String> key,
@JsonProperty("duration") Optional<Double> duration,
@JsonProperty("file") Optional<String> file,
@JsonProperty("size") Optional<Double> size,
@JsonProperty("audioProfile") Optional<String> audioProfile,
@JsonProperty("container") Optional<String> container,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("Stream") Optional<? extends List<GetOnDeckStream>> stream) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(duration, "duration");
Utils.checkNotNull(file, "file");
Utils.checkNotNull(size, "size");
Utils.checkNotNull(audioProfile, "audioProfile");
Utils.checkNotNull(container, "container");
Utils.checkNotNull(videoProfile, "videoProfile");
Utils.checkNotNull(stream, "stream");
this.id = id;
this.key = key;
this.duration = duration;
this.file = file;
this.size = size;
this.audioProfile = audioProfile;
this.container = container;
this.videoProfile = videoProfile;
this.stream = stream;
}
public GetOnDeckPart() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Double> id() {
return id;
}
@JsonIgnore
public Optional<String> key() {
return key;
}
@JsonIgnore
public Optional<Double> duration() {
return duration;
}
@JsonIgnore
public Optional<String> file() {
return file;
}
@JsonIgnore
public Optional<Double> size() {
return size;
}
@JsonIgnore
public Optional<String> audioProfile() {
return audioProfile;
}
@JsonIgnore
public Optional<String> container() {
return container;
}
@JsonIgnore
public Optional<String> videoProfile() {
return videoProfile;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetOnDeckStream>> stream() {
return (Optional<List<GetOnDeckStream>>) stream;
}
public final static Builder builder() {
return new Builder();
}
public GetOnDeckPart withId(double id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public GetOnDeckPart withId(Optional<Double> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public GetOnDeckPart withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public GetOnDeckPart withKey(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetOnDeckPart withDuration(double duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
public GetOnDeckPart withDuration(Optional<Double> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
public GetOnDeckPart withFile(String file) {
Utils.checkNotNull(file, "file");
this.file = Optional.ofNullable(file);
return this;
}
public GetOnDeckPart withFile(Optional<String> file) {
Utils.checkNotNull(file, "file");
this.file = file;
return this;
}
public GetOnDeckPart withSize(double size) {
Utils.checkNotNull(size, "size");
this.size = Optional.ofNullable(size);
return this;
}
public GetOnDeckPart withSize(Optional<Double> size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetOnDeckPart withAudioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
public GetOnDeckPart withAudioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public GetOnDeckPart withContainer(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
public GetOnDeckPart withContainer(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
public GetOnDeckPart withVideoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
public GetOnDeckPart withVideoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
public GetOnDeckPart withStream(List<GetOnDeckStream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
public GetOnDeckPart withStream(Optional<? extends List<GetOnDeckStream>> 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;
}
GetOnDeckPart other = (GetOnDeckPart) o;
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.duration, other.duration) &&
Objects.deepEquals(this.file, other.file) &&
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.audioProfile, other.audioProfile) &&
Objects.deepEquals(this.container, other.container) &&
Objects.deepEquals(this.videoProfile, other.videoProfile) &&
Objects.deepEquals(this.stream, other.stream);
}
@Override
public int hashCode() {
return Objects.hash(
id,
key,
duration,
file,
size,
audioProfile,
container,
videoProfile,
stream);
}
@Override
public String toString() {
return Utils.toString(GetOnDeckPart.class,
"id", id,
"key", key,
"duration", duration,
"file", file,
"size", size,
"audioProfile", audioProfile,
"container", container,
"videoProfile", videoProfile,
"stream", stream);
}
public final static class Builder {
private Optional<Double> id = Optional.empty();
private Optional<String> key = Optional.empty();
private Optional<Double> duration = Optional.empty();
private Optional<String> file = Optional.empty();
private Optional<Double> size = Optional.empty();
private Optional<String> audioProfile = Optional.empty();
private Optional<String> container = Optional.empty();
private Optional<String> videoProfile = Optional.empty();
private Optional<? extends List<GetOnDeckStream>> stream = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder id(double id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public Builder id(Optional<Double> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public Builder key(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder duration(double duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
public Builder duration(Optional<Double> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
public Builder file(String file) {
Utils.checkNotNull(file, "file");
this.file = Optional.ofNullable(file);
return this;
}
public Builder file(Optional<String> file) {
Utils.checkNotNull(file, "file");
this.file = file;
return this;
}
public Builder size(double size) {
Utils.checkNotNull(size, "size");
this.size = Optional.ofNullable(size);
return this;
}
public Builder size(Optional<Double> size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Builder audioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
public Builder audioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public Builder container(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
public Builder container(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
public Builder videoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
public Builder videoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
public Builder stream(List<GetOnDeckStream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
public Builder stream(Optional<? extends List<GetOnDeckStream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
return this;
}
public GetOnDeckPart build() {
return new GetOnDeckPart(
id,
key,
duration,
file,
size,
audioProfile,
container,
videoProfile,
stream);
}
}
}

View File

@@ -1,20 +0,0 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
public class GetOnDeckRequestBuilder {
private final SDKMethodInterfaces.MethodCallGetOnDeck sdk;
public GetOnDeckRequestBuilder(SDKMethodInterfaces.MethodCallGetOnDeck sdk) {
this.sdk = sdk;
}
public GetOnDeckResponse call() throws Exception {
return sdk.getOnDeckDirect();
}
}

View File

@@ -1,249 +0,0 @@
/*
* 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 GetOnDeckResponse 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;
/**
* The on Deck content
*/
private Optional<? extends GetOnDeckResponseBody> object;
@JsonCreator
public GetOnDeckResponse(
String contentType,
int statusCode,
HttpResponse<InputStream> rawResponse,
Optional<? extends GetOnDeckResponseBody> 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 GetOnDeckResponse(
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;
}
/**
* The on Deck content
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetOnDeckResponseBody> object() {
return (Optional<GetOnDeckResponseBody>) object;
}
public final static Builder builder() {
return new Builder();
}
/**
* HTTP response content type for this operation
*/
public GetOnDeckResponse withContentType(String contentType) {
Utils.checkNotNull(contentType, "contentType");
this.contentType = contentType;
return this;
}
/**
* HTTP response status code for this operation
*/
public GetOnDeckResponse withStatusCode(int statusCode) {
Utils.checkNotNull(statusCode, "statusCode");
this.statusCode = statusCode;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetOnDeckResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
/**
* The on Deck content
*/
public GetOnDeckResponse withObject(GetOnDeckResponseBody object) {
Utils.checkNotNull(object, "object");
this.object = Optional.ofNullable(object);
return this;
}
/**
* The on Deck content
*/
public GetOnDeckResponse withObject(Optional<? extends GetOnDeckResponseBody> 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;
}
GetOnDeckResponse other = (GetOnDeckResponse) 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(GetOnDeckResponse.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 GetOnDeckResponseBody> 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;
}
/**
* The on Deck content
*/
public Builder object(GetOnDeckResponseBody object) {
Utils.checkNotNull(object, "object");
this.object = Optional.ofNullable(object);
return this;
}
/**
* The on Deck content
*/
public Builder object(Optional<? extends GetOnDeckResponseBody> object) {
Utils.checkNotNull(object, "object");
this.object = object;
return this;
}
public GetOnDeckResponse build() {
return new GetOnDeckResponse(
contentType,
statusCode,
rawResponse,
object);
}
}
}

View File

@@ -1,112 +0,0 @@
/*
* 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;
/**
* GetOnDeckResponseBody - The on Deck content
*/
public class GetOnDeckResponseBody {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("MediaContainer")
private Optional<? extends GetOnDeckMediaContainer> mediaContainer;
@JsonCreator
public GetOnDeckResponseBody(
@JsonProperty("MediaContainer") Optional<? extends GetOnDeckMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
}
public GetOnDeckResponseBody() {
this(Optional.empty());
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetOnDeckMediaContainer> mediaContainer() {
return (Optional<GetOnDeckMediaContainer>) mediaContainer;
}
public final static Builder builder() {
return new Builder();
}
public GetOnDeckResponseBody withMediaContainer(GetOnDeckMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = Optional.ofNullable(mediaContainer);
return this;
}
public GetOnDeckResponseBody withMediaContainer(Optional<? extends GetOnDeckMediaContainer> 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;
}
GetOnDeckResponseBody other = (GetOnDeckResponseBody) o;
return
Objects.deepEquals(this.mediaContainer, other.mediaContainer);
}
@Override
public int hashCode() {
return Objects.hash(
mediaContainer);
}
@Override
public String toString() {
return Utils.toString(GetOnDeckResponseBody.class,
"mediaContainer", mediaContainer);
}
public final static class Builder {
private Optional<? extends GetOnDeckMediaContainer> mediaContainer = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder mediaContainer(GetOnDeckMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = Optional.ofNullable(mediaContainer);
return this;
}
public Builder mediaContainer(Optional<? extends GetOnDeckMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
return this;
}
public GetOnDeckResponseBody build() {
return new GetOnDeckResponseBody(
mediaContainer);
}
}
}

View File

@@ -22,24 +22,35 @@ import java.util.Optional;
public class GetRecentlyAddedMediaContainer {
/**
* Number of media items returned in this response.
*/
@JsonProperty("size")
private long size;
private int size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("offset")
private Optional<Integer> offset;
@JsonInclude(Include.NON_ABSENT)
/**
* Total number of media items in the library.
*/
@JsonProperty("totalSize")
private Optional<Integer> totalSize;
private int totalSize;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("identifier")
private Optional<String> identifier;
/**
* Offset value for pagination.
*/
@JsonProperty("offset")
private long offset;
@JsonInclude(Include.NON_ABSENT)
/**
* Indicates whether syncing is allowed.
*/
@JsonProperty("allowSync")
private Optional<Boolean> allowSync;
private boolean allowSync;
/**
* An plugin identifier for the media container.
*/
@JsonProperty("identifier")
private String identifier;
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
@@ -49,65 +60,87 @@ public class GetRecentlyAddedMediaContainer {
@JsonProperty("Meta")
private Optional<? extends Meta> meta;
/**
* An array of metadata items.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Metadata")
private Optional<? extends List<GetRecentlyAddedMetadata>> metadata;
@JsonCreator
public GetRecentlyAddedMediaContainer(
@JsonProperty("size") long size,
@JsonProperty("offset") Optional<Integer> offset,
@JsonProperty("totalSize") Optional<Integer> totalSize,
@JsonProperty("identifier") Optional<String> identifier,
@JsonProperty("allowSync") Optional<Boolean> allowSync,
@JsonProperty("size") int size,
@JsonProperty("totalSize") int totalSize,
@JsonProperty("offset") long offset,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("identifier") String identifier,
@JsonProperty("Meta") Optional<? extends Meta> meta,
@JsonProperty("Metadata") Optional<? extends List<GetRecentlyAddedMetadata>> metadata) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(offset, "offset");
Utils.checkNotNull(totalSize, "totalSize");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(offset, "offset");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(meta, "meta");
Utils.checkNotNull(metadata, "metadata");
this.size = size;
this.offset = offset;
this.totalSize = totalSize;
this.identifier = identifier;
this.offset = offset;
this.allowSync = allowSync;
this.identifier = identifier;
this.meta = meta;
this.metadata = metadata;
}
public GetRecentlyAddedMediaContainer(
long size) {
this(size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
int size,
int totalSize,
long offset,
boolean allowSync,
String identifier) {
this(size, totalSize, offset, allowSync, identifier, Optional.empty(), Optional.empty());
}
/**
* Number of media items returned in this response.
*/
@JsonIgnore
public long size() {
public int size() {
return size;
}
/**
* Total number of media items in the library.
*/
@JsonIgnore
public Optional<Integer> offset() {
return offset;
}
@JsonIgnore
public Optional<Integer> totalSize() {
public int totalSize() {
return totalSize;
}
/**
* Offset value for pagination.
*/
@JsonIgnore
public Optional<String> identifier() {
return identifier;
public long offset() {
return offset;
}
/**
* Indicates whether syncing is allowed.
*/
@JsonIgnore
public Optional<Boolean> allowSync() {
public boolean allowSync() {
return allowSync;
}
/**
* An plugin identifier for the media container.
*/
@JsonIgnore
public String identifier() {
return identifier;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
@@ -118,6 +151,9 @@ public class GetRecentlyAddedMediaContainer {
return (Optional<Meta>) meta;
}
/**
* An array of metadata items.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetRecentlyAddedMetadata>> metadata() {
@@ -128,57 +164,48 @@ public class GetRecentlyAddedMediaContainer {
return new Builder();
}
public GetRecentlyAddedMediaContainer withSize(long size) {
/**
* Number of media items returned in this response.
*/
public GetRecentlyAddedMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetRecentlyAddedMediaContainer withOffset(int offset) {
Utils.checkNotNull(offset, "offset");
this.offset = Optional.ofNullable(offset);
return this;
}
public GetRecentlyAddedMediaContainer withOffset(Optional<Integer> offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
/**
* Total number of media items in the library.
*/
public GetRecentlyAddedMediaContainer withTotalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = Optional.ofNullable(totalSize);
return this;
}
public GetRecentlyAddedMediaContainer withTotalSize(Optional<Integer> totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
public GetRecentlyAddedMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = Optional.ofNullable(identifier);
return this;
}
public GetRecentlyAddedMediaContainer withIdentifier(Optional<String> identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
/**
* Offset value for pagination.
*/
public GetRecentlyAddedMediaContainer withOffset(long offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public GetRecentlyAddedMediaContainer withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
this.allowSync = allowSync;
return this;
}
public GetRecentlyAddedMediaContainer withAllowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
/**
* An plugin identifier for the media container.
*/
public GetRecentlyAddedMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
@@ -202,12 +229,18 @@ public class GetRecentlyAddedMediaContainer {
return this;
}
/**
* An array of metadata items.
*/
public GetRecentlyAddedMediaContainer withMetadata(List<GetRecentlyAddedMetadata> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = Optional.ofNullable(metadata);
return this;
}
/**
* An array of metadata items.
*/
public GetRecentlyAddedMediaContainer withMetadata(Optional<? extends List<GetRecentlyAddedMetadata>> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = metadata;
@@ -225,10 +258,10 @@ public class GetRecentlyAddedMediaContainer {
GetRecentlyAddedMediaContainer other = (GetRecentlyAddedMediaContainer) 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.offset, other.offset) &&
Objects.deepEquals(this.allowSync, other.allowSync) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.meta, other.meta) &&
Objects.deepEquals(this.metadata, other.metadata);
}
@@ -237,10 +270,10 @@ public class GetRecentlyAddedMediaContainer {
public int hashCode() {
return Objects.hash(
size,
offset,
totalSize,
identifier,
offset,
allowSync,
identifier,
meta,
metadata);
}
@@ -249,25 +282,25 @@ public class GetRecentlyAddedMediaContainer {
public String toString() {
return Utils.toString(GetRecentlyAddedMediaContainer.class,
"size", size,
"offset", offset,
"totalSize", totalSize,
"identifier", identifier,
"offset", offset,
"allowSync", allowSync,
"identifier", identifier,
"meta", meta,
"metadata", metadata);
}
public final static class Builder {
private Long size;
private Integer size;
private Optional<Integer> offset = Optional.empty();
private Integer totalSize;
private Optional<Integer> totalSize = Optional.empty();
private Long offset;
private Optional<String> identifier = Optional.empty();
private Boolean allowSync;
private Optional<Boolean> allowSync = Optional.empty();
private String identifier;
private Optional<? extends Meta> meta = Optional.empty();
@@ -277,57 +310,48 @@ public class GetRecentlyAddedMediaContainer {
// force use of static builder() method
}
public Builder size(long 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;
}
/**
* Total number of media items in the library.
*/
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 = Optional.ofNullable(identifier);
return this;
}
public Builder identifier(Optional<String> identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
/**
* 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 = Optional.ofNullable(allowSync);
this.allowSync = allowSync;
return this;
}
public Builder allowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
/**
* An plugin identifier for the media container.
*/
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
@@ -351,12 +375,18 @@ public class GetRecentlyAddedMediaContainer {
return this;
}
/**
* An array of metadata items.
*/
public Builder metadata(List<GetRecentlyAddedMetadata> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = Optional.ofNullable(metadata);
return this;
}
/**
* An array of metadata items.
*/
public Builder metadata(Optional<? extends List<GetRecentlyAddedMetadata>> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = metadata;
@@ -366,10 +396,10 @@ public class GetRecentlyAddedMediaContainer {
public GetRecentlyAddedMediaContainer build() {
return new GetRecentlyAddedMediaContainer(
size,
offset,
totalSize,
identifier,
offset,
allowSync,
identifier,
meta,
metadata);
}

View File

@@ -0,0 +1,99 @@
/*
* 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;
/**
* GetRecentlyAddedOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonDeserialize(using = GetRecentlyAddedOptimizedForStreaming._Deserializer.class)
public class GetRecentlyAddedOptimizedForStreaming {
@JsonValue
private TypedObject value;
private GetRecentlyAddedOptimizedForStreaming(TypedObject value) {
this.value = value;
}
public static GetRecentlyAddedOptimizedForStreaming of(GetRecentlyAddedOptimizedForStreaming1 value) {
Utils.checkNotNull(value, "value");
return new GetRecentlyAddedOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetRecentlyAddedOptimizedForStreaming1>(){}));
}
public static GetRecentlyAddedOptimizedForStreaming of(boolean value) {
Utils.checkNotNull(value, "value");
return new GetRecentlyAddedOptimizedForStreaming(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.GetRecentlyAddedOptimizedForStreaming1}</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;
}
GetRecentlyAddedOptimizedForStreaming other = (GetRecentlyAddedOptimizedForStreaming) 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<GetRecentlyAddedOptimizedForStreaming> {
public _Deserializer() {
super(GetRecentlyAddedOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<GetRecentlyAddedOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(GetRecentlyAddedOptimizedForStreaming.class,
"value", value);
}
}

View File

@@ -0,0 +1,33 @@
/*
* 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 GetRecentlyAddedOptimizedForStreaming1 {
ZERO(0),
ONE(1);
@JsonValue
private final int value;
private GetRecentlyAddedOptimizedForStreaming1(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetRecentlyAddedOptimizedForStreaming1> fromValue(int value) {
for (GetRecentlyAddedOptimizedForStreaming1 o: GetRecentlyAddedOptimizedForStreaming1.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -8,6 +8,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* HasThumbnail - Indicates if the part has a thumbnail.
*/
public enum HasThumbnail {
False("0"),
True("1");

View File

@@ -6,34 +6,29 @@
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;
/**
* Location - The folder path for the media item.
*/
public class Location {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("path")
private Optional<String> path;
private String path;
@JsonCreator
public Location(
@JsonProperty("path") Optional<String> path) {
@JsonProperty("path") String path) {
Utils.checkNotNull(path, "path");
this.path = path;
}
public Location() {
this(Optional.empty());
}
@JsonIgnore
public Optional<String> path() {
public String path() {
return path;
}
@@ -42,12 +37,6 @@ public class Location {
}
public Location withPath(String path) {
Utils.checkNotNull(path, "path");
this.path = Optional.ofNullable(path);
return this;
}
public Location withPath(Optional<String> path) {
Utils.checkNotNull(path, "path");
this.path = path;
return this;
@@ -80,19 +69,13 @@ public class Location {
public final static class Builder {
private Optional<String> path = Optional.empty();
private String path;
private Builder() {
// force use of static builder() method
}
public Builder path(String path) {
Utils.checkNotNull(path, "path");
this.path = Optional.ofNullable(path);
return this;
}
public Builder path(Optional<String> path) {
Utils.checkNotNull(path, "path");
this.path = path;
return this;

File diff suppressed because it is too large Load Diff

View File

@@ -5,29 +5,95 @@
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;
import java.util.Optional;
public enum OptimizedForStreaming {
Disable(0),
Enable(1);
/**
* OptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonDeserialize(using = OptimizedForStreaming._Deserializer.class)
public class OptimizedForStreaming {
@JsonValue
private final int value;
private OptimizedForStreaming(int value) {
private TypedObject value;
private OptimizedForStreaming(TypedObject value) {
this.value = value;
}
public int value() {
return value;
public static OptimizedForStreaming of(One value) {
Utils.checkNotNull(value, "value");
return new OptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<One>(){}));
}
public static OptimizedForStreaming of(boolean value) {
Utils.checkNotNull(value, "value");
return new OptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
}
public static Optional<OptimizedForStreaming> fromValue(int value) {
for (OptimizedForStreaming o: OptimizedForStreaming.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
/**
* 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;
}
return Optional.empty();
if (o == null || getClass() != o.getClass()) {
return false;
}
OptimizedForStreaming other = (OptimizedForStreaming) 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<OptimizedForStreaming> {
public _Deserializer() {
super(OptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<One>() {}, JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(OptimizedForStreaming.class,
"value", value);
}
}

View File

@@ -24,29 +24,76 @@ import java.util.Optional;
public class Part {
@JsonProperty("id")
private int id;
/**
* 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;
/**
* The container format of the media file.
*
*/
@JsonProperty("container")
private String container;
@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;
@@ -55,112 +102,169 @@ public class Part {
@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<Boolean> optimizedForStreaming;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoProfile")
private Optional<String> videoProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("indexes")
private Optional<String> indexes;
private Optional<? extends GetRecentlyAddedOptimizedForStreaming> optimizedForStreaming;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hasThumbnail")
private Optional<? extends HasThumbnail> hasThumbnail;
/**
* An array of streams for this part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Stream")
private Optional<? extends List<Stream>> stream;
@JsonCreator
public Part(
@JsonProperty("id") int id,
@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("container") String container,
@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<Boolean> optimizedForStreaming,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("indexes") Optional<String> indexes,
@JsonProperty("optimizedForStreaming") Optional<? extends GetRecentlyAddedOptimizedForStreaming> optimizedForStreaming,
@JsonProperty("hasThumbnail") Optional<? extends HasThumbnail> hasThumbnail,
@JsonProperty("Stream") Optional<? extends List<Stream>> 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(videoProfile, "videoProfile");
Utils.checkNotNull(indexes, "indexes");
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.videoProfile = videoProfile;
this.indexes = indexes;
this.hasThumbnail = hasThumbnail;
this.stream = stream;
}
public Part(
int id,
long id,
String key,
String file,
long size,
String container) {
this(id, key, Optional.empty(), file, size, container, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
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 int id() {
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;
}
/**
* The container format of the media file.
*
* Container format of the part.
*/
@JsonIgnore
public String container() {
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;
@@ -171,19 +275,13 @@ public class Part {
return has64bitOffsets;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<Boolean> optimizedForStreaming() {
return optimizedForStreaming;
}
@JsonIgnore
public Optional<String> videoProfile() {
return videoProfile;
}
@JsonIgnore
public Optional<String> indexes() {
return indexes;
public Optional<GetRecentlyAddedOptimizedForStreaming> optimizedForStreaming() {
return (Optional<GetRecentlyAddedOptimizedForStreaming>) optimizedForStreaming;
}
@SuppressWarnings("unchecked")
@@ -192,6 +290,9 @@ public class Part {
return (Optional<HasThumbnail>) hasThumbnail;
}
/**
* An array of streams for this part.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Stream>> stream() {
@@ -202,58 +303,168 @@ public class Part {
return new Builder();
}
public Part withId(int id) {
/**
* Indicates if the part is accessible.
*/
public Part withAccessible(boolean accessible) {
Utils.checkNotNull(accessible, "accessible");
this.accessible = Optional.ofNullable(accessible);
return this;
}
/**
* Indicates if the part is accessible.
*/
public Part withAccessible(Optional<Boolean> accessible) {
Utils.checkNotNull(accessible, "accessible");
this.accessible = accessible;
return this;
}
/**
* Indicates if the part exists.
*/
public Part withExists(boolean exists) {
Utils.checkNotNull(exists, "exists");
this.exists = Optional.ofNullable(exists);
return this;
}
/**
* Indicates if the part exists.
*/
public Part withExists(Optional<Boolean> exists) {
Utils.checkNotNull(exists, "exists");
this.exists = exists;
return this;
}
/**
* Unique part identifier.
*/
public Part withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* Key to access this part.
*/
public Part withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Part withIndexes(String indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = Optional.ofNullable(indexes);
return this;
}
public Part withIndexes(Optional<String> indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = indexes;
return this;
}
/**
* Duration of the part in milliseconds.
*/
public Part withDuration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
/**
* Duration of the part in milliseconds.
*/
public Part withDuration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
/**
* File path for the part.
*/
public Part withFile(String file) {
Utils.checkNotNull(file, "file");
this.file = file;
return this;
}
/**
* File size in bytes.
*/
public Part withSize(long size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Part withPacketLength(int packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = Optional.ofNullable(packetLength);
return this;
}
public Part withPacketLength(Optional<Integer> packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = packetLength;
return this;
}
/**
* The container format of the media file.
*
* Container format of the part.
*/
public Part withContainer(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
/**
* Container format of the part.
*/
public Part withContainer(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
/**
* Video profile for the part.
*/
public Part withVideoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
/**
* Video profile for the part.
*/
public Part 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 Part 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 Part withAudioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
@@ -272,42 +483,24 @@ public class Part {
return this;
}
public Part withOptimizedForStreaming(boolean optimizedForStreaming) {
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Part withOptimizedForStreaming(GetRecentlyAddedOptimizedForStreaming optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
return this;
}
public Part withOptimizedForStreaming(Optional<Boolean> optimizedForStreaming) {
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Part withOptimizedForStreaming(Optional<? extends GetRecentlyAddedOptimizedForStreaming> optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = optimizedForStreaming;
return this;
}
public Part withVideoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
public Part withVideoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
public Part withIndexes(String indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = Optional.ofNullable(indexes);
return this;
}
public Part withIndexes(Optional<String> indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = indexes;
return this;
}
public Part withHasThumbnail(HasThumbnail hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
@@ -320,12 +513,18 @@ public class Part {
return this;
}
/**
* An array of streams for this part.
*/
public Part withStream(List<Stream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
/**
* An array of streams for this part.
*/
public Part withStream(Optional<? extends List<Stream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
@@ -342,17 +541,20 @@ public class Part {
}
Part other = (Part) 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.videoProfile, other.videoProfile) &&
Objects.deepEquals(this.indexes, other.indexes) &&
Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) &&
Objects.deepEquals(this.stream, other.stream);
}
@@ -360,17 +562,20 @@ public class Part {
@Override
public int hashCode() {
return Objects.hash(
accessible,
exists,
id,
key,
indexes,
duration,
file,
size,
packetLength,
container,
videoProfile,
audioProfile,
has64bitOffsets,
optimizedForStreaming,
videoProfile,
indexes,
hasThumbnail,
stream);
}
@@ -378,44 +583,53 @@ public class Part {
@Override
public String toString() {
return Utils.toString(Part.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,
"videoProfile", videoProfile,
"indexes", indexes,
"hasThumbnail", hasThumbnail,
"stream", stream);
}
public final static class Builder {
private Integer id;
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 String container;
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<Boolean> optimizedForStreaming = Optional.empty();
private Optional<String> videoProfile = Optional.empty();
private Optional<String> indexes = Optional.empty();
private Optional<? extends GetRecentlyAddedOptimizedForStreaming> optimizedForStreaming = Optional.empty();
private Optional<? extends HasThumbnail> hasThumbnail;
@@ -425,58 +639,168 @@ public class Part {
// force use of static builder() method
}
public Builder id(int id) {
/**
* 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;
}
/**
* The container format of the media file.
*
* 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;
@@ -495,42 +819,24 @@ public class Part {
return this;
}
public Builder optimizedForStreaming(boolean optimizedForStreaming) {
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Builder optimizedForStreaming(GetRecentlyAddedOptimizedForStreaming optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
return this;
}
public Builder optimizedForStreaming(Optional<Boolean> optimizedForStreaming) {
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Builder optimizedForStreaming(Optional<? extends GetRecentlyAddedOptimizedForStreaming> optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = optimizedForStreaming;
return this;
}
public Builder videoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
public Builder videoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
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;
}
public Builder hasThumbnail(HasThumbnail hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
@@ -543,12 +849,18 @@ public class Part {
return this;
}
/**
* An array of streams for this part.
*/
public Builder stream(List<Stream> 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<Stream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
@@ -559,17 +871,20 @@ public class Part {
if (hasThumbnail == null) {
hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value();
} return new Part(
accessible,
exists,
id,
key,
indexes,
duration,
file,
size,
packetLength,
container,
videoProfile,
audioProfile,
has64bitOffsets,
optimizedForStreaming,
videoProfile,
indexes,
hasThumbnail,
stream);
}

View File

@@ -19,38 +19,32 @@ import java.util.Optional;
public class Producer {
/**
* The unique role identifier.
* Unique identifier for the producer.
*/
@JsonProperty("id")
private long id;
/**
* The filter string for the role.
* The filter string used to query this producer.
*/
@JsonProperty("filter")
private String filter;
/**
* The actor's name.
* The name of the producer
*/
@JsonProperty("tag")
private String tag;
/**
* A key associated with the actor tag.
*/
@JsonProperty("tagKey")
private String tagKey;
/**
* The character name or role.
* A unique key associated with the producer's tag, used for internal identification.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("role")
private Optional<String> role;
@JsonProperty("tagKey")
private Optional<String> tagKey;
/**
* URL for the role thumbnail image.
* The URL of the thumbnail image for the actor.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
@@ -61,33 +55,29 @@ public class Producer {
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag,
@JsonProperty("tagKey") String tagKey,
@JsonProperty("role") Optional<String> role,
@JsonProperty("tagKey") Optional<String> tagKey,
@JsonProperty("thumb") Optional<String> thumb) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(tag, "tag");
Utils.checkNotNull(tagKey, "tagKey");
Utils.checkNotNull(role, "role");
Utils.checkNotNull(thumb, "thumb");
this.id = id;
this.filter = filter;
this.tag = tag;
this.tagKey = tagKey;
this.role = role;
this.thumb = thumb;
}
public Producer(
long id,
String filter,
String tag,
String tagKey) {
this(id, filter, tag, tagKey, Optional.empty(), Optional.empty());
String tag) {
this(id, filter, tag, Optional.empty(), Optional.empty());
}
/**
* The unique role identifier.
* Unique identifier for the producer.
*/
@JsonIgnore
public long id() {
@@ -95,7 +85,7 @@ public class Producer {
}
/**
* The filter string for the role.
* The filter string used to query this producer.
*/
@JsonIgnore
public String filter() {
@@ -103,7 +93,7 @@ public class Producer {
}
/**
* The actor's name.
* The name of the producer
*/
@JsonIgnore
public String tag() {
@@ -111,23 +101,15 @@ public class Producer {
}
/**
* A key associated with the actor tag.
* A unique key associated with the producer's tag, used for internal identification.
*/
@JsonIgnore
public String tagKey() {
public Optional<String> tagKey() {
return tagKey;
}
/**
* The character name or role.
*/
@JsonIgnore
public Optional<String> role() {
return role;
}
/**
* URL for the role thumbnail image.
* The URL of the thumbnail image for the actor.
*/
@JsonIgnore
public Optional<String> thumb() {
@@ -139,7 +121,7 @@ public class Producer {
}
/**
* The unique role identifier.
* Unique identifier for the producer.
*/
public Producer withId(long id) {
Utils.checkNotNull(id, "id");
@@ -148,7 +130,7 @@ public class Producer {
}
/**
* The filter string for the role.
* The filter string used to query this producer.
*/
public Producer withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
@@ -157,7 +139,7 @@ public class Producer {
}
/**
* The actor's name.
* The name of the producer
*/
public Producer withTag(String tag) {
Utils.checkNotNull(tag, "tag");
@@ -166,34 +148,25 @@ public class Producer {
}
/**
* A key associated with the actor tag.
* A unique key associated with the producer's tag, used for internal identification.
*/
public Producer withTagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = Optional.ofNullable(tagKey);
return this;
}
/**
* A unique key associated with the producer's tag, used for internal identification.
*/
public Producer withTagKey(Optional<String> tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = tagKey;
return this;
}
/**
* The character name or role.
*/
public Producer withRole(String role) {
Utils.checkNotNull(role, "role");
this.role = Optional.ofNullable(role);
return this;
}
/**
* The character name or role.
*/
public Producer withRole(Optional<String> role) {
Utils.checkNotNull(role, "role");
this.role = role;
return this;
}
/**
* URL for the role thumbnail image.
* The URL of the thumbnail image for the actor.
*/
public Producer withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
@@ -202,7 +175,7 @@ public class Producer {
}
/**
* URL for the role thumbnail image.
* The URL of the thumbnail image for the actor.
*/
public Producer withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
@@ -224,7 +197,6 @@ public class Producer {
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.tag, other.tag) &&
Objects.deepEquals(this.tagKey, other.tagKey) &&
Objects.deepEquals(this.role, other.role) &&
Objects.deepEquals(this.thumb, other.thumb);
}
@@ -235,7 +207,6 @@ public class Producer {
filter,
tag,
tagKey,
role,
thumb);
}
@@ -246,7 +217,6 @@ public class Producer {
"filter", filter,
"tag", tag,
"tagKey", tagKey,
"role", role,
"thumb", thumb);
}
@@ -258,9 +228,7 @@ public class Producer {
private String tag;
private String tagKey;
private Optional<String> role = Optional.empty();
private Optional<String> tagKey = Optional.empty();
private Optional<String> thumb = Optional.empty();
@@ -269,7 +237,7 @@ public class Producer {
}
/**
* The unique role identifier.
* Unique identifier for the producer.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
@@ -278,7 +246,7 @@ public class Producer {
}
/**
* The filter string for the role.
* The filter string used to query this producer.
*/
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
@@ -287,7 +255,7 @@ public class Producer {
}
/**
* The actor's name.
* The name of the producer
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
@@ -296,34 +264,25 @@ public class Producer {
}
/**
* A key associated with the actor tag.
* A unique key associated with the producer's tag, used for internal identification.
*/
public Builder tagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = Optional.ofNullable(tagKey);
return this;
}
/**
* A unique key associated with the producer's tag, used for internal identification.
*/
public Builder tagKey(Optional<String> tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = tagKey;
return this;
}
/**
* The character name or role.
*/
public Builder role(String role) {
Utils.checkNotNull(role, "role");
this.role = Optional.ofNullable(role);
return this;
}
/**
* The character name or role.
*/
public Builder role(Optional<String> role) {
Utils.checkNotNull(role, "role");
this.role = role;
return this;
}
/**
* URL for the role thumbnail image.
* The URL of the thumbnail image for the actor.
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
@@ -332,7 +291,7 @@ public class Producer {
}
/**
* URL for the role thumbnail image.
* The URL of the thumbnail image for the actor.
*/
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
@@ -346,7 +305,6 @@ public class Producer {
filter,
tag,
tagKey,
role,
thumb);
}
}

View File

@@ -8,35 +8,29 @@ 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.Float;
import java.lang.Double;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
/**
* Rating - The type of rating, for example 'audience' or 'critic'.
*/
public class GetLibraryItemsMetaDataRating {
public class Rating {
/**
* A URI or path to the rating image.
*/
@JsonProperty("image")
private String image;
/**
* The value of the rating.
*/
@JsonProperty("value")
private float value;
private double value;
/**
* The type of rating (e.g., audience, critic).
*/
@JsonProperty("type")
private String type;
@JsonCreator
public GetLibraryItemsMetaDataRating(
public Rating(
@JsonProperty("image") String image,
@JsonProperty("value") float value,
@JsonProperty("value") double value,
@JsonProperty("type") String type) {
Utils.checkNotNull(image, "image");
Utils.checkNotNull(value, "value");
@@ -46,25 +40,16 @@ public class GetLibraryItemsMetaDataRating {
this.type = type;
}
/**
* A URI or path to the rating image.
*/
@JsonIgnore
public String image() {
return image;
}
/**
* The value of the rating.
*/
@JsonIgnore
public float value() {
public double value() {
return value;
}
/**
* The type of rating (e.g., audience, critic).
*/
@JsonIgnore
public String type() {
return type;
@@ -74,28 +59,19 @@ public class GetLibraryItemsMetaDataRating {
return new Builder();
}
/**
* A URI or path to the rating image.
*/
public GetLibraryItemsMetaDataRating withImage(String image) {
public Rating withImage(String image) {
Utils.checkNotNull(image, "image");
this.image = image;
return this;
}
/**
* The value of the rating.
*/
public GetLibraryItemsMetaDataRating withValue(float value) {
public Rating withValue(double value) {
Utils.checkNotNull(value, "value");
this.value = value;
return this;
}
/**
* The type of rating (e.g., audience, critic).
*/
public GetLibraryItemsMetaDataRating withType(String type) {
public Rating withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
@@ -109,7 +85,7 @@ public class GetLibraryItemsMetaDataRating {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryItemsMetaDataRating other = (GetLibraryItemsMetaDataRating) o;
Rating other = (Rating) o;
return
Objects.deepEquals(this.image, other.image) &&
Objects.deepEquals(this.value, other.value) &&
@@ -126,7 +102,7 @@ public class GetLibraryItemsMetaDataRating {
@Override
public String toString() {
return Utils.toString(GetLibraryItemsMetaDataRating.class,
return Utils.toString(Rating.class,
"image", image,
"value", value,
"type", type);
@@ -136,7 +112,7 @@ public class GetLibraryItemsMetaDataRating {
private String image;
private Float value;
private Double value;
private String type;
@@ -144,35 +120,26 @@ public class GetLibraryItemsMetaDataRating {
// force use of static builder() method
}
/**
* A URI or path to the rating image.
*/
public Builder image(String image) {
Utils.checkNotNull(image, "image");
this.image = image;
return this;
}
/**
* The value of the rating.
*/
public Builder value(float value) {
public Builder value(double value) {
Utils.checkNotNull(value, "value");
this.value = value;
return this;
}
/**
* The type of rating (e.g., audience, critic).
*/
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetLibraryItemsMetaDataRating build() {
return new GetLibraryItemsMetaDataRating(
public Rating build() {
return new Rating(
image,
value,
type);

View File

@@ -19,107 +19,99 @@ import java.util.Optional;
public class Role {
/**
* The ID of the tag or actor.
* Unique identifier for the actor or role.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private Optional<Long> id;
private long id;
/**
* The filter used to find the actor or tag.
* The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("filter")
private Optional<String> filter;
private String filter;
/**
* The thumbnail of the actor
* The display tag for the actor (typically the actor's name).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
private Optional<String> thumb;
/**
* The name of the tag or actor.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("tag")
private Optional<String> tag;
private String tag;
/**
* Unique identifier for the tag.
* A unique key associated with the actor's tag, used for internal identification.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("tagKey")
private Optional<String> tagKey;
/**
* The role of the actor or tag in the media.
* The role played by the actor in the media item.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("role")
private Optional<String> role;
/**
* The URL of the thumbnail image for the actor.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
private Optional<String> thumb;
@JsonCreator
public Role(
@JsonProperty("id") Optional<Long> id,
@JsonProperty("filter") Optional<String> filter,
@JsonProperty("thumb") Optional<String> thumb,
@JsonProperty("tag") Optional<String> tag,
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag,
@JsonProperty("tagKey") Optional<String> tagKey,
@JsonProperty("role") Optional<String> role) {
@JsonProperty("role") Optional<String> role,
@JsonProperty("thumb") Optional<String> thumb) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(thumb, "thumb");
Utils.checkNotNull(tag, "tag");
Utils.checkNotNull(tagKey, "tagKey");
Utils.checkNotNull(role, "role");
Utils.checkNotNull(thumb, "thumb");
this.id = id;
this.filter = filter;
this.thumb = thumb;
this.tag = tag;
this.tagKey = tagKey;
this.role = role;
this.thumb = thumb;
}
public Role() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
public Role(
long id,
String filter,
String tag) {
this(id, filter, tag, Optional.empty(), Optional.empty(), Optional.empty());
}
/**
* The ID of the tag or actor.
* Unique identifier for the actor or role.
*/
@JsonIgnore
public Optional<Long> id() {
public long id() {
return id;
}
/**
* The filter used to find the actor or tag.
* The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
*/
@JsonIgnore
public Optional<String> filter() {
public String filter() {
return filter;
}
/**
* The thumbnail of the actor
* The display tag for the actor (typically the actor's name).
*/
@JsonIgnore
public Optional<String> thumb() {
return thumb;
}
/**
* The name of the tag or actor.
*/
@JsonIgnore
public Optional<String> tag() {
public String tag() {
return tag;
}
/**
* Unique identifier for the tag.
* A unique key associated with the actor's tag, used for internal identification.
*/
@JsonIgnore
public Optional<String> tagKey() {
@@ -127,91 +119,54 @@ public class Role {
}
/**
* The role of the actor or tag in the media.
* The role played by the actor in the media item.
*/
@JsonIgnore
public Optional<String> role() {
return role;
}
/**
* The URL of the thumbnail image for the actor.
*/
@JsonIgnore
public Optional<String> thumb() {
return thumb;
}
public final static Builder builder() {
return new Builder();
}
/**
* The ID of the tag or actor.
* Unique identifier for the actor or role.
*/
public Role withId(long id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
/**
* The ID of the tag or actor.
*/
public Role withId(Optional<Long> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter used to find the actor or tag.
* The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
*/
public Role withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.ofNullable(filter);
return this;
}
/**
* The filter used to find the actor or tag.
*/
public Role withFilter(Optional<String> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The thumbnail of the actor
*/
public Role withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
/**
* The thumbnail of the actor
*/
public Role withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The name of the tag or actor.
* The display tag for the actor (typically the actor's name).
*/
public Role withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
return this;
}
/**
* The name of the tag or actor.
*/
public Role withTag(Optional<String> tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
/**
* Unique identifier for the tag.
* A unique key associated with the actor's tag, used for internal identification.
*/
public Role withTagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
@@ -220,7 +175,7 @@ public class Role {
}
/**
* Unique identifier for the tag.
* A unique key associated with the actor's tag, used for internal identification.
*/
public Role withTagKey(Optional<String> tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
@@ -229,7 +184,7 @@ public class Role {
}
/**
* The role of the actor or tag in the media.
* The role played by the actor in the media item.
*/
public Role withRole(String role) {
Utils.checkNotNull(role, "role");
@@ -238,13 +193,31 @@ public class Role {
}
/**
* The role of the actor or tag in the media.
* The role played by the actor in the media item.
*/
public Role withRole(Optional<String> role) {
Utils.checkNotNull(role, "role");
this.role = role;
return this;
}
/**
* The URL of the thumbnail image for the actor.
*/
public Role withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
/**
* The URL of the thumbnail image for the actor.
*/
public Role withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -258,10 +231,10 @@ public class Role {
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.thumb, other.thumb) &&
Objects.deepEquals(this.tag, other.tag) &&
Objects.deepEquals(this.tagKey, other.tagKey) &&
Objects.deepEquals(this.role, other.role);
Objects.deepEquals(this.role, other.role) &&
Objects.deepEquals(this.thumb, other.thumb);
}
@Override
@@ -269,10 +242,10 @@ public class Role {
return Objects.hash(
id,
filter,
thumb,
tag,
tagKey,
role);
role,
thumb);
}
@Override
@@ -280,104 +253,59 @@ public class Role {
return Utils.toString(Role.class,
"id", id,
"filter", filter,
"thumb", thumb,
"tag", tag,
"tagKey", tagKey,
"role", role);
"role", role,
"thumb", thumb);
}
public final static class Builder {
private Optional<Long> id = Optional.empty();
private Long id;
private Optional<String> filter = Optional.empty();
private String filter;
private Optional<String> thumb = Optional.empty();
private Optional<String> tag = Optional.empty();
private String tag;
private Optional<String> tagKey = Optional.empty();
private Optional<String> role = Optional.empty();
private Optional<String> role = Optional.empty();
private Optional<String> thumb = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* The ID of the tag or actor.
* Unique identifier for the actor or role.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
/**
* The ID of the tag or actor.
*/
public Builder id(Optional<Long> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter used to find the actor or tag.
* The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
*/
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.ofNullable(filter);
return this;
}
/**
* The filter used to find the actor or tag.
*/
public Builder filter(Optional<String> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The thumbnail of the actor
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
/**
* The thumbnail of the actor
*/
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The name of the tag or actor.
* The display tag for the actor (typically the actor's name).
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
return this;
}
/**
* The name of the tag or actor.
*/
public Builder tag(Optional<String> tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
/**
* Unique identifier for the tag.
* A unique key associated with the actor's tag, used for internal identification.
*/
public Builder tagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
@@ -386,7 +314,7 @@ public class Role {
}
/**
* Unique identifier for the tag.
* A unique key associated with the actor's tag, used for internal identification.
*/
public Builder tagKey(Optional<String> tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
@@ -395,7 +323,7 @@ public class Role {
}
/**
* The role of the actor or tag in the media.
* The role played by the actor in the media item.
*/
public Builder role(String role) {
Utils.checkNotNull(role, "role");
@@ -404,22 +332,40 @@ public class Role {
}
/**
* The role of the actor or tag in the media.
* The role played by the actor in the media item.
*/
public Builder role(Optional<String> role) {
Utils.checkNotNull(role, "role");
this.role = role;
return this;
}
/**
* The URL of the thumbnail image for the actor.
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
/**
* The URL of the thumbnail image for the actor.
*/
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public Role build() {
return new Role(
id,
filter,
thumb,
tag,
tagKey,
role);
role,
thumb);
}
}
}

View File

@@ -336,11 +336,6 @@ public class SDKMethodInterfaces {
}
public interface MethodCallGetOnDeck {
GetOnDeckResponse getOnDeckDirect() throws Exception;
}
public interface MethodCallGetWatchList {
GetWatchListResponse getWatchList(
GetWatchListRequest request,

View File

@@ -12,24 +12,18 @@ import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
/**
* Similar - The display tag for the similar item, typically the title.
*/
public class Similar {
/**
* The unique similar item identifier.
*/
@JsonProperty("id")
private long id;
/**
* The filter string for similar items.
*/
@JsonProperty("filter")
private String filter;
/**
* The tag or title of the similar content.
*/
@JsonProperty("tag")
private String tag;
@@ -46,25 +40,16 @@ public class Similar {
this.tag = tag;
}
/**
* The unique similar item identifier.
*/
@JsonIgnore
public long id() {
return id;
}
/**
* The filter string for similar items.
*/
@JsonIgnore
public String filter() {
return filter;
}
/**
* The tag or title of the similar content.
*/
@JsonIgnore
public String tag() {
return tag;
@@ -74,27 +59,18 @@ public class Similar {
return new Builder();
}
/**
* The unique similar item identifier.
*/
public Similar withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter string for similar items.
*/
public Similar withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The tag or title of the similar content.
*/
public Similar withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
@@ -144,27 +120,18 @@ public class Similar {
// force use of static builder() method
}
/**
* The unique similar item identifier.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* The filter string for similar items.
*/
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The tag or title of the similar content.
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -17,41 +18,134 @@ import java.util.Optional;
public class Writer {
@JsonInclude(Include.NON_ABSENT)
/**
* Unique identifier for the writer.
*/
@JsonProperty("id")
private long id;
/**
* The filter string used to query this writer.
*/
@JsonProperty("filter")
private String filter;
/**
* The role of Writer
*/
@JsonProperty("tag")
private Optional<String> tag;
private String tag;
/**
* A unique key associated with the writers tag, used for internal identification.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("tagKey")
private Optional<String> tagKey;
@JsonCreator
public Writer(
@JsonProperty("tag") Optional<String> tag) {
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag,
@JsonProperty("tagKey") Optional<String> tagKey) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(tag, "tag");
Utils.checkNotNull(tagKey, "tagKey");
this.id = id;
this.filter = filter;
this.tag = tag;
this.tagKey = tagKey;
}
public Writer() {
this(Optional.empty());
public Writer(
long id,
String filter,
String tag) {
this(id, filter, tag, Optional.empty());
}
/**
* Unique identifier for the writer.
*/
@JsonIgnore
public Optional<String> tag() {
public long id() {
return id;
}
/**
* The filter string used to query this writer.
*/
@JsonIgnore
public String filter() {
return filter;
}
/**
* The role of Writer
*/
@JsonIgnore
public String tag() {
return tag;
}
/**
* A unique key associated with the writers tag, used for internal identification.
*/
@JsonIgnore
public Optional<String> tagKey() {
return tagKey;
}
public final static Builder builder() {
return new Builder();
}
public Writer withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
/**
* Unique identifier for the writer.
*/
public Writer withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Writer withTag(Optional<String> tag) {
/**
* The filter string used to query this writer.
*/
public Writer withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The role of Writer
*/
public Writer withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
/**
* A unique key associated with the writers tag, used for internal identification.
*/
public Writer withTagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = Optional.ofNullable(tagKey);
return this;
}
/**
* A unique key associated with the writers tag, used for internal identification.
*/
public Writer withTagKey(Optional<String> tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = tagKey;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -63,44 +157,95 @@ public class Writer {
}
Writer other = (Writer) o;
return
Objects.deepEquals(this.tag, other.tag);
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.tag, other.tag) &&
Objects.deepEquals(this.tagKey, other.tagKey);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
id,
filter,
tag,
tagKey);
}
@Override
public String toString() {
return Utils.toString(Writer.class,
"tag", tag);
"id", id,
"filter", filter,
"tag", tag,
"tagKey", tagKey);
}
public final static class Builder {
private Optional<String> tag = Optional.empty();
private Long id;
private String filter;
private String tag;
private Optional<String> tagKey = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = Optional.ofNullable(tag);
/**
* Unique identifier for the writer.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Builder tag(Optional<String> tag) {
/**
* The filter string used to query this writer.
*/
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The role of Writer
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
/**
* A unique key associated with the writers tag, used for internal identification.
*/
public Builder tagKey(String tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = Optional.ofNullable(tagKey);
return this;
}
/**
* A unique key associated with the writers tag, used for internal identification.
*/
public Builder tagKey(Optional<String> tagKey) {
Utils.checkNotNull(tagKey, "tagKey");
this.tagKey = tagKey;
return this;
}
public Writer build() {
return new Writer(
tag);
id,
filter,
tag,
tagKey);
}
}
}