mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 04:20:49 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.557.0
This commit is contained in:
@@ -21,8 +21,8 @@ public 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.17.0";
|
||||
public static final String GEN_VERSION = "2.620.2";
|
||||
public static final String SDK_VERSION = "0.17.1";
|
||||
public static final String GEN_VERSION = "2.623.0";
|
||||
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
|
||||
public static final String USER_AGENT =
|
||||
String.format("speakeasy-sdk/%s %s %s %s %s",
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* EnableCreditsMarkerGeneration
|
||||
*
|
||||
* <p>Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
*/
|
||||
@JsonDeserialize(using = EnableCreditsMarkerGeneration._Deserializer.class)
|
||||
@JsonSerialize(using = EnableCreditsMarkerGeneration._Serializer.class)
|
||||
public class EnableCreditsMarkerGeneration {
|
||||
|
||||
public static final EnableCreditsMarkerGeneration LibraryDefault = new EnableCreditsMarkerGeneration("-1");
|
||||
public static final EnableCreditsMarkerGeneration Disabled = new EnableCreditsMarkerGeneration("0");
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, EnableCreditsMarkerGeneration> values = createValuesMap();
|
||||
private static final Map<String, EnableCreditsMarkerGenerationEnum> enums = createEnumsMap();
|
||||
|
||||
private final String value;
|
||||
|
||||
private EnableCreditsMarkerGeneration(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a EnableCreditsMarkerGeneration with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as EnableCreditsMarkerGeneration
|
||||
*/
|
||||
public static EnableCreditsMarkerGeneration of(String value) {
|
||||
synchronized (EnableCreditsMarkerGeneration.class) {
|
||||
return values.computeIfAbsent(value, v -> new EnableCreditsMarkerGeneration(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<EnableCreditsMarkerGenerationEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
EnableCreditsMarkerGeneration other = (EnableCreditsMarkerGeneration) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnableCreditsMarkerGeneration [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static EnableCreditsMarkerGeneration[] values() {
|
||||
synchronized (EnableCreditsMarkerGeneration.class) {
|
||||
return values.values().toArray(new EnableCreditsMarkerGeneration[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, EnableCreditsMarkerGeneration> createValuesMap() {
|
||||
Map<String, EnableCreditsMarkerGeneration> map = new LinkedHashMap<>();
|
||||
map.put("-1", LibraryDefault);
|
||||
map.put("0", Disabled);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, EnableCreditsMarkerGenerationEnum> createEnumsMap() {
|
||||
Map<String, EnableCreditsMarkerGenerationEnum> map = new HashMap<>();
|
||||
map.put("-1", EnableCreditsMarkerGenerationEnum.LibraryDefault);
|
||||
map.put("0", EnableCreditsMarkerGenerationEnum.Disabled);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<EnableCreditsMarkerGeneration> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(EnableCreditsMarkerGeneration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(EnableCreditsMarkerGeneration value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<EnableCreditsMarkerGeneration> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(EnableCreditsMarkerGeneration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnableCreditsMarkerGeneration deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return EnableCreditsMarkerGeneration.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum EnableCreditsMarkerGenerationEnum {
|
||||
|
||||
LibraryDefault("-1"),
|
||||
Disabled("0"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private EnableCreditsMarkerGenerationEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* EpisodeSort
|
||||
*
|
||||
* <p>Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
*/
|
||||
@JsonDeserialize(using = EpisodeSort._Deserializer.class)
|
||||
@JsonSerialize(using = EpisodeSort._Serializer.class)
|
||||
public class EpisodeSort {
|
||||
|
||||
public static final EpisodeSort LibraryDefault = new EpisodeSort("-1");
|
||||
public static final EpisodeSort OldestFirst = new EpisodeSort("0");
|
||||
public static final EpisodeSort NewestFirst = new EpisodeSort("1");
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, EpisodeSort> values = createValuesMap();
|
||||
private static final Map<String, EpisodeSortEnum> enums = createEnumsMap();
|
||||
|
||||
private final String value;
|
||||
|
||||
private EpisodeSort(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a EpisodeSort with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as EpisodeSort
|
||||
*/
|
||||
public static EpisodeSort of(String value) {
|
||||
synchronized (EpisodeSort.class) {
|
||||
return values.computeIfAbsent(value, v -> new EpisodeSort(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<EpisodeSortEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
EpisodeSort other = (EpisodeSort) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EpisodeSort [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static EpisodeSort[] values() {
|
||||
synchronized (EpisodeSort.class) {
|
||||
return values.values().toArray(new EpisodeSort[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, EpisodeSort> createValuesMap() {
|
||||
Map<String, EpisodeSort> map = new LinkedHashMap<>();
|
||||
map.put("-1", LibraryDefault);
|
||||
map.put("0", OldestFirst);
|
||||
map.put("1", NewestFirst);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, EpisodeSortEnum> createEnumsMap() {
|
||||
Map<String, EpisodeSortEnum> map = new HashMap<>();
|
||||
map.put("-1", EpisodeSortEnum.LibraryDefault);
|
||||
map.put("0", EpisodeSortEnum.OldestFirst);
|
||||
map.put("1", EpisodeSortEnum.NewestFirst);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<EpisodeSort> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(EpisodeSort.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(EpisodeSort value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<EpisodeSort> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(EpisodeSort.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EpisodeSort deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return EpisodeSort.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum EpisodeSortEnum {
|
||||
|
||||
LibraryDefault("-1"),
|
||||
OldestFirst("0"),
|
||||
NewestFirst("1"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private EpisodeSortEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,8 +90,9 @@ public class GetActorsLibraryMediaContainer {
|
||||
/**
|
||||
* Identifier for the view mode.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("viewMode")
|
||||
private String viewMode;
|
||||
private Optional<String> viewMode;
|
||||
|
||||
/**
|
||||
* An array of actor entries for media items.
|
||||
@@ -113,7 +114,7 @@ public class GetActorsLibraryMediaContainer {
|
||||
@JsonProperty("title1") String title1,
|
||||
@JsonProperty("title2") String title2,
|
||||
@JsonProperty("viewGroup") String viewGroup,
|
||||
@JsonProperty("viewMode") String viewMode,
|
||||
@JsonProperty("viewMode") Optional<String> viewMode,
|
||||
@JsonProperty("Directory") Optional<? extends List<GetActorsLibraryDirectory>> directory) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
@@ -154,9 +155,8 @@ public class GetActorsLibraryMediaContainer {
|
||||
String thumb,
|
||||
String title1,
|
||||
String title2,
|
||||
String viewGroup,
|
||||
String viewMode) {
|
||||
this(size, allowSync, art, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, viewMode, Optional.empty());
|
||||
String viewGroup) {
|
||||
this(size, allowSync, art, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,7 +251,7 @@ public class GetActorsLibraryMediaContainer {
|
||||
* Identifier for the view mode.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String viewMode() {
|
||||
public Optional<String> viewMode() {
|
||||
return viewMode;
|
||||
}
|
||||
|
||||
@@ -371,6 +371,15 @@ public class GetActorsLibraryMediaContainer {
|
||||
* Identifier for the view mode.
|
||||
*/
|
||||
public GetActorsLibraryMediaContainer withViewMode(String viewMode) {
|
||||
Utils.checkNotNull(viewMode, "viewMode");
|
||||
this.viewMode = Optional.ofNullable(viewMode);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier for the view mode.
|
||||
*/
|
||||
public GetActorsLibraryMediaContainer withViewMode(Optional<String> viewMode) {
|
||||
Utils.checkNotNull(viewMode, "viewMode");
|
||||
this.viewMode = viewMode;
|
||||
return this;
|
||||
@@ -480,7 +489,7 @@ public class GetActorsLibraryMediaContainer {
|
||||
|
||||
private String viewGroup;
|
||||
|
||||
private String viewMode;
|
||||
private Optional<String> viewMode = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetActorsLibraryDirectory>> directory = Optional.empty();
|
||||
|
||||
@@ -591,6 +600,15 @@ public class GetActorsLibraryMediaContainer {
|
||||
* Identifier for the view mode.
|
||||
*/
|
||||
public Builder viewMode(String viewMode) {
|
||||
Utils.checkNotNull(viewMode, "viewMode");
|
||||
this.viewMode = Optional.ofNullable(viewMode);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier for the view mode.
|
||||
*/
|
||||
public Builder viewMode(Optional<String> viewMode) {
|
||||
Utils.checkNotNull(viewMode, "viewMode");
|
||||
this.viewMode = viewMode;
|
||||
return this;
|
||||
|
||||
@@ -5,34 +5,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 GetLibraryItemsCollection {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* The user-made collection this media item belongs to
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsCollection(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("tag") String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public GetLibraryItemsCollection() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The user-made collection this media item belongs to
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -40,13 +38,10 @@ public class GetLibraryItemsCollection {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The user-made collection this media item belongs to
|
||||
*/
|
||||
public GetLibraryItemsCollection withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsCollection withTag(Optional<String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -80,19 +75,16 @@ public class GetLibraryItemsCollection {
|
||||
|
||||
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;
|
||||
|
||||
@@ -5,34 +5,52 @@ 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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsCountry {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsCountry(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public GetLibraryItemsCountry() {
|
||||
this(Optional.empty());
|
||||
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -40,13 +58,20 @@ public class GetLibraryItemsCountry {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsCountry withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public GetLibraryItemsCountry withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsCountry withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
*/
|
||||
public GetLibraryItemsCountry withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -63,36 +88,48 @@ public class GetLibraryItemsCountry {
|
||||
}
|
||||
GetLibraryItemsCountry other = (GetLibraryItemsCountry) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsCountry.class,
|
||||
"id", id,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
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);
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public Builder id(int 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;
|
||||
@@ -100,6 +137,7 @@ public class GetLibraryItemsCountry {
|
||||
|
||||
public GetLibraryItemsCountry build() {
|
||||
return new GetLibraryItemsCountry(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -16,42 +17,108 @@ import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsDirector {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* Unique identifier for the director.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsDirector(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@JsonProperty("thumb") Optional<String> thumb) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public GetLibraryItemsDirector() {
|
||||
this(Optional.empty());
|
||||
public GetLibraryItemsDirector(
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the director.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsDirector withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* Unique identifier for the director.
|
||||
*/
|
||||
public GetLibraryItemsDirector withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsDirector withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
public GetLibraryItemsDirector withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public GetLibraryItemsDirector withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public GetLibraryItemsDirector withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -63,44 +130,80 @@ public class GetLibraryItemsDirector {
|
||||
}
|
||||
GetLibraryItemsDirector other = (GetLibraryItemsDirector) o;
|
||||
return
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag) &&
|
||||
Objects.deepEquals(this.thumb, other.thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsDirector.class,
|
||||
"tag", tag);
|
||||
"id", id,
|
||||
"tag", tag,
|
||||
"thumb", thumb);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
private String tag;
|
||||
|
||||
private Optional<String> thumb = 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 director.
|
||||
*/
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsDirector build() {
|
||||
return new GetLibraryItemsDirector(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,11 @@ package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsFilter {
|
||||
|
||||
@@ -32,39 +28,23 @@ public class GetLibraryItemsFilter {
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("advanced")
|
||||
private Optional<Boolean> advanced;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsFilter(
|
||||
@JsonProperty("filter") String filter,
|
||||
@JsonProperty("filterType") String filterType,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("advanced") Optional<Boolean> advanced) {
|
||||
@JsonProperty("type") String type) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(advanced, "advanced");
|
||||
this.filter = filter;
|
||||
this.filterType = filterType;
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
this.type = type;
|
||||
this.advanced = advanced;
|
||||
}
|
||||
|
||||
public GetLibraryItemsFilter(
|
||||
String filter,
|
||||
String filterType,
|
||||
String key,
|
||||
String title,
|
||||
String type) {
|
||||
this(filter, filterType, key, title, type, Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@@ -92,11 +72,6 @@ public class GetLibraryItemsFilter {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Boolean> advanced() {
|
||||
return advanced;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
@@ -131,18 +106,6 @@ public class GetLibraryItemsFilter {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsFilter withAdvanced(boolean advanced) {
|
||||
Utils.checkNotNull(advanced, "advanced");
|
||||
this.advanced = Optional.ofNullable(advanced);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsFilter withAdvanced(Optional<Boolean> advanced) {
|
||||
Utils.checkNotNull(advanced, "advanced");
|
||||
this.advanced = advanced;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -158,8 +121,7 @@ public class GetLibraryItemsFilter {
|
||||
Objects.deepEquals(this.filterType, other.filterType) &&
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.title, other.title) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.advanced, other.advanced);
|
||||
Objects.deepEquals(this.type, other.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -169,8 +131,7 @@ public class GetLibraryItemsFilter {
|
||||
filterType,
|
||||
key,
|
||||
title,
|
||||
type,
|
||||
advanced);
|
||||
type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -180,8 +141,7 @@ public class GetLibraryItemsFilter {
|
||||
"filterType", filterType,
|
||||
"key", key,
|
||||
"title", title,
|
||||
"type", type,
|
||||
"advanced", advanced);
|
||||
"type", type);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
@@ -195,8 +155,6 @@ public class GetLibraryItemsFilter {
|
||||
private String title;
|
||||
|
||||
private String type;
|
||||
|
||||
private Optional<Boolean> advanced = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
@@ -231,18 +189,6 @@ public class GetLibraryItemsFilter {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder advanced(boolean advanced) {
|
||||
Utils.checkNotNull(advanced, "advanced");
|
||||
this.advanced = Optional.ofNullable(advanced);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder advanced(Optional<Boolean> advanced) {
|
||||
Utils.checkNotNull(advanced, "advanced");
|
||||
this.advanced = advanced;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsFilter build() {
|
||||
return new GetLibraryItemsFilter(
|
||||
@@ -250,8 +196,7 @@ public class GetLibraryItemsFilter {
|
||||
filterType,
|
||||
key,
|
||||
title,
|
||||
type,
|
||||
advanced);
|
||||
type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,34 +5,52 @@ 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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsGenre {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsGenre(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public GetLibraryItemsGenre() {
|
||||
this(Optional.empty());
|
||||
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -40,13 +58,20 @@ public class GetLibraryItemsGenre {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsGenre withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public GetLibraryItemsGenre withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsGenre withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
public GetLibraryItemsGenre withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -63,36 +88,48 @@ public class GetLibraryItemsGenre {
|
||||
}
|
||||
GetLibraryItemsGenre other = (GetLibraryItemsGenre) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsGenre.class,
|
||||
"id", id,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
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);
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<String> tag) {
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -100,6 +137,7 @@ public class GetLibraryItemsGenre {
|
||||
|
||||
public GetLibraryItemsGenre build() {
|
||||
return new GetLibraryItemsGenre(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,25 +11,23 @@ import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
|
||||
public class MediaGuid {
|
||||
public class GetLibraryItemsGuids {
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
@JsonCreator
|
||||
public MediaGuid(
|
||||
public GetLibraryItemsGuids(
|
||||
@JsonProperty("id") String id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String id() {
|
||||
@@ -41,10 +39,9 @@ public class MediaGuid {
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
public MediaGuid withId(String id) {
|
||||
public GetLibraryItemsGuids withId(String id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -59,7 +56,7 @@ public class MediaGuid {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
MediaGuid other = (MediaGuid) o;
|
||||
GetLibraryItemsGuids other = (GetLibraryItemsGuids) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id);
|
||||
}
|
||||
@@ -72,7 +69,7 @@ public class MediaGuid {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(MediaGuid.class,
|
||||
return Utils.toString(GetLibraryItemsGuids.class,
|
||||
"id", id);
|
||||
}
|
||||
|
||||
@@ -85,8 +82,7 @@ public class MediaGuid {
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
public Builder id(String id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
@@ -94,8 +90,8 @@ public class MediaGuid {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MediaGuid build() {
|
||||
return new MediaGuid(
|
||||
public GetLibraryItemsGuids build() {
|
||||
return new GetLibraryItemsGuids(
|
||||
id);
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,11 @@ import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetLibraryItemsHasThumbnail
|
||||
*
|
||||
* <p>Indicates if the part has a thumbnail.
|
||||
*/
|
||||
public enum GetLibraryItemsHasThumbnail {
|
||||
False("0"),
|
||||
True("1");
|
||||
|
||||
@@ -17,7 +17,7 @@ public class GetLibraryItemsImage {
|
||||
private String alt;
|
||||
|
||||
@JsonProperty("type")
|
||||
private GetLibraryItemsLibraryResponse200Type type;
|
||||
private GetLibraryItemsLibraryResponseType type;
|
||||
|
||||
@JsonProperty("url")
|
||||
private String url;
|
||||
@@ -25,7 +25,7 @@ public class GetLibraryItemsImage {
|
||||
@JsonCreator
|
||||
public GetLibraryItemsImage(
|
||||
@JsonProperty("alt") String alt,
|
||||
@JsonProperty("type") GetLibraryItemsLibraryResponse200Type type,
|
||||
@JsonProperty("type") GetLibraryItemsLibraryResponseType type,
|
||||
@JsonProperty("url") String url) {
|
||||
Utils.checkNotNull(alt, "alt");
|
||||
Utils.checkNotNull(type, "type");
|
||||
@@ -41,7 +41,7 @@ public class GetLibraryItemsImage {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public GetLibraryItemsLibraryResponse200Type type() {
|
||||
public GetLibraryItemsLibraryResponseType type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetLibraryItemsImage {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponse200Type type) {
|
||||
public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponseType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
@@ -108,7 +108,7 @@ public class GetLibraryItemsImage {
|
||||
|
||||
private String alt;
|
||||
|
||||
private GetLibraryItemsLibraryResponse200Type type;
|
||||
private GetLibraryItemsLibraryResponseType type;
|
||||
|
||||
private String url;
|
||||
|
||||
@@ -122,7 +122,7 @@ public class GetLibraryItemsImage {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(GetLibraryItemsLibraryResponse200Type type) {
|
||||
public Builder type(GetLibraryItemsLibraryResponseType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
|
||||
@@ -1,40 +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;
|
||||
|
||||
/**
|
||||
* GetLibraryItemsLibraryActiveDirection
|
||||
*
|
||||
* <p>The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public enum GetLibraryItemsLibraryActiveDirection {
|
||||
Ascending("asc"),
|
||||
Descending("desc");
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsLibraryActiveDirection(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetLibraryItemsLibraryActiveDirection> fromValue(String value) {
|
||||
for (GetLibraryItemsLibraryActiveDirection o: GetLibraryItemsLibraryActiveDirection.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +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;
|
||||
|
||||
/**
|
||||
* GetLibraryItemsLibraryDefaultDirection
|
||||
*
|
||||
* <p>The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public enum GetLibraryItemsLibraryDefaultDirection {
|
||||
Ascending("asc"),
|
||||
Descending("desc");
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsLibraryDefaultDirection(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetLibraryItemsLibraryDefaultDirection> fromValue(String value) {
|
||||
for (GetLibraryItemsLibraryDefaultDirection o: GetLibraryItemsLibraryDefaultDirection.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,196 +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.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsLibraryField {
|
||||
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("subType")
|
||||
private Optional<String> subType;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibraryField(
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("subType") Optional<String> subType) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
this.type = type;
|
||||
this.subType = subType;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField(
|
||||
String key,
|
||||
String title,
|
||||
String type) {
|
||||
this(key, title, type, Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> subType() {
|
||||
return subType;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField withSubType(String subType) {
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.subType = Optional.ofNullable(subType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField withSubType(Optional<String> subType) {
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.subType = subType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibraryField other = (GetLibraryItemsLibraryField) o;
|
||||
return
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.title, other.title) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.subType, other.subType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
key,
|
||||
title,
|
||||
type,
|
||||
subType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibraryField.class,
|
||||
"key", key,
|
||||
"title", title,
|
||||
"type", type,
|
||||
"subType", subType);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String key;
|
||||
|
||||
private String title;
|
||||
|
||||
private String type;
|
||||
|
||||
private Optional<String> subType = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subType(String subType) {
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.subType = Optional.ofNullable(subType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subType(Optional<String> subType) {
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.subType = subType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryField build() {
|
||||
return new GetLibraryItemsLibraryField(
|
||||
key,
|
||||
title,
|
||||
type,
|
||||
subType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,116 +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.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class GetLibraryItemsLibraryFieldType {
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonProperty("Operator")
|
||||
private List<GetLibraryItemsLibraryOperator> operator;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibraryFieldType(
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("Operator") List<GetLibraryItemsLibraryOperator> operator) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.type = type;
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public List<GetLibraryItemsLibraryOperator> operator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFieldType withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFieldType withOperator(List<GetLibraryItemsLibraryOperator> operator) {
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.operator = operator;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibraryFieldType other = (GetLibraryItemsLibraryFieldType) o;
|
||||
return
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.operator, other.operator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
type,
|
||||
operator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibraryFieldType.class,
|
||||
"type", type,
|
||||
"operator", operator);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String type;
|
||||
|
||||
private List<GetLibraryItemsLibraryOperator> operator;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder operator(List<GetLibraryItemsLibraryOperator> operator) {
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.operator = operator;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFieldType build() {
|
||||
return new GetLibraryItemsLibraryFieldType(
|
||||
type,
|
||||
operator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,202 +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 GetLibraryItemsLibraryFilter {
|
||||
|
||||
@JsonProperty("filter")
|
||||
private String filter;
|
||||
|
||||
@JsonProperty("filterType")
|
||||
private String filterType;
|
||||
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibraryFilter(
|
||||
@JsonProperty("filter") String filter,
|
||||
@JsonProperty("filterType") String filterType,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("type") String type) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.filter = filter;
|
||||
this.filterType = filterType;
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String filter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String filterType() {
|
||||
return filterType;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFilter withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFilter withFilterType(String filterType) {
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
this.filterType = filterType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFilter withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFilter withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFilter withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibraryFilter other = (GetLibraryItemsLibraryFilter) o;
|
||||
return
|
||||
Objects.deepEquals(this.filter, other.filter) &&
|
||||
Objects.deepEquals(this.filterType, other.filterType) &&
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.title, other.title) &&
|
||||
Objects.deepEquals(this.type, other.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
filter,
|
||||
filterType,
|
||||
key,
|
||||
title,
|
||||
type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibraryFilter.class,
|
||||
"filter", filter,
|
||||
"filterType", filterType,
|
||||
"key", key,
|
||||
"title", title,
|
||||
"type", type);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String filter;
|
||||
|
||||
private String filterType;
|
||||
|
||||
private String key;
|
||||
|
||||
private String title;
|
||||
|
||||
private String type;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder filter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filterType(String filterType) {
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
this.filterType = filterType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryFilter build() {
|
||||
return new GetLibraryItemsLibraryFilter(
|
||||
filter,
|
||||
filterType,
|
||||
key,
|
||||
title,
|
||||
type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +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 GetLibraryItemsLibraryOperator {
|
||||
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibraryOperator(
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("title") String title) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryOperator withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryOperator withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibraryOperator other = (GetLibraryItemsLibraryOperator) o;
|
||||
return
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.title, other.title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
key,
|
||||
title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibraryOperator.class,
|
||||
"key", key,
|
||||
"title", title);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String key;
|
||||
|
||||
private String title;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryOperator build() {
|
||||
return new GetLibraryItemsLibraryOperator(
|
||||
key,
|
||||
title);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import dev.plexapi.sdk.utils.OneOfDeserializer;
|
||||
import dev.plexapi.sdk.utils.TypedObject;
|
||||
import dev.plexapi.sdk.utils.Utils.JsonShape;
|
||||
import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* GetLibraryItemsLibraryOptimizedForStreaming
|
||||
*
|
||||
* <p>Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibraryItemsLibraryOptimizedForStreaming._Deserializer.class)
|
||||
public class GetLibraryItemsLibraryOptimizedForStreaming {
|
||||
|
||||
@JsonValue
|
||||
private TypedObject value;
|
||||
|
||||
private GetLibraryItemsLibraryOptimizedForStreaming(TypedObject value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static GetLibraryItemsLibraryOptimizedForStreaming of(GetLibraryItemsOptimizedForStreaming1 value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetLibraryItemsLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetLibraryItemsOptimizedForStreaming1>(){}));
|
||||
}
|
||||
|
||||
public static GetLibraryItemsLibraryOptimizedForStreaming of(boolean value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetLibraryItemsLibraryOptimizedForStreaming(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.GetLibraryItemsOptimizedForStreaming1}</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;
|
||||
}
|
||||
GetLibraryItemsLibraryOptimizedForStreaming other = (GetLibraryItemsLibraryOptimizedForStreaming) 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<GetLibraryItemsLibraryOptimizedForStreaming> {
|
||||
|
||||
public _Deserializer() {
|
||||
super(GetLibraryItemsLibraryOptimizedForStreaming.class, false,
|
||||
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
|
||||
TypeReferenceWithShape.of(new TypeReference<GetLibraryItemsOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibraryOptimizedForStreaming.class,
|
||||
"value", value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibraryItemsLibraryResponse200Type._Deserializer.class)
|
||||
@JsonSerialize(using = GetLibraryItemsLibraryResponse200Type._Serializer.class)
|
||||
public class GetLibraryItemsLibraryResponse200Type {
|
||||
|
||||
public static final GetLibraryItemsLibraryResponse200Type COVER_POSTER = new GetLibraryItemsLibraryResponse200Type("coverPoster");
|
||||
public static final GetLibraryItemsLibraryResponse200Type BACKGROUND = new GetLibraryItemsLibraryResponse200Type("background");
|
||||
public static final GetLibraryItemsLibraryResponse200Type SNAPSHOT = new GetLibraryItemsLibraryResponse200Type("snapshot");
|
||||
public static final GetLibraryItemsLibraryResponse200Type CLEAR_LOGO = new GetLibraryItemsLibraryResponse200Type("clearLogo");
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, GetLibraryItemsLibraryResponse200Type> values = createValuesMap();
|
||||
private static final Map<String, GetLibraryItemsLibraryResponse200TypeEnum> enums = createEnumsMap();
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsLibraryResponse200Type(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetLibraryItemsLibraryResponse200Type with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetLibraryItemsLibraryResponse200Type
|
||||
*/
|
||||
public static GetLibraryItemsLibraryResponse200Type of(String value) {
|
||||
synchronized (GetLibraryItemsLibraryResponse200Type.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetLibraryItemsLibraryResponse200Type(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetLibraryItemsLibraryResponse200TypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetLibraryItemsLibraryResponse200Type other = (GetLibraryItemsLibraryResponse200Type) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetLibraryItemsLibraryResponse200Type [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetLibraryItemsLibraryResponse200Type[] values() {
|
||||
synchronized (GetLibraryItemsLibraryResponse200Type.class) {
|
||||
return values.values().toArray(new GetLibraryItemsLibraryResponse200Type[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsLibraryResponse200Type> createValuesMap() {
|
||||
Map<String, GetLibraryItemsLibraryResponse200Type> map = new LinkedHashMap<>();
|
||||
map.put("coverPoster", COVER_POSTER);
|
||||
map.put("background", BACKGROUND);
|
||||
map.put("snapshot", SNAPSHOT);
|
||||
map.put("clearLogo", CLEAR_LOGO);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsLibraryResponse200TypeEnum> createEnumsMap() {
|
||||
Map<String, GetLibraryItemsLibraryResponse200TypeEnum> map = new HashMap<>();
|
||||
map.put("coverPoster", GetLibraryItemsLibraryResponse200TypeEnum.COVER_POSTER);
|
||||
map.put("background", GetLibraryItemsLibraryResponse200TypeEnum.BACKGROUND);
|
||||
map.put("snapshot", GetLibraryItemsLibraryResponse200TypeEnum.SNAPSHOT);
|
||||
map.put("clearLogo", GetLibraryItemsLibraryResponse200TypeEnum.CLEAR_LOGO);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetLibraryItemsLibraryResponse200Type> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetLibraryItemsLibraryResponse200Type.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetLibraryItemsLibraryResponse200Type value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetLibraryItemsLibraryResponse200Type> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetLibraryItemsLibraryResponse200Type.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetLibraryItemsLibraryResponse200Type deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetLibraryItemsLibraryResponse200Type.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetLibraryItemsLibraryResponse200TypeEnum {
|
||||
|
||||
COVER_POSTER("coverPoster"),
|
||||
BACKGROUND("background"),
|
||||
SNAPSHOT("snapshot"),
|
||||
CLEAR_LOGO("clearLogo"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsLibraryResponse200TypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,314 +3,185 @@
|
||||
*/
|
||||
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 com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibraryItemsLibraryResponseType._Deserializer.class)
|
||||
@JsonSerialize(using = GetLibraryItemsLibraryResponseType._Serializer.class)
|
||||
public class GetLibraryItemsLibraryResponseType {
|
||||
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
public static final GetLibraryItemsLibraryResponseType COVER_POSTER = new GetLibraryItemsLibraryResponseType("coverPoster");
|
||||
public static final GetLibraryItemsLibraryResponseType BACKGROUND = new GetLibraryItemsLibraryResponseType("background");
|
||||
public static final GetLibraryItemsLibraryResponseType SNAPSHOT = new GetLibraryItemsLibraryResponseType("snapshot");
|
||||
public static final GetLibraryItemsLibraryResponseType CLEAR_LOGO = new GetLibraryItemsLibraryResponseType("clearLogo");
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, GetLibraryItemsLibraryResponseType> values = createValuesMap();
|
||||
private static final Map<String, GetLibraryItemsLibraryResponseTypeEnum> enums = createEnumsMap();
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
private final String value;
|
||||
|
||||
@JsonProperty("active")
|
||||
private boolean active;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Filter")
|
||||
private Optional<? extends List<GetLibraryItemsLibraryFilter>> filter;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Sort")
|
||||
private Optional<? extends List<GetLibraryItemsLibrarySort>> sort;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Field")
|
||||
private Optional<? extends List<GetLibraryItemsLibraryField>> field;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibraryResponseType(
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("active") boolean active,
|
||||
@JsonProperty("Filter") Optional<? extends List<GetLibraryItemsLibraryFilter>> filter,
|
||||
@JsonProperty("Sort") Optional<? extends List<GetLibraryItemsLibrarySort>> sort,
|
||||
@JsonProperty("Field") Optional<? extends List<GetLibraryItemsLibraryField>> field) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(active, "active");
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.key = key;
|
||||
this.type = type;
|
||||
this.title = title;
|
||||
this.active = active;
|
||||
this.filter = filter;
|
||||
this.sort = sort;
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType(
|
||||
String key,
|
||||
String type,
|
||||
String title,
|
||||
boolean active) {
|
||||
this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty());
|
||||
private GetLibraryItemsLibraryResponseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean active() {
|
||||
return active;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsLibraryFilter>> filter() {
|
||||
return (Optional<List<GetLibraryItemsLibraryFilter>>) filter;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsLibrarySort>> sort() {
|
||||
return (Optional<List<GetLibraryItemsLibrarySort>>) sort;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsLibraryField>> field() {
|
||||
return (Optional<List<GetLibraryItemsLibraryField>>) field;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withActive(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withFilter(List<GetLibraryItemsLibraryFilter> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withFilter(Optional<? extends List<GetLibraryItemsLibraryFilter>> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withSort(List<GetLibraryItemsLibrarySort> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = Optional.ofNullable(sort);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withSort(Optional<? extends List<GetLibraryItemsLibrarySort>> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withField(List<GetLibraryItemsLibraryField> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = Optional.ofNullable(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType withField(Optional<? extends List<GetLibraryItemsLibraryField>> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
/**
|
||||
* Returns a GetLibraryItemsLibraryResponseType with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetLibraryItemsLibraryResponseType
|
||||
*/
|
||||
public static GetLibraryItemsLibraryResponseType of(String value) {
|
||||
synchronized (GetLibraryItemsLibraryResponseType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetLibraryItemsLibraryResponseType(v));
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibraryResponseType other = (GetLibraryItemsLibraryResponseType) o;
|
||||
return
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.title, other.title) &&
|
||||
Objects.deepEquals(this.active, other.active) &&
|
||||
Objects.deepEquals(this.filter, other.filter) &&
|
||||
Objects.deepEquals(this.sort, other.sort) &&
|
||||
Objects.deepEquals(this.field, other.field);
|
||||
}
|
||||
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetLibraryItemsLibraryResponseTypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
key,
|
||||
type,
|
||||
title,
|
||||
active,
|
||||
filter,
|
||||
sort,
|
||||
field);
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetLibraryItemsLibraryResponseType other = (GetLibraryItemsLibraryResponseType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibraryResponseType.class,
|
||||
"key", key,
|
||||
"type", type,
|
||||
"title", title,
|
||||
"active", active,
|
||||
"filter", filter,
|
||||
"sort", sort,
|
||||
"field", field);
|
||||
return "GetLibraryItemsLibraryResponseType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetLibraryItemsLibraryResponseType[] values() {
|
||||
synchronized (GetLibraryItemsLibraryResponseType.class) {
|
||||
return values.values().toArray(new GetLibraryItemsLibraryResponseType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsLibraryResponseType> createValuesMap() {
|
||||
Map<String, GetLibraryItemsLibraryResponseType> map = new LinkedHashMap<>();
|
||||
map.put("coverPoster", COVER_POSTER);
|
||||
map.put("background", BACKGROUND);
|
||||
map.put("snapshot", SNAPSHOT);
|
||||
map.put("clearLogo", CLEAR_LOGO);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsLibraryResponseTypeEnum> createEnumsMap() {
|
||||
Map<String, GetLibraryItemsLibraryResponseTypeEnum> map = new HashMap<>();
|
||||
map.put("coverPoster", GetLibraryItemsLibraryResponseTypeEnum.COVER_POSTER);
|
||||
map.put("background", GetLibraryItemsLibraryResponseTypeEnum.BACKGROUND);
|
||||
map.put("snapshot", GetLibraryItemsLibraryResponseTypeEnum.SNAPSHOT);
|
||||
map.put("clearLogo", GetLibraryItemsLibraryResponseTypeEnum.CLEAR_LOGO);
|
||||
return map;
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String key;
|
||||
|
||||
private String type;
|
||||
|
||||
private String title;
|
||||
|
||||
private Boolean active;
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsLibraryFilter>> filter = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsLibrarySort>> sort = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsLibraryField>> field = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetLibraryItemsLibraryResponseType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetLibraryItemsLibraryResponseType.class);
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
@Override
|
||||
public void serialize(GetLibraryItemsLibraryResponseType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetLibraryItemsLibraryResponseType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetLibraryItemsLibraryResponseType.class);
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
@Override
|
||||
public GetLibraryItemsLibraryResponseType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetLibraryItemsLibraryResponseType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetLibraryItemsLibraryResponseTypeEnum {
|
||||
|
||||
COVER_POSTER("coverPoster"),
|
||||
BACKGROUND("background"),
|
||||
SNAPSHOT("snapshot"),
|
||||
CLEAR_LOGO("clearLogo"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsLibraryResponseTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder active(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(List<GetLibraryItemsLibraryFilter> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(Optional<? extends List<GetLibraryItemsLibraryFilter>> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder sort(List<GetLibraryItemsLibrarySort> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = Optional.ofNullable(sort);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder sort(Optional<? extends List<GetLibraryItemsLibrarySort>> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder field(List<GetLibraryItemsLibraryField> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = Optional.ofNullable(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder field(Optional<? extends List<GetLibraryItemsLibraryField>> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryResponseType build() {
|
||||
return new GetLibraryItemsLibraryResponseType(
|
||||
key,
|
||||
type,
|
||||
title,
|
||||
active,
|
||||
filter,
|
||||
sort,
|
||||
field);
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,436 +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 com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsLibrarySort {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("default")
|
||||
private Optional<String> default_;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("active")
|
||||
private Optional<Boolean> active;
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("activeDirection")
|
||||
private Optional<? extends GetLibraryItemsLibraryActiveDirection> activeDirection;
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("defaultDirection")
|
||||
private Optional<? extends GetLibraryItemsLibraryDefaultDirection> defaultDirection;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("descKey")
|
||||
private Optional<String> descKey;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("firstCharacterKey")
|
||||
private Optional<String> firstCharacterKey;
|
||||
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibrarySort(
|
||||
@JsonProperty("default") Optional<String> default_,
|
||||
@JsonProperty("active") Optional<Boolean> active,
|
||||
@JsonProperty("activeDirection") Optional<? extends GetLibraryItemsLibraryActiveDirection> activeDirection,
|
||||
@JsonProperty("defaultDirection") Optional<? extends GetLibraryItemsLibraryDefaultDirection> defaultDirection,
|
||||
@JsonProperty("descKey") Optional<String> descKey,
|
||||
@JsonProperty("firstCharacterKey") Optional<String> firstCharacterKey,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("title") String title) {
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
Utils.checkNotNull(active, "active");
|
||||
Utils.checkNotNull(activeDirection, "activeDirection");
|
||||
Utils.checkNotNull(defaultDirection, "defaultDirection");
|
||||
Utils.checkNotNull(descKey, "descKey");
|
||||
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.default_ = default_;
|
||||
this.active = active;
|
||||
this.activeDirection = activeDirection;
|
||||
this.defaultDirection = defaultDirection;
|
||||
this.descKey = descKey;
|
||||
this.firstCharacterKey = firstCharacterKey;
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort(
|
||||
String key,
|
||||
String title) {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, title);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> default_() {
|
||||
return default_;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Boolean> active() {
|
||||
return active;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<GetLibraryItemsLibraryActiveDirection> activeDirection() {
|
||||
return (Optional<GetLibraryItemsLibraryActiveDirection>) activeDirection;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<GetLibraryItemsLibraryDefaultDirection> defaultDirection() {
|
||||
return (Optional<GetLibraryItemsLibraryDefaultDirection>) defaultDirection;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> descKey() {
|
||||
return descKey;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> firstCharacterKey() {
|
||||
return firstCharacterKey;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withDefault(String default_) {
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
this.default_ = Optional.ofNullable(default_);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withDefault(Optional<String> default_) {
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
this.default_ = default_;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withActive(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = Optional.ofNullable(active);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withActive(Optional<Boolean> active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public GetLibraryItemsLibrarySort withActiveDirection(GetLibraryItemsLibraryActiveDirection activeDirection) {
|
||||
Utils.checkNotNull(activeDirection, "activeDirection");
|
||||
this.activeDirection = Optional.ofNullable(activeDirection);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public GetLibraryItemsLibrarySort withActiveDirection(Optional<? extends GetLibraryItemsLibraryActiveDirection> activeDirection) {
|
||||
Utils.checkNotNull(activeDirection, "activeDirection");
|
||||
this.activeDirection = activeDirection;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public GetLibraryItemsLibrarySort withDefaultDirection(GetLibraryItemsLibraryDefaultDirection defaultDirection) {
|
||||
Utils.checkNotNull(defaultDirection, "defaultDirection");
|
||||
this.defaultDirection = Optional.ofNullable(defaultDirection);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public GetLibraryItemsLibrarySort withDefaultDirection(Optional<? extends GetLibraryItemsLibraryDefaultDirection> defaultDirection) {
|
||||
Utils.checkNotNull(defaultDirection, "defaultDirection");
|
||||
this.defaultDirection = defaultDirection;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withDescKey(String descKey) {
|
||||
Utils.checkNotNull(descKey, "descKey");
|
||||
this.descKey = Optional.ofNullable(descKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withDescKey(Optional<String> descKey) {
|
||||
Utils.checkNotNull(descKey, "descKey");
|
||||
this.descKey = descKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withFirstCharacterKey(String firstCharacterKey) {
|
||||
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
|
||||
this.firstCharacterKey = Optional.ofNullable(firstCharacterKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withFirstCharacterKey(Optional<String> firstCharacterKey) {
|
||||
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
|
||||
this.firstCharacterKey = firstCharacterKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibrarySort other = (GetLibraryItemsLibrarySort) o;
|
||||
return
|
||||
Objects.deepEquals(this.default_, other.default_) &&
|
||||
Objects.deepEquals(this.active, other.active) &&
|
||||
Objects.deepEquals(this.activeDirection, other.activeDirection) &&
|
||||
Objects.deepEquals(this.defaultDirection, other.defaultDirection) &&
|
||||
Objects.deepEquals(this.descKey, other.descKey) &&
|
||||
Objects.deepEquals(this.firstCharacterKey, other.firstCharacterKey) &&
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.title, other.title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
default_,
|
||||
active,
|
||||
activeDirection,
|
||||
defaultDirection,
|
||||
descKey,
|
||||
firstCharacterKey,
|
||||
key,
|
||||
title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsLibrarySort.class,
|
||||
"default_", default_,
|
||||
"active", active,
|
||||
"activeDirection", activeDirection,
|
||||
"defaultDirection", defaultDirection,
|
||||
"descKey", descKey,
|
||||
"firstCharacterKey", firstCharacterKey,
|
||||
"key", key,
|
||||
"title", title);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> default_ = Optional.empty();
|
||||
|
||||
private Optional<Boolean> active = Optional.empty();
|
||||
|
||||
private Optional<? extends GetLibraryItemsLibraryActiveDirection> activeDirection;
|
||||
|
||||
private Optional<? extends GetLibraryItemsLibraryDefaultDirection> defaultDirection;
|
||||
|
||||
private Optional<String> descKey = Optional.empty();
|
||||
|
||||
private Optional<String> firstCharacterKey = Optional.empty();
|
||||
|
||||
private String key;
|
||||
|
||||
private String title;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder default_(String default_) {
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
this.default_ = Optional.ofNullable(default_);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder default_(Optional<String> default_) {
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
this.default_ = default_;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder active(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = Optional.ofNullable(active);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder active(Optional<Boolean> active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public Builder activeDirection(GetLibraryItemsLibraryActiveDirection activeDirection) {
|
||||
Utils.checkNotNull(activeDirection, "activeDirection");
|
||||
this.activeDirection = Optional.ofNullable(activeDirection);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public Builder activeDirection(Optional<? extends GetLibraryItemsLibraryActiveDirection> activeDirection) {
|
||||
Utils.checkNotNull(activeDirection, "activeDirection");
|
||||
this.activeDirection = activeDirection;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public Builder defaultDirection(GetLibraryItemsLibraryDefaultDirection defaultDirection) {
|
||||
Utils.checkNotNull(defaultDirection, "defaultDirection");
|
||||
this.defaultDirection = Optional.ofNullable(defaultDirection);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The direction of the sort. Can be either `asc` or `desc`.
|
||||
*/
|
||||
public Builder defaultDirection(Optional<? extends GetLibraryItemsLibraryDefaultDirection> defaultDirection) {
|
||||
Utils.checkNotNull(defaultDirection, "defaultDirection");
|
||||
this.defaultDirection = defaultDirection;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder descKey(String descKey) {
|
||||
Utils.checkNotNull(descKey, "descKey");
|
||||
this.descKey = Optional.ofNullable(descKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder descKey(Optional<String> descKey) {
|
||||
Utils.checkNotNull(descKey, "descKey");
|
||||
this.descKey = descKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder firstCharacterKey(String firstCharacterKey) {
|
||||
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
|
||||
this.firstCharacterKey = Optional.ofNullable(firstCharacterKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder firstCharacterKey(Optional<String> firstCharacterKey) {
|
||||
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
|
||||
this.firstCharacterKey = firstCharacterKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibrarySort build() {
|
||||
if (activeDirection == null) {
|
||||
activeDirection = _SINGLETON_VALUE_ActiveDirection.value();
|
||||
}
|
||||
if (defaultDirection == null) {
|
||||
defaultDirection = _SINGLETON_VALUE_DefaultDirection.value();
|
||||
}
|
||||
return new GetLibraryItemsLibrarySort(
|
||||
default_,
|
||||
active,
|
||||
activeDirection,
|
||||
defaultDirection,
|
||||
descKey,
|
||||
firstCharacterKey,
|
||||
key,
|
||||
title);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Optional<? extends GetLibraryItemsLibraryActiveDirection>> _SINGLETON_VALUE_ActiveDirection =
|
||||
new LazySingletonValue<>(
|
||||
"activeDirection",
|
||||
"\"asc\"",
|
||||
new TypeReference<Optional<? extends GetLibraryItemsLibraryActiveDirection>>() {});
|
||||
|
||||
private static final LazySingletonValue<Optional<? extends GetLibraryItemsLibraryDefaultDirection>> _SINGLETON_VALUE_DefaultDirection =
|
||||
new LazySingletonValue<>(
|
||||
"defaultDirection",
|
||||
"\"asc\"",
|
||||
new TypeReference<Optional<? extends GetLibraryItemsLibraryDefaultDirection>>() {});
|
||||
}
|
||||
}
|
||||
@@ -3,214 +3,314 @@
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetLibraryItemsLibraryType
|
||||
*
|
||||
* <p>The type of media content in the Plex library. This can represent videos, music, or photos.
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibraryItemsLibraryType._Deserializer.class)
|
||||
@JsonSerialize(using = GetLibraryItemsLibraryType._Serializer.class)
|
||||
public class GetLibraryItemsLibraryType {
|
||||
|
||||
public static final GetLibraryItemsLibraryType Movie = new GetLibraryItemsLibraryType("movie");
|
||||
public static final GetLibraryItemsLibraryType TvShow = new GetLibraryItemsLibraryType("show");
|
||||
public static final GetLibraryItemsLibraryType Season = new GetLibraryItemsLibraryType("season");
|
||||
public static final GetLibraryItemsLibraryType Episode = new GetLibraryItemsLibraryType("episode");
|
||||
public static final GetLibraryItemsLibraryType Artist = new GetLibraryItemsLibraryType("artist");
|
||||
public static final GetLibraryItemsLibraryType Album = new GetLibraryItemsLibraryType("album");
|
||||
public static final GetLibraryItemsLibraryType Track = new GetLibraryItemsLibraryType("track");
|
||||
public static final GetLibraryItemsLibraryType PhotoAlbum = new GetLibraryItemsLibraryType("photoalbum");
|
||||
public static final GetLibraryItemsLibraryType Photo = new GetLibraryItemsLibraryType("photo");
|
||||
public static final GetLibraryItemsLibraryType Collection = new GetLibraryItemsLibraryType("collection");
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, GetLibraryItemsLibraryType> values = createValuesMap();
|
||||
private static final Map<String, GetLibraryItemsLibraryTypeEnum> enums = createEnumsMap();
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
private final String value;
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
private GetLibraryItemsLibraryType(String value) {
|
||||
this.value = value;
|
||||
@JsonProperty("active")
|
||||
private boolean active;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Filter")
|
||||
private Optional<? extends List<GetLibraryItemsFilter>> filter;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Sort")
|
||||
private Optional<? extends List<GetLibraryItemsSort>> sort;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Field")
|
||||
private Optional<? extends List<GetLibraryItemsField>> field;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLibraryType(
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("active") boolean active,
|
||||
@JsonProperty("Filter") Optional<? extends List<GetLibraryItemsFilter>> filter,
|
||||
@JsonProperty("Sort") Optional<? extends List<GetLibraryItemsSort>> sort,
|
||||
@JsonProperty("Field") Optional<? extends List<GetLibraryItemsField>> field) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(active, "active");
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.key = key;
|
||||
this.type = type;
|
||||
this.title = title;
|
||||
this.active = active;
|
||||
this.filter = filter;
|
||||
this.sort = sort;
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType(
|
||||
String key,
|
||||
String type,
|
||||
String title,
|
||||
boolean active) {
|
||||
this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetLibraryItemsLibraryType with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetLibraryItemsLibraryType
|
||||
*/
|
||||
public static GetLibraryItemsLibraryType of(String value) {
|
||||
synchronized (GetLibraryItemsLibraryType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetLibraryItemsLibraryType(v));
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean active() {
|
||||
return active;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsFilter>> filter() {
|
||||
return (Optional<List<GetLibraryItemsFilter>>) filter;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsSort>> sort() {
|
||||
return (Optional<List<GetLibraryItemsSort>>) sort;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsField>> field() {
|
||||
return (Optional<List<GetLibraryItemsField>>) field;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withActive(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withFilter(List<GetLibraryItemsFilter> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withFilter(Optional<? extends List<GetLibraryItemsFilter>> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withSort(List<GetLibraryItemsSort> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = Optional.ofNullable(sort);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withSort(Optional<? extends List<GetLibraryItemsSort>> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withField(List<GetLibraryItemsField> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = Optional.ofNullable(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType withField(Optional<? extends List<GetLibraryItemsField>> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsLibraryType other = (GetLibraryItemsLibraryType) o;
|
||||
return
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.title, other.title) &&
|
||||
Objects.deepEquals(this.active, other.active) &&
|
||||
Objects.deepEquals(this.filter, other.filter) &&
|
||||
Objects.deepEquals(this.sort, other.sort) &&
|
||||
Objects.deepEquals(this.field, other.field);
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetLibraryItemsLibraryTypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
return Objects.hash(
|
||||
key,
|
||||
type,
|
||||
title,
|
||||
active,
|
||||
filter,
|
||||
sort,
|
||||
field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetLibraryItemsLibraryType other = (GetLibraryItemsLibraryType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetLibraryItemsLibraryType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetLibraryItemsLibraryType[] values() {
|
||||
synchronized (GetLibraryItemsLibraryType.class) {
|
||||
return values.values().toArray(new GetLibraryItemsLibraryType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsLibraryType> createValuesMap() {
|
||||
Map<String, GetLibraryItemsLibraryType> map = new LinkedHashMap<>();
|
||||
map.put("movie", Movie);
|
||||
map.put("show", TvShow);
|
||||
map.put("season", Season);
|
||||
map.put("episode", Episode);
|
||||
map.put("artist", Artist);
|
||||
map.put("album", Album);
|
||||
map.put("track", Track);
|
||||
map.put("photoalbum", PhotoAlbum);
|
||||
map.put("photo", Photo);
|
||||
map.put("collection", Collection);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsLibraryTypeEnum> createEnumsMap() {
|
||||
Map<String, GetLibraryItemsLibraryTypeEnum> map = new HashMap<>();
|
||||
map.put("movie", GetLibraryItemsLibraryTypeEnum.Movie);
|
||||
map.put("show", GetLibraryItemsLibraryTypeEnum.TvShow);
|
||||
map.put("season", GetLibraryItemsLibraryTypeEnum.Season);
|
||||
map.put("episode", GetLibraryItemsLibraryTypeEnum.Episode);
|
||||
map.put("artist", GetLibraryItemsLibraryTypeEnum.Artist);
|
||||
map.put("album", GetLibraryItemsLibraryTypeEnum.Album);
|
||||
map.put("track", GetLibraryItemsLibraryTypeEnum.Track);
|
||||
map.put("photoalbum", GetLibraryItemsLibraryTypeEnum.PhotoAlbum);
|
||||
map.put("photo", GetLibraryItemsLibraryTypeEnum.Photo);
|
||||
map.put("collection", GetLibraryItemsLibraryTypeEnum.Collection);
|
||||
return map;
|
||||
return Utils.toString(GetLibraryItemsLibraryType.class,
|
||||
"key", key,
|
||||
"type", type,
|
||||
"title", title,
|
||||
"active", active,
|
||||
"filter", filter,
|
||||
"sort", sort,
|
||||
"field", field);
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetLibraryItemsLibraryType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetLibraryItemsLibraryType.class);
|
||||
public final static class Builder {
|
||||
|
||||
private String key;
|
||||
|
||||
private String type;
|
||||
|
||||
private String title;
|
||||
|
||||
private Boolean active;
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsFilter>> filter = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsSort>> sort = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsField>> field = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetLibraryItemsLibraryType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetLibraryItemsLibraryType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetLibraryItemsLibraryType.class);
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetLibraryItemsLibraryType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetLibraryItemsLibraryType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetLibraryItemsLibraryTypeEnum {
|
||||
|
||||
Movie("movie"),
|
||||
TvShow("show"),
|
||||
Season("season"),
|
||||
Episode("episode"),
|
||||
Artist("artist"),
|
||||
Album("album"),
|
||||
Track("track"),
|
||||
PhotoAlbum("photoalbum"),
|
||||
Photo("photo"),
|
||||
Collection("collection"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsLibraryTypeEnum(String value) {
|
||||
this.value = value;
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder active(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(List<GetLibraryItemsFilter> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(Optional<? extends List<GetLibraryItemsFilter>> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder sort(List<GetLibraryItemsSort> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = Optional.ofNullable(sort);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder sort(Optional<? extends List<GetLibraryItemsSort>> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder field(List<GetLibraryItemsField> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = Optional.ofNullable(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder field(Optional<? extends List<GetLibraryItemsField>> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLibraryType build() {
|
||||
return new GetLibraryItemsLibraryType(
|
||||
key,
|
||||
type,
|
||||
title,
|
||||
active,
|
||||
filter,
|
||||
sort,
|
||||
field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,34 +5,31 @@ 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;
|
||||
|
||||
/**
|
||||
* GetLibraryItemsLocation
|
||||
*
|
||||
* <p>The folder path for the media item.
|
||||
*/
|
||||
public class GetLibraryItemsLocation {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("path")
|
||||
private Optional<String> path;
|
||||
private String path;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsLocation(
|
||||
@JsonProperty("path") Optional<String> path) {
|
||||
@JsonProperty("path") String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLocation() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> path() {
|
||||
public String path() {
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -41,12 +38,6 @@ public class GetLibraryItemsLocation {
|
||||
}
|
||||
|
||||
public GetLibraryItemsLocation withPath(String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = Optional.ofNullable(path);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsLocation withPath(Optional<String> path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
return this;
|
||||
@@ -80,19 +71,13 @@ public class GetLibraryItemsLocation {
|
||||
|
||||
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
File diff suppressed because it is too large
Load Diff
@@ -25,16 +25,16 @@ public class GetLibraryItemsMeta {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Type")
|
||||
private Optional<? extends List<GetLibraryItemsLibraryResponseType>> type;
|
||||
private Optional<? extends List<GetLibraryItemsLibraryType>> type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("FieldType")
|
||||
private Optional<? extends List<GetLibraryItemsLibraryFieldType>> fieldType;
|
||||
private Optional<? extends List<GetLibraryItemsFieldType>> fieldType;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsMeta(
|
||||
@JsonProperty("Type") Optional<? extends List<GetLibraryItemsLibraryResponseType>> type,
|
||||
@JsonProperty("FieldType") Optional<? extends List<GetLibraryItemsLibraryFieldType>> fieldType) {
|
||||
@JsonProperty("Type") Optional<? extends List<GetLibraryItemsLibraryType>> type,
|
||||
@JsonProperty("FieldType") Optional<? extends List<GetLibraryItemsFieldType>> fieldType) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(fieldType, "fieldType");
|
||||
this.type = type;
|
||||
@@ -47,39 +47,39 @@ public class GetLibraryItemsMeta {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsLibraryResponseType>> type() {
|
||||
return (Optional<List<GetLibraryItemsLibraryResponseType>>) type;
|
||||
public Optional<List<GetLibraryItemsLibraryType>> type() {
|
||||
return (Optional<List<GetLibraryItemsLibraryType>>) type;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsLibraryFieldType>> fieldType() {
|
||||
return (Optional<List<GetLibraryItemsLibraryFieldType>>) fieldType;
|
||||
public Optional<List<GetLibraryItemsFieldType>> fieldType() {
|
||||
return (Optional<List<GetLibraryItemsFieldType>>) fieldType;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsMeta withType(List<GetLibraryItemsLibraryResponseType> type) {
|
||||
public GetLibraryItemsMeta withType(List<GetLibraryItemsLibraryType> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsMeta withType(Optional<? extends List<GetLibraryItemsLibraryResponseType>> type) {
|
||||
public GetLibraryItemsMeta withType(Optional<? extends List<GetLibraryItemsLibraryType>> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsMeta withFieldType(List<GetLibraryItemsLibraryFieldType> fieldType) {
|
||||
public GetLibraryItemsMeta withFieldType(List<GetLibraryItemsFieldType> fieldType) {
|
||||
Utils.checkNotNull(fieldType, "fieldType");
|
||||
this.fieldType = Optional.ofNullable(fieldType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsMeta withFieldType(Optional<? extends List<GetLibraryItemsLibraryFieldType>> fieldType) {
|
||||
public GetLibraryItemsMeta withFieldType(Optional<? extends List<GetLibraryItemsFieldType>> fieldType) {
|
||||
Utils.checkNotNull(fieldType, "fieldType");
|
||||
this.fieldType = fieldType;
|
||||
return this;
|
||||
@@ -116,33 +116,33 @@ public class GetLibraryItemsMeta {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsLibraryResponseType>> type = Optional.empty();
|
||||
private Optional<? extends List<GetLibraryItemsLibraryType>> type = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsLibraryFieldType>> fieldType = Optional.empty();
|
||||
private Optional<? extends List<GetLibraryItemsFieldType>> fieldType = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder type(List<GetLibraryItemsLibraryResponseType> type) {
|
||||
public Builder type(List<GetLibraryItemsLibraryType> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends List<GetLibraryItemsLibraryResponseType>> type) {
|
||||
public Builder type(Optional<? extends List<GetLibraryItemsLibraryType>> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder fieldType(List<GetLibraryItemsLibraryFieldType> fieldType) {
|
||||
public Builder fieldType(List<GetLibraryItemsFieldType> fieldType) {
|
||||
Utils.checkNotNull(fieldType, "fieldType");
|
||||
this.fieldType = Optional.ofNullable(fieldType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder fieldType(Optional<? extends List<GetLibraryItemsLibraryFieldType>> fieldType) {
|
||||
public Builder fieldType(Optional<? extends List<GetLibraryItemsFieldType>> fieldType) {
|
||||
Utils.checkNotNull(fieldType, "fieldType");
|
||||
this.fieldType = fieldType;
|
||||
return this;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,31 +4,98 @@
|
||||
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 GetLibraryItemsOptimizedForStreaming {
|
||||
Disable(0),
|
||||
Enable(1);
|
||||
/**
|
||||
* GetLibraryItemsOptimizedForStreaming
|
||||
*
|
||||
* <p>Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibraryItemsOptimizedForStreaming._Deserializer.class)
|
||||
public class GetLibraryItemsOptimizedForStreaming {
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private GetLibraryItemsOptimizedForStreaming(int value) {
|
||||
private TypedObject value;
|
||||
|
||||
private GetLibraryItemsOptimizedForStreaming(TypedObject value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
|
||||
public static GetLibraryItemsOptimizedForStreaming of(OptimizedForStreaming1 value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetLibraryItemsOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<OptimizedForStreaming1>(){}));
|
||||
}
|
||||
|
||||
public static GetLibraryItemsOptimizedForStreaming of(boolean value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetLibraryItemsOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
|
||||
}
|
||||
|
||||
public static Optional<GetLibraryItemsOptimizedForStreaming> fromValue(int value) {
|
||||
for (GetLibraryItemsOptimizedForStreaming o: GetLibraryItemsOptimizedForStreaming.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.OptimizedForStreaming1}</li>
|
||||
* <li>{@code boolean}</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>Use {@code instanceof} to determine what type is returned. For example:
|
||||
*
|
||||
* <pre>
|
||||
* if (obj.value() instanceof String) {
|
||||
* String answer = (String) obj.value();
|
||||
* System.out.println("answer=" + answer);
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @return value of oneOf type
|
||||
**/
|
||||
public java.lang.Object value() {
|
||||
return value.value();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return Optional.empty();
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsOptimizedForStreaming other = (GetLibraryItemsOptimizedForStreaming) 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<GetLibraryItemsOptimizedForStreaming> {
|
||||
|
||||
public _Deserializer() {
|
||||
super(GetLibraryItemsOptimizedForStreaming.class, false,
|
||||
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
|
||||
TypeReferenceWithShape.of(new TypeReference<OptimizedForStreaming1>() {}, JsonShape.DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsOptimizedForStreaming.class,
|
||||
"value", value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum GetLibraryItemsOptimizedForStreaming1 {
|
||||
ZERO(0),
|
||||
ONE(1);
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private GetLibraryItemsOptimizedForStreaming1(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetLibraryItemsOptimizedForStreaming1> fromValue(int value) {
|
||||
for (GetLibraryItemsOptimizedForStreaming1 o: GetLibraryItemsOptimizedForStreaming1.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,34 +17,84 @@ import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsPart {
|
||||
|
||||
/**
|
||||
* 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 int id;
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
private Optional<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.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("file")
|
||||
private String file;
|
||||
|
||||
@JsonProperty("size")
|
||||
private long size;
|
||||
private Optional<String> file;
|
||||
|
||||
/**
|
||||
* The container format of the media file.
|
||||
* File size in bytes.
|
||||
*/
|
||||
@JsonProperty("container")
|
||||
private String container;
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<Long> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("packetLength")
|
||||
private Optional<Integer> packetLength;
|
||||
|
||||
/**
|
||||
* Container format of the part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("container")
|
||||
private Optional<String> container;
|
||||
|
||||
/**
|
||||
* Video profile for the part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("videoProfile")
|
||||
private Optional<String> videoProfile;
|
||||
|
||||
/**
|
||||
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("audioProfile")
|
||||
private Optional<String> audioProfile;
|
||||
@@ -53,111 +103,156 @@ public class GetLibraryItemsPart {
|
||||
@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 GetLibraryItemsLibraryOptimizedForStreaming> optimizedForStreaming;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("hasThumbnail")
|
||||
private Optional<? extends GetLibraryItemsHasThumbnail> hasThumbnail;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Stream")
|
||||
private Optional<? extends List<GetLibraryItemsStream>> stream;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsPart(
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("accessible") Optional<Boolean> accessible,
|
||||
@JsonProperty("exists") Optional<Boolean> exists,
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("key") Optional<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("file") Optional<String> file,
|
||||
@JsonProperty("size") Optional<Long> size,
|
||||
@JsonProperty("packetLength") Optional<Integer> packetLength,
|
||||
@JsonProperty("container") Optional<String> container,
|
||||
@JsonProperty("videoProfile") Optional<String> videoProfile,
|
||||
@JsonProperty("audioProfile") Optional<String> audioProfile,
|
||||
@JsonProperty("has64bitOffsets") Optional<Boolean> has64bitOffsets,
|
||||
@JsonProperty("optimizedForStreaming") Optional<Boolean> optimizedForStreaming,
|
||||
@JsonProperty("videoProfile") Optional<String> videoProfile,
|
||||
@JsonProperty("indexes") Optional<String> indexes,
|
||||
@JsonProperty("hasThumbnail") Optional<? extends GetLibraryItemsHasThumbnail> hasThumbnail,
|
||||
@JsonProperty("Stream") Optional<? extends List<GetLibraryItemsStream>> stream) {
|
||||
@JsonProperty("optimizedForStreaming") Optional<? extends GetLibraryItemsLibraryOptimizedForStreaming> optimizedForStreaming,
|
||||
@JsonProperty("hasThumbnail") Optional<? extends GetLibraryItemsHasThumbnail> hasThumbnail) {
|
||||
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 GetLibraryItemsPart(
|
||||
int 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 id) {
|
||||
this(Optional.empty(), Optional.empty(), 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());
|
||||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
public Optional<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() {
|
||||
public Optional<String> file() {
|
||||
return file;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long size() {
|
||||
public Optional<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;
|
||||
@@ -168,19 +263,13 @@ public class GetLibraryItemsPart {
|
||||
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<GetLibraryItemsLibraryOptimizedForStreaming> optimizedForStreaming() {
|
||||
return (Optional<GetLibraryItemsLibraryOptimizedForStreaming>) optimizedForStreaming;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -189,67 +278,199 @@ public class GetLibraryItemsPart {
|
||||
return (Optional<GetLibraryItemsHasThumbnail>) hasThumbnail;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsStream>> stream() {
|
||||
return (Optional<List<GetLibraryItemsStream>>) stream;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withId(int id) {
|
||||
/**
|
||||
* Indicates if the part is accessible.
|
||||
*/
|
||||
public GetLibraryItemsPart withAccessible(boolean accessible) {
|
||||
Utils.checkNotNull(accessible, "accessible");
|
||||
this.accessible = Optional.ofNullable(accessible);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the part is accessible.
|
||||
*/
|
||||
public GetLibraryItemsPart withAccessible(Optional<Boolean> accessible) {
|
||||
Utils.checkNotNull(accessible, "accessible");
|
||||
this.accessible = accessible;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the part exists.
|
||||
*/
|
||||
public GetLibraryItemsPart withExists(boolean exists) {
|
||||
Utils.checkNotNull(exists, "exists");
|
||||
this.exists = Optional.ofNullable(exists);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the part exists.
|
||||
*/
|
||||
public GetLibraryItemsPart withExists(Optional<Boolean> exists) {
|
||||
Utils.checkNotNull(exists, "exists");
|
||||
this.exists = exists;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique part identifier.
|
||||
*/
|
||||
public GetLibraryItemsPart withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public GetLibraryItemsPart withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public GetLibraryItemsPart withKey(Optional<String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withIndexes(String indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = Optional.ofNullable(indexes);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withIndexes(Optional<String> indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = indexes;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duration of the part in milliseconds.
|
||||
*/
|
||||
public GetLibraryItemsPart withDuration(int duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = Optional.ofNullable(duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duration of the part in milliseconds.
|
||||
*/
|
||||
public GetLibraryItemsPart withDuration(Optional<Integer> duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public GetLibraryItemsPart withFile(String file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = Optional.ofNullable(file);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public GetLibraryItemsPart withFile(Optional<String> file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = file;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public GetLibraryItemsPart withSize(long size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public GetLibraryItemsPart withSize(Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withPacketLength(int packetLength) {
|
||||
Utils.checkNotNull(packetLength, "packetLength");
|
||||
this.packetLength = Optional.ofNullable(packetLength);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart 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 GetLibraryItemsPart withContainer(String container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
this.container = Optional.ofNullable(container);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Container format of the part.
|
||||
*/
|
||||
public GetLibraryItemsPart withContainer(Optional<String> container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
this.container = container;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Video profile for the part.
|
||||
*/
|
||||
public GetLibraryItemsPart withVideoProfile(String videoProfile) {
|
||||
Utils.checkNotNull(videoProfile, "videoProfile");
|
||||
this.videoProfile = Optional.ofNullable(videoProfile);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Video profile for the part.
|
||||
*/
|
||||
public GetLibraryItemsPart 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 GetLibraryItemsPart 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 GetLibraryItemsPart withAudioProfile(Optional<String> audioProfile) {
|
||||
Utils.checkNotNull(audioProfile, "audioProfile");
|
||||
this.audioProfile = audioProfile;
|
||||
@@ -268,42 +489,24 @@ public class GetLibraryItemsPart {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withOptimizedForStreaming(boolean optimizedForStreaming) {
|
||||
/**
|
||||
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
public GetLibraryItemsPart withOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreaming optimizedForStreaming) {
|
||||
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
|
||||
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withOptimizedForStreaming(Optional<Boolean> optimizedForStreaming) {
|
||||
/**
|
||||
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
public GetLibraryItemsPart withOptimizedForStreaming(Optional<? extends GetLibraryItemsLibraryOptimizedForStreaming> optimizedForStreaming) {
|
||||
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
|
||||
this.optimizedForStreaming = optimizedForStreaming;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withVideoProfile(String videoProfile) {
|
||||
Utils.checkNotNull(videoProfile, "videoProfile");
|
||||
this.videoProfile = Optional.ofNullable(videoProfile);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withVideoProfile(Optional<String> videoProfile) {
|
||||
Utils.checkNotNull(videoProfile, "videoProfile");
|
||||
this.videoProfile = videoProfile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withIndexes(String indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = Optional.ofNullable(indexes);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withIndexes(Optional<String> indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = indexes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withHasThumbnail(GetLibraryItemsHasThumbnail hasThumbnail) {
|
||||
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
|
||||
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
|
||||
@@ -316,18 +519,6 @@ public class GetLibraryItemsPart {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withStream(List<GetLibraryItemsStream> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = Optional.ofNullable(stream);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart withStream(Optional<? extends List<GetLibraryItemsStream>> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = stream;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -339,140 +530,288 @@ public class GetLibraryItemsPart {
|
||||
}
|
||||
GetLibraryItemsPart other = (GetLibraryItemsPart) 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);
|
||||
Objects.deepEquals(this.hasThumbnail, other.hasThumbnail);
|
||||
}
|
||||
|
||||
@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);
|
||||
hasThumbnail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsPart.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);
|
||||
"hasThumbnail", hasThumbnail);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Integer id;
|
||||
private Optional<Boolean> accessible = Optional.empty();
|
||||
|
||||
private String key;
|
||||
private Optional<Boolean> exists = Optional.empty();
|
||||
|
||||
private Long id;
|
||||
|
||||
private Optional<String> key = Optional.empty();
|
||||
|
||||
private Optional<String> indexes = Optional.empty();
|
||||
|
||||
private Optional<Integer> duration = Optional.empty();
|
||||
|
||||
private String file;
|
||||
private Optional<String> file = Optional.empty();
|
||||
|
||||
private Long size;
|
||||
private Optional<Long> size = Optional.empty();
|
||||
|
||||
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 GetLibraryItemsLibraryOptimizedForStreaming> optimizedForStreaming = Optional.empty();
|
||||
|
||||
private Optional<? extends GetLibraryItemsHasThumbnail> hasThumbnail;
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsStream>> stream = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// 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 = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public Builder key(Optional<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 = Optional.ofNullable(file);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public Builder file(Optional<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 = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public Builder size(Optional<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;
|
||||
@@ -491,42 +830,24 @@ public class GetLibraryItemsPart {
|
||||
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(GetLibraryItemsLibraryOptimizedForStreaming 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 GetLibraryItemsLibraryOptimizedForStreaming> 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(GetLibraryItemsHasThumbnail hasThumbnail) {
|
||||
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
|
||||
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
|
||||
@@ -538,37 +859,27 @@ public class GetLibraryItemsPart {
|
||||
this.hasThumbnail = hasThumbnail;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder stream(List<GetLibraryItemsStream> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = Optional.ofNullable(stream);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder stream(Optional<? extends List<GetLibraryItemsStream>> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = stream;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsPart build() {
|
||||
if (hasThumbnail == null) {
|
||||
hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value();
|
||||
}
|
||||
return new GetLibraryItemsPart(
|
||||
accessible,
|
||||
exists,
|
||||
id,
|
||||
key,
|
||||
indexes,
|
||||
duration,
|
||||
file,
|
||||
size,
|
||||
packetLength,
|
||||
container,
|
||||
videoProfile,
|
||||
audioProfile,
|
||||
has64bitOffsets,
|
||||
optimizedForStreaming,
|
||||
videoProfile,
|
||||
indexes,
|
||||
hasThumbnail,
|
||||
stream);
|
||||
hasThumbnail);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Optional<? extends GetLibraryItemsHasThumbnail>> _SINGLETON_VALUE_HasThumbnail =
|
||||
|
||||
@@ -0,0 +1,353 @@
|
||||
/*
|
||||
* 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 GetLibraryItemsProducer {
|
||||
|
||||
/**
|
||||
* 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 GetLibraryItemsProducer(
|
||||
@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 GetLibraryItemsProducer(
|
||||
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 GetLibraryItemsProducer withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string for the role.
|
||||
*/
|
||||
public GetLibraryItemsProducer withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The actor's name.
|
||||
*/
|
||||
public GetLibraryItemsProducer withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A key associated with the actor tag.
|
||||
*/
|
||||
public GetLibraryItemsProducer withTagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The character name or role.
|
||||
*/
|
||||
public GetLibraryItemsProducer withRole(String role) {
|
||||
Utils.checkNotNull(role, "role");
|
||||
this.role = Optional.ofNullable(role);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The character name or role.
|
||||
*/
|
||||
public GetLibraryItemsProducer withRole(Optional<String> role) {
|
||||
Utils.checkNotNull(role, "role");
|
||||
this.role = role;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the role thumbnail image.
|
||||
*/
|
||||
public GetLibraryItemsProducer withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the role thumbnail image.
|
||||
*/
|
||||
public GetLibraryItemsProducer 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;
|
||||
}
|
||||
GetLibraryItemsProducer other = (GetLibraryItemsProducer) 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(GetLibraryItemsProducer.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 GetLibraryItemsProducer build() {
|
||||
return new GetLibraryItemsProducer(
|
||||
id,
|
||||
filter,
|
||||
tag,
|
||||
tagKey,
|
||||
role,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -18,217 +18,112 @@ import java.util.Optional;
|
||||
public class GetLibraryItemsRole {
|
||||
|
||||
/**
|
||||
* The ID of the tag or actor.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("id")
|
||||
private Optional<Long> id;
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
* The display tag for the actor (typically the actor's name).
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("filter")
|
||||
private Optional<String> filter;
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
@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 absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsRole(
|
||||
@JsonProperty("id") Optional<Long> id,
|
||||
@JsonProperty("filter") Optional<String> filter,
|
||||
@JsonProperty("thumb") Optional<String> thumb,
|
||||
@JsonProperty("tag") Optional<String> tag,
|
||||
@JsonProperty("tagKey") Optional<String> tagKey,
|
||||
@JsonProperty("role") Optional<String> role) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@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 GetLibraryItemsRole() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
public GetLibraryItemsRole(
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the tag or actor.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> id() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
* The display tag for the actor (typically the actor's name).
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> filter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tagKey() {
|
||||
return tagKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 absolute 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.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public GetLibraryItemsRole withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = Optional.ofNullable(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the tag or actor.
|
||||
*/
|
||||
public GetLibraryItemsRole withId(Optional<Long> id) {
|
||||
public GetLibraryItemsRole withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
*/
|
||||
public GetLibraryItemsRole withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
*/
|
||||
public GetLibraryItemsRole withFilter(Optional<String> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
public GetLibraryItemsRole withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
public GetLibraryItemsRole 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 GetLibraryItemsRole withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the tag or actor.
|
||||
*/
|
||||
public GetLibraryItemsRole withTag(Optional<String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the tag.
|
||||
*/
|
||||
public GetLibraryItemsRole withTagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = Optional.ofNullable(tagKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the tag.
|
||||
*/
|
||||
public GetLibraryItemsRole withTagKey(Optional<String> tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of the actor or tag in the media.
|
||||
* The role played by the actor in the media item.
|
||||
*/
|
||||
public GetLibraryItemsRole withRole(String role) {
|
||||
Utils.checkNotNull(role, "role");
|
||||
@@ -237,7 +132,7 @@ public class GetLibraryItemsRole {
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of the actor or tag in the media.
|
||||
* The role played by the actor in the media item.
|
||||
*/
|
||||
public GetLibraryItemsRole withRole(Optional<String> role) {
|
||||
Utils.checkNotNull(role, "role");
|
||||
@@ -245,6 +140,24 @@ public class GetLibraryItemsRole {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
public GetLibraryItemsRole withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
public GetLibraryItemsRole withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -257,145 +170,64 @@ public class GetLibraryItemsRole {
|
||||
GetLibraryItemsRole other = (GetLibraryItemsRole) o;
|
||||
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
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
filter,
|
||||
thumb,
|
||||
tag,
|
||||
tagKey,
|
||||
role);
|
||||
role,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsRole.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 Integer id;
|
||||
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private Optional<String> thumb = Optional.empty();
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
|
||||
private Optional<String> tagKey = Optional.empty();
|
||||
private String tag;
|
||||
|
||||
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.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
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) {
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
public Builder tagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = Optional.ofNullable(tagKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the tag.
|
||||
*/
|
||||
public Builder tagKey(Optional<String> tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 +236,38 @@ public class GetLibraryItemsRole {
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 absolute 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 absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsRole build() {
|
||||
return new GetLibraryItemsRole(
|
||||
id,
|
||||
filter,
|
||||
thumb,
|
||||
tag,
|
||||
tagKey,
|
||||
role);
|
||||
role,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* 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 GetLibraryItemsSimilar {
|
||||
|
||||
/**
|
||||
* 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 GetLibraryItemsSimilar(
|
||||
@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 GetLibraryItemsSimilar withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string for similar items.
|
||||
*/
|
||||
public GetLibraryItemsSimilar withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The tag or title of the similar content.
|
||||
*/
|
||||
public GetLibraryItemsSimilar 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;
|
||||
}
|
||||
GetLibraryItemsSimilar other = (GetLibraryItemsSimilar) 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(GetLibraryItemsSimilar.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 GetLibraryItemsSimilar build() {
|
||||
return new GetLibraryItemsSimilar(
|
||||
id,
|
||||
filter,
|
||||
tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,356 +3,214 @@
|
||||
*/
|
||||
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 com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetLibraryItemsType
|
||||
*
|
||||
* <p>The type of media content in the Plex library. This can represent videos, music, or photos.
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibraryItemsType._Deserializer.class)
|
||||
@JsonSerialize(using = GetLibraryItemsType._Serializer.class)
|
||||
public class GetLibraryItemsType {
|
||||
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
public static final GetLibraryItemsType Movie = new GetLibraryItemsType("movie");
|
||||
public static final GetLibraryItemsType TvShow = new GetLibraryItemsType("show");
|
||||
public static final GetLibraryItemsType Season = new GetLibraryItemsType("season");
|
||||
public static final GetLibraryItemsType Episode = new GetLibraryItemsType("episode");
|
||||
public static final GetLibraryItemsType Artist = new GetLibraryItemsType("artist");
|
||||
public static final GetLibraryItemsType Album = new GetLibraryItemsType("album");
|
||||
public static final GetLibraryItemsType Track = new GetLibraryItemsType("track");
|
||||
public static final GetLibraryItemsType PhotoAlbum = new GetLibraryItemsType("photoalbum");
|
||||
public static final GetLibraryItemsType Photo = new GetLibraryItemsType("photo");
|
||||
public static final GetLibraryItemsType Collection = new GetLibraryItemsType("collection");
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, GetLibraryItemsType> values = createValuesMap();
|
||||
private static final Map<String, GetLibraryItemsTypeEnum> enums = createEnumsMap();
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("subtype")
|
||||
private Optional<String> subtype;
|
||||
private final String value;
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@JsonProperty("active")
|
||||
private boolean active;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Filter")
|
||||
private Optional<? extends List<GetLibraryItemsFilter>> filter;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Sort")
|
||||
private Optional<? extends List<GetLibraryItemsSort>> sort;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Field")
|
||||
private Optional<? extends List<GetLibraryItemsField>> field;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsType(
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("subtype") Optional<String> subtype,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("active") boolean active,
|
||||
@JsonProperty("Filter") Optional<? extends List<GetLibraryItemsFilter>> filter,
|
||||
@JsonProperty("Sort") Optional<? extends List<GetLibraryItemsSort>> sort,
|
||||
@JsonProperty("Field") Optional<? extends List<GetLibraryItemsField>> field) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(subtype, "subtype");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(active, "active");
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.key = key;
|
||||
this.type = type;
|
||||
this.subtype = subtype;
|
||||
this.title = title;
|
||||
this.active = active;
|
||||
this.filter = filter;
|
||||
this.sort = sort;
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType(
|
||||
String key,
|
||||
String type,
|
||||
String title,
|
||||
boolean active) {
|
||||
this(key, type, Optional.empty(), title, active, Optional.empty(), Optional.empty(), Optional.empty());
|
||||
private GetLibraryItemsType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> subtype() {
|
||||
return subtype;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean active() {
|
||||
return active;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsFilter>> filter() {
|
||||
return (Optional<List<GetLibraryItemsFilter>>) filter;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsSort>> sort() {
|
||||
return (Optional<List<GetLibraryItemsSort>>) sort;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetLibraryItemsField>> field() {
|
||||
return (Optional<List<GetLibraryItemsField>>) field;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withSubtype(String subtype) {
|
||||
Utils.checkNotNull(subtype, "subtype");
|
||||
this.subtype = Optional.ofNullable(subtype);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withSubtype(Optional<String> subtype) {
|
||||
Utils.checkNotNull(subtype, "subtype");
|
||||
this.subtype = subtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withActive(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withFilter(List<GetLibraryItemsFilter> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withFilter(Optional<? extends List<GetLibraryItemsFilter>> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withSort(List<GetLibraryItemsSort> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = Optional.ofNullable(sort);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withSort(Optional<? extends List<GetLibraryItemsSort>> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withField(List<GetLibraryItemsField> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = Optional.ofNullable(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType withField(Optional<? extends List<GetLibraryItemsField>> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
/**
|
||||
* Returns a GetLibraryItemsType with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetLibraryItemsType
|
||||
*/
|
||||
public static GetLibraryItemsType of(String value) {
|
||||
synchronized (GetLibraryItemsType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetLibraryItemsType(v));
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryItemsType other = (GetLibraryItemsType) o;
|
||||
return
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.subtype, other.subtype) &&
|
||||
Objects.deepEquals(this.title, other.title) &&
|
||||
Objects.deepEquals(this.active, other.active) &&
|
||||
Objects.deepEquals(this.filter, other.filter) &&
|
||||
Objects.deepEquals(this.sort, other.sort) &&
|
||||
Objects.deepEquals(this.field, other.field);
|
||||
}
|
||||
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetLibraryItemsTypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
key,
|
||||
type,
|
||||
subtype,
|
||||
title,
|
||||
active,
|
||||
filter,
|
||||
sort,
|
||||
field);
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetLibraryItemsType other = (GetLibraryItemsType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsType.class,
|
||||
"key", key,
|
||||
"type", type,
|
||||
"subtype", subtype,
|
||||
"title", title,
|
||||
"active", active,
|
||||
"filter", filter,
|
||||
"sort", sort,
|
||||
"field", field);
|
||||
return "GetLibraryItemsType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetLibraryItemsType[] values() {
|
||||
synchronized (GetLibraryItemsType.class) {
|
||||
return values.values().toArray(new GetLibraryItemsType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsType> createValuesMap() {
|
||||
Map<String, GetLibraryItemsType> map = new LinkedHashMap<>();
|
||||
map.put("movie", Movie);
|
||||
map.put("show", TvShow);
|
||||
map.put("season", Season);
|
||||
map.put("episode", Episode);
|
||||
map.put("artist", Artist);
|
||||
map.put("album", Album);
|
||||
map.put("track", Track);
|
||||
map.put("photoalbum", PhotoAlbum);
|
||||
map.put("photo", Photo);
|
||||
map.put("collection", Collection);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetLibraryItemsTypeEnum> createEnumsMap() {
|
||||
Map<String, GetLibraryItemsTypeEnum> map = new HashMap<>();
|
||||
map.put("movie", GetLibraryItemsTypeEnum.Movie);
|
||||
map.put("show", GetLibraryItemsTypeEnum.TvShow);
|
||||
map.put("season", GetLibraryItemsTypeEnum.Season);
|
||||
map.put("episode", GetLibraryItemsTypeEnum.Episode);
|
||||
map.put("artist", GetLibraryItemsTypeEnum.Artist);
|
||||
map.put("album", GetLibraryItemsTypeEnum.Album);
|
||||
map.put("track", GetLibraryItemsTypeEnum.Track);
|
||||
map.put("photoalbum", GetLibraryItemsTypeEnum.PhotoAlbum);
|
||||
map.put("photo", GetLibraryItemsTypeEnum.Photo);
|
||||
map.put("collection", GetLibraryItemsTypeEnum.Collection);
|
||||
return map;
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String key;
|
||||
|
||||
private String type;
|
||||
|
||||
private Optional<String> subtype = Optional.empty();
|
||||
|
||||
private String title;
|
||||
|
||||
private Boolean active;
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsFilter>> filter = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsSort>> sort = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetLibraryItemsField>> field = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetLibraryItemsType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetLibraryItemsType.class);
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
@Override
|
||||
public void serialize(GetLibraryItemsType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetLibraryItemsType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetLibraryItemsType.class);
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
@Override
|
||||
public GetLibraryItemsType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetLibraryItemsType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetLibraryItemsTypeEnum {
|
||||
|
||||
Movie("movie"),
|
||||
TvShow("show"),
|
||||
Season("season"),
|
||||
Episode("episode"),
|
||||
Artist("artist"),
|
||||
Album("album"),
|
||||
Track("track"),
|
||||
PhotoAlbum("photoalbum"),
|
||||
Photo("photo"),
|
||||
Collection("collection"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetLibraryItemsTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Builder subtype(String subtype) {
|
||||
Utils.checkNotNull(subtype, "subtype");
|
||||
this.subtype = Optional.ofNullable(subtype);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subtype(Optional<String> subtype) {
|
||||
Utils.checkNotNull(subtype, "subtype");
|
||||
this.subtype = subtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder active(boolean active) {
|
||||
Utils.checkNotNull(active, "active");
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(List<GetLibraryItemsFilter> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(Optional<? extends List<GetLibraryItemsFilter>> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder sort(List<GetLibraryItemsSort> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = Optional.ofNullable(sort);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder sort(Optional<? extends List<GetLibraryItemsSort>> sort) {
|
||||
Utils.checkNotNull(sort, "sort");
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder field(List<GetLibraryItemsField> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = Optional.ofNullable(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder field(Optional<? extends List<GetLibraryItemsField>> field) {
|
||||
Utils.checkNotNull(field, "field");
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsType build() {
|
||||
return new GetLibraryItemsType(
|
||||
key,
|
||||
type,
|
||||
subtype,
|
||||
title,
|
||||
active,
|
||||
filter,
|
||||
sort,
|
||||
field);
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -16,42 +17,108 @@ import java.util.Optional;
|
||||
|
||||
public class GetLibraryItemsWriter {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* Unique identifier for the writer.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryItemsWriter(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@JsonProperty("thumb") Optional<String> thumb) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public GetLibraryItemsWriter() {
|
||||
this(Optional.empty());
|
||||
public GetLibraryItemsWriter(
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the writer.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryItemsWriter withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* Unique identifier for the writer.
|
||||
*/
|
||||
public GetLibraryItemsWriter withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsWriter withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
public GetLibraryItemsWriter withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public GetLibraryItemsWriter withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public GetLibraryItemsWriter withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -63,44 +130,80 @@ public class GetLibraryItemsWriter {
|
||||
}
|
||||
GetLibraryItemsWriter other = (GetLibraryItemsWriter) o;
|
||||
return
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag) &&
|
||||
Objects.deepEquals(this.thumb, other.thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryItemsWriter.class,
|
||||
"tag", tag);
|
||||
"id", id,
|
||||
"tag", tag,
|
||||
"thumb", thumb);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
private String tag;
|
||||
|
||||
private Optional<String> thumb = 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(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryItemsWriter build() {
|
||||
return new GetLibraryItemsWriter(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ public class GetLibrarySectionsAllLibraryOptimizedForStreaming {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static GetLibrarySectionsAllLibraryOptimizedForStreaming of(GetLibrarySectionsAllOptimizedForStreaming1 value) {
|
||||
public static GetLibrarySectionsAllLibraryOptimizedForStreaming of(GetLibrarySectionsAllOptimizedForStreamingLibrary1 value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetLibrarySectionsAllLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetLibrarySectionsAllOptimizedForStreaming1>(){}));
|
||||
return new GetLibrarySectionsAllLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetLibrarySectionsAllOptimizedForStreamingLibrary1>(){}));
|
||||
}
|
||||
|
||||
public static GetLibrarySectionsAllLibraryOptimizedForStreaming of(boolean value) {
|
||||
@@ -45,7 +45,7 @@ public class GetLibrarySectionsAllLibraryOptimizedForStreaming {
|
||||
/**
|
||||
* Returns an instance of one of these types:
|
||||
* <ul>
|
||||
* <li>{@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreaming1}</li>
|
||||
* <li>{@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1}</li>
|
||||
* <li>{@code boolean}</li>
|
||||
* </ul>
|
||||
*
|
||||
@@ -87,7 +87,7 @@ public class GetLibrarySectionsAllLibraryOptimizedForStreaming {
|
||||
public _Deserializer() {
|
||||
super(GetLibrarySectionsAllLibraryOptimizedForStreaming.class, false,
|
||||
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
|
||||
TypeReferenceWithShape.of(new TypeReference<GetLibrarySectionsAllOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
|
||||
TypeReferenceWithShape.of(new TypeReference<GetLibrarySectionsAllOptimizedForStreamingLibrary1>() {}, JsonShape.DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,14 +66,16 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionID")
|
||||
private long librarySectionID;
|
||||
private Optional<Long> librarySectionID;
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionTitle")
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle;
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
@@ -147,8 +149,8 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
@JsonProperty("art") String art,
|
||||
@JsonProperty("content") String content,
|
||||
@JsonProperty("identifier") String identifier,
|
||||
@JsonProperty("librarySectionID") long librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") String librarySectionTitle,
|
||||
@JsonProperty("librarySectionID") Optional<Long> librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
|
||||
@JsonProperty("librarySectionUUID") Optional<String> librarySectionUUID,
|
||||
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
|
||||
@JsonProperty("mediaTagVersion") long mediaTagVersion,
|
||||
@@ -207,8 +209,6 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
String art,
|
||||
String content,
|
||||
String identifier,
|
||||
long librarySectionID,
|
||||
String librarySectionTitle,
|
||||
String mediaTagPrefix,
|
||||
long mediaTagVersion,
|
||||
String thumb,
|
||||
@@ -216,7 +216,7 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
String title1,
|
||||
String title2,
|
||||
String viewGroup) {
|
||||
this(size, totalSize, offset, allowSync, art, content, identifier, librarySectionID, librarySectionTitle, Optional.empty(), mediaTagPrefix, mediaTagVersion, thumb, nocache, title1, title2, viewGroup, Optional.empty(), Optional.empty());
|
||||
this(size, totalSize, offset, allowSync, art, content, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, thumb, nocache, title1, title2, viewGroup, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,7 +279,7 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long librarySectionID() {
|
||||
public Optional<Long> librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionTitle() {
|
||||
public Optional<String> librarySectionTitle() {
|
||||
return librarySectionTitle;
|
||||
}
|
||||
|
||||
@@ -444,6 +444,15 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public GetLibrarySectionsAllMediaContainer withLibrarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public GetLibrarySectionsAllMediaContainer withLibrarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -453,6 +462,15 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetLibrarySectionsAllMediaContainer withLibrarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetLibrarySectionsAllMediaContainer withLibrarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
@@ -671,9 +689,9 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
|
||||
private String identifier;
|
||||
|
||||
private Long librarySectionID;
|
||||
private Optional<Long> librarySectionID = Optional.empty();
|
||||
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle = Optional.empty();
|
||||
|
||||
private Optional<String> librarySectionUUID = Optional.empty();
|
||||
|
||||
@@ -766,6 +784,15 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -775,6 +802,15 @@ public class GetLibrarySectionsAllMediaContainer {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
|
||||
@@ -171,8 +171,9 @@ public class GetLibrarySectionsAllMetadata {
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("originallyAvailableAt")
|
||||
private LocalDate originallyAvailableAt;
|
||||
private Optional<LocalDate> originallyAvailableAt;
|
||||
|
||||
@JsonProperty("addedAt")
|
||||
private long addedAt;
|
||||
@@ -445,7 +446,7 @@ public class GetLibrarySectionsAllMetadata {
|
||||
@JsonProperty("childCount") int childCount,
|
||||
@JsonProperty("seasonCount") int seasonCount,
|
||||
@JsonProperty("duration") int duration,
|
||||
@JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt,
|
||||
@JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
|
||||
@JsonProperty("addedAt") long addedAt,
|
||||
@JsonProperty("updatedAt") Optional<Long> updatedAt,
|
||||
@JsonProperty("audienceRatingImage") Optional<String> audienceRatingImage,
|
||||
@@ -635,9 +636,8 @@ public class GetLibrarySectionsAllMetadata {
|
||||
int childCount,
|
||||
int seasonCount,
|
||||
int duration,
|
||||
LocalDate originallyAvailableAt,
|
||||
long addedAt) {
|
||||
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());
|
||||
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, Optional.empty(), 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());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -825,7 +825,7 @@ public class GetLibrarySectionsAllMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public LocalDate originallyAvailableAt() {
|
||||
public Optional<LocalDate> originallyAvailableAt() {
|
||||
return originallyAvailableAt;
|
||||
}
|
||||
|
||||
@@ -1383,6 +1383,15 @@ public class GetLibrarySectionsAllMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public GetLibrarySectionsAllMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public GetLibrarySectionsAllMetadata withOriginallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = originallyAvailableAt;
|
||||
return this;
|
||||
@@ -2299,7 +2308,7 @@ public class GetLibrarySectionsAllMetadata {
|
||||
|
||||
private Integer duration;
|
||||
|
||||
private LocalDate originallyAvailableAt;
|
||||
private Optional<LocalDate> originallyAvailableAt = Optional.empty();
|
||||
|
||||
private Long addedAt;
|
||||
|
||||
@@ -2638,6 +2647,15 @@ public class GetLibrarySectionsAllMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public Builder originallyAvailableAt(LocalDate originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public Builder originallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = originallyAvailableAt;
|
||||
return this;
|
||||
|
||||
@@ -32,9 +32,9 @@ public class GetLibrarySectionsAllOptimizedForStreaming {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static GetLibrarySectionsAllOptimizedForStreaming of(OptimizedForStreaming1 value) {
|
||||
public static GetLibrarySectionsAllOptimizedForStreaming of(GetLibrarySectionsAllOptimizedForStreaming1 value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetLibrarySectionsAllOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<OptimizedForStreaming1>(){}));
|
||||
return new GetLibrarySectionsAllOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetLibrarySectionsAllOptimizedForStreaming1>(){}));
|
||||
}
|
||||
|
||||
public static GetLibrarySectionsAllOptimizedForStreaming of(boolean value) {
|
||||
@@ -45,7 +45,7 @@ public class GetLibrarySectionsAllOptimizedForStreaming {
|
||||
/**
|
||||
* 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.GetLibrarySectionsAllOptimizedForStreaming1}</li>
|
||||
* <li>{@code boolean}</li>
|
||||
* </ul>
|
||||
*
|
||||
@@ -87,7 +87,7 @@ public class GetLibrarySectionsAllOptimizedForStreaming {
|
||||
public _Deserializer() {
|
||||
super(GetLibrarySectionsAllOptimizedForStreaming.class, false,
|
||||
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
|
||||
TypeReferenceWithShape.of(new TypeReference<OptimizedForStreaming1>() {}, JsonShape.DEFAULT));
|
||||
TypeReferenceWithShape.of(new TypeReference<GetLibrarySectionsAllOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum GetLibrarySectionsAllOptimizedForStreamingLibrary1 {
|
||||
ZERO(0),
|
||||
ONE(1);
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private GetLibrarySectionsAllOptimizedForStreamingLibrary1(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetLibrarySectionsAllOptimizedForStreamingLibrary1> fromValue(int value) {
|
||||
for (GetLibrarySectionsAllOptimizedForStreamingLibrary1 o: GetLibrarySectionsAllOptimizedForStreamingLibrary1.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Float;
|
||||
@@ -28,12 +30,12 @@ public class GetLibrarySectionsAllStream {
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
* - VIDEO = 1
|
||||
* - AUDIO = 2
|
||||
* - SUBTITLE = 3
|
||||
*/
|
||||
@JsonProperty("streamType")
|
||||
private GetLibrarySectionsAllStreamType streamType;
|
||||
private long streamType;
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
@@ -363,7 +365,6 @@ public class GetLibrarySectionsAllStream {
|
||||
@JsonCreator
|
||||
public GetLibrarySectionsAllStream(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("streamType") GetLibrarySectionsAllStreamType streamType,
|
||||
@JsonProperty("format") Optional<String> format,
|
||||
@JsonProperty("default") Optional<Boolean> default_,
|
||||
@JsonProperty("codec") String codec,
|
||||
@@ -414,7 +415,6 @@ public class GetLibrarySectionsAllStream {
|
||||
@JsonProperty("dub") Optional<Boolean> dub,
|
||||
@JsonProperty("title") Optional<String> title) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
Utils.checkNotNull(format, "format");
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
@@ -465,7 +465,7 @@ public class GetLibrarySectionsAllStream {
|
||||
Utils.checkNotNull(dub, "dub");
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.id = id;
|
||||
this.streamType = streamType;
|
||||
this.streamType = Builder._SINGLETON_VALUE_StreamType.value();
|
||||
this.format = format;
|
||||
this.default_ = default_;
|
||||
this.codec = codec;
|
||||
@@ -519,11 +519,10 @@ public class GetLibrarySectionsAllStream {
|
||||
|
||||
public GetLibrarySectionsAllStream(
|
||||
long id,
|
||||
GetLibrarySectionsAllStreamType streamType,
|
||||
String codec,
|
||||
String displayTitle,
|
||||
String extendedDisplayTitle) {
|
||||
this(id, streamType, Optional.empty(), Optional.empty(), codec, 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(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
this(id, Optional.empty(), Optional.empty(), codec, 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(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,12 +535,12 @@ public class GetLibrarySectionsAllStream {
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
* - VIDEO = 1
|
||||
* - AUDIO = 2
|
||||
* - SUBTITLE = 3
|
||||
*/
|
||||
@JsonIgnore
|
||||
public GetLibrarySectionsAllStreamType streamType() {
|
||||
public long streamType() {
|
||||
return streamType;
|
||||
}
|
||||
|
||||
@@ -935,18 +934,6 @@ public class GetLibrarySectionsAllStream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
public GetLibrarySectionsAllStream withStreamType(GetLibrarySectionsAllStreamType streamType) {
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
this.streamType = streamType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
*/
|
||||
@@ -1952,8 +1939,6 @@ public class GetLibrarySectionsAllStream {
|
||||
|
||||
private Long id;
|
||||
|
||||
private GetLibrarySectionsAllStreamType streamType;
|
||||
|
||||
private Optional<String> format = Optional.empty();
|
||||
|
||||
private Optional<Boolean> default_ = Optional.empty();
|
||||
@@ -2065,18 +2050,6 @@ public class GetLibrarySectionsAllStream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
public Builder streamType(GetLibrarySectionsAllStreamType streamType) {
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
this.streamType = streamType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
*/
|
||||
@@ -2905,7 +2878,6 @@ public class GetLibrarySectionsAllStream {
|
||||
public GetLibrarySectionsAllStream build() {
|
||||
return new GetLibrarySectionsAllStream(
|
||||
id,
|
||||
streamType,
|
||||
format,
|
||||
default_,
|
||||
codec,
|
||||
@@ -2956,5 +2928,11 @@ public class GetLibrarySectionsAllStream {
|
||||
dub,
|
||||
title);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Long> _SINGLETON_VALUE_StreamType =
|
||||
new LazySingletonValue<>(
|
||||
"streamType",
|
||||
"1",
|
||||
new TypeReference<Long>() {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetLibrarySectionsAllStreamType
|
||||
*
|
||||
* <p>Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
@JsonDeserialize(using = GetLibrarySectionsAllStreamType._Deserializer.class)
|
||||
@JsonSerialize(using = GetLibrarySectionsAllStreamType._Serializer.class)
|
||||
public class GetLibrarySectionsAllStreamType {
|
||||
|
||||
public static final GetLibrarySectionsAllStreamType Video = new GetLibrarySectionsAllStreamType(1);
|
||||
public static final GetLibrarySectionsAllStreamType Audio = new GetLibrarySectionsAllStreamType(2);
|
||||
public static final GetLibrarySectionsAllStreamType Subtitle = new GetLibrarySectionsAllStreamType(3);
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<Integer, GetLibrarySectionsAllStreamType> values = createValuesMap();
|
||||
private static final Map<Integer, GetLibrarySectionsAllStreamTypeEnum> enums = createEnumsMap();
|
||||
|
||||
private final int value;
|
||||
|
||||
private GetLibrarySectionsAllStreamType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetLibrarySectionsAllStreamType with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetLibrarySectionsAllStreamType
|
||||
*/
|
||||
public static GetLibrarySectionsAllStreamType of(int value) {
|
||||
synchronized (GetLibrarySectionsAllStreamType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetLibrarySectionsAllStreamType(v));
|
||||
}
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetLibrarySectionsAllStreamTypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetLibrarySectionsAllStreamType other = (GetLibrarySectionsAllStreamType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetLibrarySectionsAllStreamType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetLibrarySectionsAllStreamType[] values() {
|
||||
synchronized (GetLibrarySectionsAllStreamType.class) {
|
||||
return values.values().toArray(new GetLibrarySectionsAllStreamType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<Integer, GetLibrarySectionsAllStreamType> createValuesMap() {
|
||||
Map<Integer, GetLibrarySectionsAllStreamType> map = new LinkedHashMap<>();
|
||||
map.put(1, Video);
|
||||
map.put(2, Audio);
|
||||
map.put(3, Subtitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<Integer, GetLibrarySectionsAllStreamTypeEnum> createEnumsMap() {
|
||||
Map<Integer, GetLibrarySectionsAllStreamTypeEnum> map = new HashMap<>();
|
||||
map.put(1, GetLibrarySectionsAllStreamTypeEnum.Video);
|
||||
map.put(2, GetLibrarySectionsAllStreamTypeEnum.Audio);
|
||||
map.put(3, GetLibrarySectionsAllStreamTypeEnum.Subtitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetLibrarySectionsAllStreamType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetLibrarySectionsAllStreamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetLibrarySectionsAllStreamType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetLibrarySectionsAllStreamType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetLibrarySectionsAllStreamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetLibrarySectionsAllStreamType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
int v = p.readValueAs(new TypeReference<Integer>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetLibrarySectionsAllStreamType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetLibrarySectionsAllStreamTypeEnum {
|
||||
|
||||
Video(1),
|
||||
Audio(2),
|
||||
Subtitle(3),;
|
||||
|
||||
private final int value;
|
||||
|
||||
private GetLibrarySectionsAllStreamTypeEnum(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* GetMediaMetaDataAttributes
|
||||
*
|
||||
* <p>Attributes associated with the marker.
|
||||
*/
|
||||
public class GetMediaMetaDataAttributes {
|
||||
|
||||
/**
|
||||
* The identifier for the attributes.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* The version number of the marker attributes.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("version")
|
||||
private Optional<Long> version;
|
||||
|
||||
@JsonCreator
|
||||
public GetMediaMetaDataAttributes(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("version") Optional<Long> version) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(version, "version");
|
||||
this.id = id;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataAttributes(
|
||||
long id) {
|
||||
this(id, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the attributes.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number of the marker attributes.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> version() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the attributes.
|
||||
*/
|
||||
public GetMediaMetaDataAttributes withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number of the marker attributes.
|
||||
*/
|
||||
public GetMediaMetaDataAttributes withVersion(long version) {
|
||||
Utils.checkNotNull(version, "version");
|
||||
this.version = Optional.ofNullable(version);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number of the marker attributes.
|
||||
*/
|
||||
public GetMediaMetaDataAttributes withVersion(Optional<Long> version) {
|
||||
Utils.checkNotNull(version, "version");
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetMediaMetaDataAttributes other = (GetMediaMetaDataAttributes) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.version, other.version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetMediaMetaDataAttributes.class,
|
||||
"id", id,
|
||||
"version", version);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Optional<Long> version = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the attributes.
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number of the marker attributes.
|
||||
*/
|
||||
public Builder version(long version) {
|
||||
Utils.checkNotNull(version, "version");
|
||||
this.version = Optional.ofNullable(version);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number of the marker attributes.
|
||||
*/
|
||||
public Builder version(Optional<Long> version) {
|
||||
Utils.checkNotNull(version, "version");
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataAttributes build() {
|
||||
return new GetMediaMetaDataAttributes(
|
||||
id,
|
||||
version);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* GetMediaMetaDataChapter
|
||||
*
|
||||
* <p>The thumbnail for the chapter
|
||||
*/
|
||||
public class GetMediaMetaDataChapter {
|
||||
|
||||
@JsonProperty("id")
|
||||
private long id;
|
||||
|
||||
@JsonProperty("filter")
|
||||
private String filter;
|
||||
|
||||
@JsonProperty("index")
|
||||
private long index;
|
||||
|
||||
@JsonProperty("startTimeOffset")
|
||||
private long startTimeOffset;
|
||||
|
||||
@JsonProperty("endTimeOffset")
|
||||
private long endTimeOffset;
|
||||
|
||||
@JsonProperty("thumb")
|
||||
private String thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetMediaMetaDataChapter(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("filter") String filter,
|
||||
@JsonProperty("index") long index,
|
||||
@JsonProperty("startTimeOffset") long startTimeOffset,
|
||||
@JsonProperty("endTimeOffset") long endTimeOffset,
|
||||
@JsonProperty("thumb") String thumb) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(index, "index");
|
||||
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.id = id;
|
||||
this.filter = filter;
|
||||
this.index = index;
|
||||
this.startTimeOffset = startTimeOffset;
|
||||
this.endTimeOffset = endTimeOffset;
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String filter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long index() {
|
||||
return index;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long startTimeOffset() {
|
||||
return startTimeOffset;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long endTimeOffset() {
|
||||
return endTimeOffset;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter withIndex(long index) {
|
||||
Utils.checkNotNull(index, "index");
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter withStartTimeOffset(long startTimeOffset) {
|
||||
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||
this.startTimeOffset = startTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter withEndTimeOffset(long endTimeOffset) {
|
||||
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||
this.endTimeOffset = endTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter withThumb(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;
|
||||
}
|
||||
GetMediaMetaDataChapter other = (GetMediaMetaDataChapter) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.filter, other.filter) &&
|
||||
Objects.deepEquals(this.index, other.index) &&
|
||||
Objects.deepEquals(this.startTimeOffset, other.startTimeOffset) &&
|
||||
Objects.deepEquals(this.endTimeOffset, other.endTimeOffset) &&
|
||||
Objects.deepEquals(this.thumb, other.thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
filter,
|
||||
index,
|
||||
startTimeOffset,
|
||||
endTimeOffset,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetMediaMetaDataChapter.class,
|
||||
"id", id,
|
||||
"filter", filter,
|
||||
"index", index,
|
||||
"startTimeOffset", startTimeOffset,
|
||||
"endTimeOffset", endTimeOffset,
|
||||
"thumb", thumb);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String filter;
|
||||
|
||||
private Long index;
|
||||
|
||||
private Long startTimeOffset;
|
||||
|
||||
private Long endTimeOffset;
|
||||
|
||||
private String thumb;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder id(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder index(long index) {
|
||||
Utils.checkNotNull(index, "index");
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder startTimeOffset(long startTimeOffset) {
|
||||
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||
this.startTimeOffset = startTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder endTimeOffset(long endTimeOffset) {
|
||||
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||
this.endTimeOffset = endTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataChapter build() {
|
||||
return new GetMediaMetaDataChapter(
|
||||
id,
|
||||
filter,
|
||||
index,
|
||||
startTimeOffset,
|
||||
endTimeOffset,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* 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 GetMediaMetaDataExtras {
|
||||
|
||||
/**
|
||||
* The size of the extras.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<Long> size;
|
||||
|
||||
@JsonCreator
|
||||
public GetMediaMetaDataExtras(
|
||||
@JsonProperty("size") Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataExtras() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the extras.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the extras.
|
||||
*/
|
||||
public GetMediaMetaDataExtras withSize(long size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the extras.
|
||||
*/
|
||||
public GetMediaMetaDataExtras withSize(Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetMediaMetaDataExtras other = (GetMediaMetaDataExtras) o;
|
||||
return
|
||||
Objects.deepEquals(this.size, other.size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetMediaMetaDataExtras.class,
|
||||
"size", size);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> size = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the extras.
|
||||
*/
|
||||
public Builder size(long size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the extras.
|
||||
*/
|
||||
public Builder size(Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataExtras build() {
|
||||
return new GetMediaMetaDataExtras(
|
||||
size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
/*
|
||||
* 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.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetMediaMetaDataMarker
|
||||
*
|
||||
* <p>The final status of the marker
|
||||
*/
|
||||
public class GetMediaMetaDataMarker {
|
||||
|
||||
@JsonProperty("id")
|
||||
private long id;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonProperty("startTimeOffset")
|
||||
private long startTimeOffset;
|
||||
|
||||
@JsonProperty("endTimeOffset")
|
||||
private long endTimeOffset;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("final")
|
||||
private Optional<Boolean> final_;
|
||||
|
||||
/**
|
||||
* Attributes associated with the marker.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Attributes")
|
||||
private Optional<? extends GetMediaMetaDataAttributes> attributes;
|
||||
|
||||
@JsonCreator
|
||||
public GetMediaMetaDataMarker(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("startTimeOffset") long startTimeOffset,
|
||||
@JsonProperty("endTimeOffset") long endTimeOffset,
|
||||
@JsonProperty("final") Optional<Boolean> final_,
|
||||
@JsonProperty("Attributes") Optional<? extends GetMediaMetaDataAttributes> attributes) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||
Utils.checkNotNull(final_, "final_");
|
||||
Utils.checkNotNull(attributes, "attributes");
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
this.startTimeOffset = startTimeOffset;
|
||||
this.endTimeOffset = endTimeOffset;
|
||||
this.final_ = final_;
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker(
|
||||
long id,
|
||||
String type,
|
||||
long startTimeOffset,
|
||||
long endTimeOffset) {
|
||||
this(id, type, startTimeOffset, endTimeOffset, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long startTimeOffset() {
|
||||
return startTimeOffset;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long endTimeOffset() {
|
||||
return endTimeOffset;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Boolean> final_() {
|
||||
return final_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attributes associated with the marker.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<GetMediaMetaDataAttributes> attributes() {
|
||||
return (Optional<GetMediaMetaDataAttributes>) attributes;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker withStartTimeOffset(long startTimeOffset) {
|
||||
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||
this.startTimeOffset = startTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker withEndTimeOffset(long endTimeOffset) {
|
||||
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||
this.endTimeOffset = endTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker withFinal(boolean final_) {
|
||||
Utils.checkNotNull(final_, "final_");
|
||||
this.final_ = Optional.ofNullable(final_);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker withFinal(Optional<Boolean> final_) {
|
||||
Utils.checkNotNull(final_, "final_");
|
||||
this.final_ = final_;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attributes associated with the marker.
|
||||
*/
|
||||
public GetMediaMetaDataMarker withAttributes(GetMediaMetaDataAttributes attributes) {
|
||||
Utils.checkNotNull(attributes, "attributes");
|
||||
this.attributes = Optional.ofNullable(attributes);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attributes associated with the marker.
|
||||
*/
|
||||
public GetMediaMetaDataMarker withAttributes(Optional<? extends GetMediaMetaDataAttributes> attributes) {
|
||||
Utils.checkNotNull(attributes, "attributes");
|
||||
this.attributes = attributes;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetMediaMetaDataMarker other = (GetMediaMetaDataMarker) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.startTimeOffset, other.startTimeOffset) &&
|
||||
Objects.deepEquals(this.endTimeOffset, other.endTimeOffset) &&
|
||||
Objects.deepEquals(this.final_, other.final_) &&
|
||||
Objects.deepEquals(this.attributes, other.attributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
type,
|
||||
startTimeOffset,
|
||||
endTimeOffset,
|
||||
final_,
|
||||
attributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetMediaMetaDataMarker.class,
|
||||
"id", id,
|
||||
"type", type,
|
||||
"startTimeOffset", startTimeOffset,
|
||||
"endTimeOffset", endTimeOffset,
|
||||
"final_", final_,
|
||||
"attributes", attributes);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String type;
|
||||
|
||||
private Long startTimeOffset;
|
||||
|
||||
private Long endTimeOffset;
|
||||
|
||||
private Optional<Boolean> final_ = Optional.empty();
|
||||
|
||||
private Optional<? extends GetMediaMetaDataAttributes> attributes = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder id(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder startTimeOffset(long startTimeOffset) {
|
||||
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||
this.startTimeOffset = startTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder endTimeOffset(long endTimeOffset) {
|
||||
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||
this.endTimeOffset = endTimeOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder final_(boolean final_) {
|
||||
Utils.checkNotNull(final_, "final_");
|
||||
this.final_ = Optional.ofNullable(final_);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder final_(Optional<Boolean> final_) {
|
||||
Utils.checkNotNull(final_, "final_");
|
||||
this.final_ = final_;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attributes associated with the marker.
|
||||
*/
|
||||
public Builder attributes(GetMediaMetaDataAttributes attributes) {
|
||||
Utils.checkNotNull(attributes, "attributes");
|
||||
this.attributes = Optional.ofNullable(attributes);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attributes associated with the marker.
|
||||
*/
|
||||
public Builder attributes(Optional<? extends GetMediaMetaDataAttributes> attributes) {
|
||||
Utils.checkNotNull(attributes, "attributes");
|
||||
this.attributes = attributes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMarker build() {
|
||||
return new GetMediaMetaDataMarker(
|
||||
id,
|
||||
type,
|
||||
startTimeOffset,
|
||||
endTimeOffset,
|
||||
final_,
|
||||
attributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class GetMediaMetaDataMedia {
|
||||
private Optional<String> videoResolution;
|
||||
|
||||
/**
|
||||
* File container type.
|
||||
* Container format of the media.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("container")
|
||||
@@ -137,13 +137,14 @@ public class GetMediaMetaDataMedia {
|
||||
@JsonProperty("optimizedForStreaming")
|
||||
private Optional<? extends GetMediaMetaDataOptimizedForStreaming> optimizedForStreaming;
|
||||
|
||||
/**
|
||||
* Indicates whether the media has 64-bit offsets.
|
||||
* This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("has64bitOffsets")
|
||||
private Optional<Boolean> has64bitOffsets;
|
||||
|
||||
/**
|
||||
* An array of parts for this media item.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Part")
|
||||
private Optional<? extends List<GetMediaMetaDataPart>> part;
|
||||
@@ -300,7 +301,7 @@ public class GetMediaMetaDataMedia {
|
||||
}
|
||||
|
||||
/**
|
||||
* File container type.
|
||||
* Container format of the media.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> container() {
|
||||
@@ -348,14 +349,15 @@ public class GetMediaMetaDataMedia {
|
||||
return (Optional<GetMediaMetaDataOptimizedForStreaming>) optimizedForStreaming;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the media has 64-bit offsets.
|
||||
* This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Boolean> has64bitOffsets() {
|
||||
return has64bitOffsets;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of parts for this media item.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetMediaMetaDataPart>> part() {
|
||||
@@ -550,7 +552,7 @@ public class GetMediaMetaDataMedia {
|
||||
}
|
||||
|
||||
/**
|
||||
* File container type.
|
||||
* Container format of the media.
|
||||
*/
|
||||
public GetMediaMetaDataMedia withContainer(String container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
@@ -559,7 +561,7 @@ public class GetMediaMetaDataMedia {
|
||||
}
|
||||
|
||||
/**
|
||||
* File container type.
|
||||
* Container format of the media.
|
||||
*/
|
||||
public GetMediaMetaDataMedia withContainer(Optional<String> container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
@@ -657,30 +659,32 @@ public class GetMediaMetaDataMedia {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the media has 64-bit offsets.
|
||||
* This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||||
*/
|
||||
public GetMediaMetaDataMedia withHas64bitOffsets(boolean has64bitOffsets) {
|
||||
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
|
||||
this.has64bitOffsets = Optional.ofNullable(has64bitOffsets);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the media has 64-bit offsets.
|
||||
* This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||||
*/
|
||||
public GetMediaMetaDataMedia withHas64bitOffsets(Optional<Boolean> has64bitOffsets) {
|
||||
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
|
||||
this.has64bitOffsets = has64bitOffsets;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
@@ -995,7 +999,7 @@ public class GetMediaMetaDataMedia {
|
||||
}
|
||||
|
||||
/**
|
||||
* File container type.
|
||||
* Container format of the media.
|
||||
*/
|
||||
public Builder container(String container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
@@ -1004,7 +1008,7 @@ public class GetMediaMetaDataMedia {
|
||||
}
|
||||
|
||||
/**
|
||||
* File container type.
|
||||
* Container format of the media.
|
||||
*/
|
||||
public Builder container(Optional<String> container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
@@ -1102,30 +1106,32 @@ public class GetMediaMetaDataMedia {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the media has 64-bit offsets.
|
||||
* This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||||
*/
|
||||
public Builder has64bitOffsets(boolean has64bitOffsets) {
|
||||
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
|
||||
this.has64bitOffsets = Optional.ofNullable(has64bitOffsets);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the media has 64-bit offsets.
|
||||
* This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
|
||||
*/
|
||||
public Builder has64bitOffsets(Optional<Boolean> has64bitOffsets) {
|
||||
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
|
||||
this.has64bitOffsets = has64bitOffsets;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -41,14 +41,16 @@ public class GetMediaMetaDataMediaContainer {
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionID")
|
||||
private long librarySectionID;
|
||||
private Optional<Long> librarySectionID;
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionTitle")
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle;
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
@@ -80,8 +82,8 @@ public class GetMediaMetaDataMediaContainer {
|
||||
@JsonProperty("size") int size,
|
||||
@JsonProperty("allowSync") boolean allowSync,
|
||||
@JsonProperty("identifier") String identifier,
|
||||
@JsonProperty("librarySectionID") long librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") String librarySectionTitle,
|
||||
@JsonProperty("librarySectionID") Optional<Long> librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
|
||||
@JsonProperty("librarySectionUUID") Optional<String> librarySectionUUID,
|
||||
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
|
||||
@JsonProperty("mediaTagVersion") long mediaTagVersion,
|
||||
@@ -110,12 +112,10 @@ public class GetMediaMetaDataMediaContainer {
|
||||
int size,
|
||||
boolean allowSync,
|
||||
String identifier,
|
||||
long librarySectionID,
|
||||
String librarySectionTitle,
|
||||
String mediaTagPrefix,
|
||||
long mediaTagVersion,
|
||||
List<GetMediaMetaDataMetadata> metadata) {
|
||||
this(size, allowSync, identifier, librarySectionID, librarySectionTitle, Optional.empty(), mediaTagPrefix, mediaTagVersion, metadata);
|
||||
this(size, allowSync, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,7 +146,7 @@ public class GetMediaMetaDataMediaContainer {
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long librarySectionID() {
|
||||
public Optional<Long> librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public class GetMediaMetaDataMediaContainer {
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionTitle() {
|
||||
public Optional<String> librarySectionTitle() {
|
||||
return librarySectionTitle;
|
||||
}
|
||||
|
||||
@@ -225,6 +225,15 @@ public class GetMediaMetaDataMediaContainer {
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMediaContainer withLibrarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMediaContainer withLibrarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -234,6 +243,15 @@ public class GetMediaMetaDataMediaContainer {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMediaContainer withLibrarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMediaContainer withLibrarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
@@ -342,9 +360,9 @@ public class GetMediaMetaDataMediaContainer {
|
||||
|
||||
private String identifier;
|
||||
|
||||
private Long librarySectionID;
|
||||
private Optional<Long> librarySectionID = Optional.empty();
|
||||
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle = Optional.empty();
|
||||
|
||||
private Optional<String> librarySectionUUID = Optional.empty();
|
||||
|
||||
@@ -389,6 +407,15 @@ public class GetMediaMetaDataMediaContainer {
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -398,6 +425,15 @@ public class GetMediaMetaDataMediaContainer {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
|
||||
@@ -171,8 +171,9 @@ public class GetMediaMetaDataMetadata {
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("originallyAvailableAt")
|
||||
private LocalDate originallyAvailableAt;
|
||||
private Optional<LocalDate> originallyAvailableAt;
|
||||
|
||||
@JsonProperty("addedAt")
|
||||
private long addedAt;
|
||||
@@ -391,20 +392,23 @@ public class GetMediaMetaDataMetadata {
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionID")
|
||||
private long librarySectionID;
|
||||
private Optional<Long> librarySectionID;
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionTitle")
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle;
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionKey")
|
||||
private String librarySectionKey;
|
||||
private Optional<String> librarySectionKey;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Guid")
|
||||
@@ -440,7 +444,7 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Rating")
|
||||
private Optional<? extends List<Ratings>> ratings;
|
||||
private Optional<? extends List<GetMediaMetaDataRatings>> ratings;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Similar")
|
||||
@@ -452,15 +456,15 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Chapter")
|
||||
private Optional<? extends List<Chapter>> chapter;
|
||||
private Optional<? extends List<GetMediaMetaDataChapter>> chapter;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Marker")
|
||||
private Optional<? extends List<Marker>> marker;
|
||||
private Optional<? extends List<GetMediaMetaDataMarker>> marker;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Extras")
|
||||
private Optional<? extends Extras> extras;
|
||||
private Optional<? extends GetMediaMetaDataExtras> extras;
|
||||
|
||||
@JsonCreator
|
||||
public GetMediaMetaDataMetadata(
|
||||
@@ -487,7 +491,7 @@ public class GetMediaMetaDataMetadata {
|
||||
@JsonProperty("childCount") int childCount,
|
||||
@JsonProperty("seasonCount") int seasonCount,
|
||||
@JsonProperty("duration") int duration,
|
||||
@JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt,
|
||||
@JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
|
||||
@JsonProperty("addedAt") long addedAt,
|
||||
@JsonProperty("updatedAt") Optional<Long> updatedAt,
|
||||
@JsonProperty("audienceRatingImage") Optional<String> audienceRatingImage,
|
||||
@@ -520,9 +524,9 @@ public class GetMediaMetaDataMetadata {
|
||||
@JsonProperty("userRating") Optional<Float> userRating,
|
||||
@JsonProperty("Image") Optional<? extends List<GetMediaMetaDataImage>> image,
|
||||
@JsonProperty("UltraBlurColors") Optional<? extends GetMediaMetaDataUltraBlurColors> ultraBlurColors,
|
||||
@JsonProperty("librarySectionID") long librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") String librarySectionTitle,
|
||||
@JsonProperty("librarySectionKey") String librarySectionKey,
|
||||
@JsonProperty("librarySectionID") Optional<Long> librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
|
||||
@JsonProperty("librarySectionKey") Optional<String> librarySectionKey,
|
||||
@JsonProperty("Guid") Optional<? extends List<GetMediaMetaDataGuids>> guids,
|
||||
@JsonProperty("Media") Optional<? extends List<GetMediaMetaDataMedia>> media,
|
||||
@JsonProperty("Genre") Optional<? extends List<GetMediaMetaDataGenre>> genre,
|
||||
@@ -531,12 +535,12 @@ public class GetMediaMetaDataMetadata {
|
||||
@JsonProperty("Writer") Optional<? extends List<GetMediaMetaDataWriter>> writer,
|
||||
@JsonProperty("Producer") Optional<? extends List<GetMediaMetaDataProducer>> producer,
|
||||
@JsonProperty("Role") Optional<? extends List<GetMediaMetaDataRole>> role,
|
||||
@JsonProperty("Rating") Optional<? extends List<Ratings>> ratings,
|
||||
@JsonProperty("Rating") Optional<? extends List<GetMediaMetaDataRatings>> ratings,
|
||||
@JsonProperty("Similar") Optional<? extends List<GetMediaMetaDataSimilar>> similar,
|
||||
@JsonProperty("Location") Optional<? extends List<GetMediaMetaDataLocation>> location,
|
||||
@JsonProperty("Chapter") Optional<? extends List<Chapter>> chapter,
|
||||
@JsonProperty("Marker") Optional<? extends List<Marker>> marker,
|
||||
@JsonProperty("Extras") Optional<? extends Extras> extras) {
|
||||
@JsonProperty("Chapter") Optional<? extends List<GetMediaMetaDataChapter>> chapter,
|
||||
@JsonProperty("Marker") Optional<? extends List<GetMediaMetaDataMarker>> marker,
|
||||
@JsonProperty("Extras") Optional<? extends GetMediaMetaDataExtras> extras) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
@@ -704,12 +708,8 @@ public class GetMediaMetaDataMetadata {
|
||||
int childCount,
|
||||
int seasonCount,
|
||||
int duration,
|
||||
LocalDate originallyAvailableAt,
|
||||
long addedAt,
|
||||
long librarySectionID,
|
||||
String librarySectionTitle,
|
||||
String librarySectionKey) {
|
||||
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(), librarySectionID, librarySectionTitle, librarySectionKey, 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());
|
||||
long addedAt) {
|
||||
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, Optional.empty(), 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(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -897,7 +897,7 @@ public class GetMediaMetaDataMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public LocalDate originallyAvailableAt() {
|
||||
public Optional<LocalDate> originallyAvailableAt() {
|
||||
return originallyAvailableAt;
|
||||
}
|
||||
|
||||
@@ -1154,7 +1154,7 @@ public class GetMediaMetaDataMetadata {
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long librarySectionID() {
|
||||
public Optional<Long> librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
@@ -1162,7 +1162,7 @@ public class GetMediaMetaDataMetadata {
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionTitle() {
|
||||
public Optional<String> librarySectionTitle() {
|
||||
return librarySectionTitle;
|
||||
}
|
||||
|
||||
@@ -1170,7 +1170,7 @@ public class GetMediaMetaDataMetadata {
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionKey() {
|
||||
public Optional<String> librarySectionKey() {
|
||||
return librarySectionKey;
|
||||
}
|
||||
|
||||
@@ -1224,8 +1224,8 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<Ratings>> ratings() {
|
||||
return (Optional<List<Ratings>>) ratings;
|
||||
public Optional<List<GetMediaMetaDataRatings>> ratings() {
|
||||
return (Optional<List<GetMediaMetaDataRatings>>) ratings;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -1242,20 +1242,20 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<Chapter>> chapter() {
|
||||
return (Optional<List<Chapter>>) chapter;
|
||||
public Optional<List<GetMediaMetaDataChapter>> chapter() {
|
||||
return (Optional<List<GetMediaMetaDataChapter>>) chapter;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<Marker>> marker() {
|
||||
return (Optional<List<Marker>>) marker;
|
||||
public Optional<List<GetMediaMetaDataMarker>> marker() {
|
||||
return (Optional<List<GetMediaMetaDataMarker>>) marker;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<Extras> extras() {
|
||||
return (Optional<Extras>) extras;
|
||||
public Optional<GetMediaMetaDataExtras> extras() {
|
||||
return (Optional<GetMediaMetaDataExtras>) extras;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
@@ -1515,6 +1515,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withOriginallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = originallyAvailableAt;
|
||||
return this;
|
||||
@@ -2076,6 +2085,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withLibrarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withLibrarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -2085,6 +2103,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withLibrarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withLibrarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
@@ -2094,6 +2121,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withLibrarySectionKey(String librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = Optional.ofNullable(librarySectionKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public GetMediaMetaDataMetadata withLibrarySectionKey(Optional<String> librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
return this;
|
||||
@@ -2195,13 +2231,13 @@ public class GetMediaMetaDataMetadata {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withRatings(List<Ratings> ratings) {
|
||||
public GetMediaMetaDataMetadata withRatings(List<GetMediaMetaDataRatings> ratings) {
|
||||
Utils.checkNotNull(ratings, "ratings");
|
||||
this.ratings = Optional.ofNullable(ratings);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withRatings(Optional<? extends List<Ratings>> ratings) {
|
||||
public GetMediaMetaDataMetadata withRatings(Optional<? extends List<GetMediaMetaDataRatings>> ratings) {
|
||||
Utils.checkNotNull(ratings, "ratings");
|
||||
this.ratings = ratings;
|
||||
return this;
|
||||
@@ -2231,37 +2267,37 @@ public class GetMediaMetaDataMetadata {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withChapter(List<Chapter> chapter) {
|
||||
public GetMediaMetaDataMetadata withChapter(List<GetMediaMetaDataChapter> chapter) {
|
||||
Utils.checkNotNull(chapter, "chapter");
|
||||
this.chapter = Optional.ofNullable(chapter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withChapter(Optional<? extends List<Chapter>> chapter) {
|
||||
public GetMediaMetaDataMetadata withChapter(Optional<? extends List<GetMediaMetaDataChapter>> chapter) {
|
||||
Utils.checkNotNull(chapter, "chapter");
|
||||
this.chapter = chapter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withMarker(List<Marker> marker) {
|
||||
public GetMediaMetaDataMetadata withMarker(List<GetMediaMetaDataMarker> marker) {
|
||||
Utils.checkNotNull(marker, "marker");
|
||||
this.marker = Optional.ofNullable(marker);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withMarker(Optional<? extends List<Marker>> marker) {
|
||||
public GetMediaMetaDataMetadata withMarker(Optional<? extends List<GetMediaMetaDataMarker>> marker) {
|
||||
Utils.checkNotNull(marker, "marker");
|
||||
this.marker = marker;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withExtras(Extras extras) {
|
||||
public GetMediaMetaDataMetadata withExtras(GetMediaMetaDataExtras extras) {
|
||||
Utils.checkNotNull(extras, "extras");
|
||||
this.extras = Optional.ofNullable(extras);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetMediaMetaDataMetadata withExtras(Optional<? extends Extras> extras) {
|
||||
public GetMediaMetaDataMetadata withExtras(Optional<? extends GetMediaMetaDataExtras> extras) {
|
||||
Utils.checkNotNull(extras, "extras");
|
||||
this.extras = extras;
|
||||
return this;
|
||||
@@ -2557,7 +2593,7 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
private Integer duration;
|
||||
|
||||
private LocalDate originallyAvailableAt;
|
||||
private Optional<LocalDate> originallyAvailableAt = Optional.empty();
|
||||
|
||||
private Long addedAt;
|
||||
|
||||
@@ -2623,11 +2659,11 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
private Optional<? extends GetMediaMetaDataUltraBlurColors> ultraBlurColors = Optional.empty();
|
||||
|
||||
private Long librarySectionID;
|
||||
private Optional<Long> librarySectionID = Optional.empty();
|
||||
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle = Optional.empty();
|
||||
|
||||
private String librarySectionKey;
|
||||
private Optional<String> librarySectionKey = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetMediaMetaDataGuids>> guids = Optional.empty();
|
||||
|
||||
@@ -2645,17 +2681,17 @@ public class GetMediaMetaDataMetadata {
|
||||
|
||||
private Optional<? extends List<GetMediaMetaDataRole>> role = Optional.empty();
|
||||
|
||||
private Optional<? extends List<Ratings>> ratings = Optional.empty();
|
||||
private Optional<? extends List<GetMediaMetaDataRatings>> ratings = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetMediaMetaDataSimilar>> similar = Optional.empty();
|
||||
|
||||
private Optional<? extends List<GetMediaMetaDataLocation>> location = Optional.empty();
|
||||
|
||||
private Optional<? extends List<Chapter>> chapter = Optional.empty();
|
||||
private Optional<? extends List<GetMediaMetaDataChapter>> chapter = Optional.empty();
|
||||
|
||||
private Optional<? extends List<Marker>> marker = Optional.empty();
|
||||
private Optional<? extends List<GetMediaMetaDataMarker>> marker = Optional.empty();
|
||||
|
||||
private Optional<? extends Extras> extras = Optional.empty();
|
||||
private Optional<? extends GetMediaMetaDataExtras> extras = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
@@ -2914,6 +2950,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public Builder originallyAvailableAt(LocalDate originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public Builder originallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = originallyAvailableAt;
|
||||
return this;
|
||||
@@ -3475,6 +3520,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -3484,6 +3538,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
@@ -3493,6 +3556,15 @@ public class GetMediaMetaDataMetadata {
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public Builder librarySectionKey(String librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = Optional.ofNullable(librarySectionKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public Builder librarySectionKey(Optional<String> librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
return this;
|
||||
@@ -3594,13 +3666,13 @@ public class GetMediaMetaDataMetadata {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder ratings(List<Ratings> ratings) {
|
||||
public Builder ratings(List<GetMediaMetaDataRatings> ratings) {
|
||||
Utils.checkNotNull(ratings, "ratings");
|
||||
this.ratings = Optional.ofNullable(ratings);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder ratings(Optional<? extends List<Ratings>> ratings) {
|
||||
public Builder ratings(Optional<? extends List<GetMediaMetaDataRatings>> ratings) {
|
||||
Utils.checkNotNull(ratings, "ratings");
|
||||
this.ratings = ratings;
|
||||
return this;
|
||||
@@ -3630,37 +3702,37 @@ public class GetMediaMetaDataMetadata {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder chapter(List<Chapter> chapter) {
|
||||
public Builder chapter(List<GetMediaMetaDataChapter> chapter) {
|
||||
Utils.checkNotNull(chapter, "chapter");
|
||||
this.chapter = Optional.ofNullable(chapter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder chapter(Optional<? extends List<Chapter>> chapter) {
|
||||
public Builder chapter(Optional<? extends List<GetMediaMetaDataChapter>> chapter) {
|
||||
Utils.checkNotNull(chapter, "chapter");
|
||||
this.chapter = chapter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder marker(List<Marker> marker) {
|
||||
public Builder marker(List<GetMediaMetaDataMarker> marker) {
|
||||
Utils.checkNotNull(marker, "marker");
|
||||
this.marker = Optional.ofNullable(marker);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder marker(Optional<? extends List<Marker>> marker) {
|
||||
public Builder marker(Optional<? extends List<GetMediaMetaDataMarker>> marker) {
|
||||
Utils.checkNotNull(marker, "marker");
|
||||
this.marker = marker;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder extras(Extras extras) {
|
||||
public Builder extras(GetMediaMetaDataExtras extras) {
|
||||
Utils.checkNotNull(extras, "extras");
|
||||
this.extras = Optional.ofNullable(extras);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder extras(Optional<? extends Extras> extras) {
|
||||
public Builder extras(Optional<? extends GetMediaMetaDataExtras> extras) {
|
||||
Utils.checkNotNull(extras, "extras");
|
||||
this.extras = extras;
|
||||
return this;
|
||||
|
||||
@@ -46,8 +46,9 @@ public class GetMediaMetaDataPart {
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
private Optional<String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("indexes")
|
||||
@@ -63,14 +64,16 @@ public class GetMediaMetaDataPart {
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("file")
|
||||
private String file;
|
||||
private Optional<String> file;
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private long size;
|
||||
private Optional<Long> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("packetLength")
|
||||
@@ -112,9 +115,6 @@ public class GetMediaMetaDataPart {
|
||||
@JsonProperty("hasThumbnail")
|
||||
private Optional<? extends GetMediaMetaDataHasThumbnail> hasThumbnail;
|
||||
|
||||
/**
|
||||
* An array of streams for this part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Stream")
|
||||
private Optional<? extends List<GetMediaMetaDataStream>> stream;
|
||||
@@ -124,11 +124,11 @@ public class GetMediaMetaDataPart {
|
||||
@JsonProperty("accessible") Optional<Boolean> accessible,
|
||||
@JsonProperty("exists") Optional<Boolean> exists,
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("key") Optional<String> key,
|
||||
@JsonProperty("indexes") Optional<String> indexes,
|
||||
@JsonProperty("duration") Optional<Integer> duration,
|
||||
@JsonProperty("file") String file,
|
||||
@JsonProperty("size") long size,
|
||||
@JsonProperty("file") Optional<String> file,
|
||||
@JsonProperty("size") Optional<Long> size,
|
||||
@JsonProperty("packetLength") Optional<Integer> packetLength,
|
||||
@JsonProperty("container") Optional<String> container,
|
||||
@JsonProperty("videoProfile") Optional<String> videoProfile,
|
||||
@@ -172,11 +172,8 @@ public class GetMediaMetaDataPart {
|
||||
}
|
||||
|
||||
public GetMediaMetaDataPart(
|
||||
long id,
|
||||
String key,
|
||||
String file,
|
||||
long size) {
|
||||
this(Optional.empty(), Optional.empty(), id, key, Optional.empty(), Optional.empty(), file, size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
long id) {
|
||||
this(Optional.empty(), Optional.empty(), 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());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,7 +204,7 @@ public class GetMediaMetaDataPart {
|
||||
* Key to access this part.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
public Optional<String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -228,7 +225,7 @@ public class GetMediaMetaDataPart {
|
||||
* File path for the part.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String file() {
|
||||
public Optional<String> file() {
|
||||
return file;
|
||||
}
|
||||
|
||||
@@ -236,7 +233,7 @@ public class GetMediaMetaDataPart {
|
||||
* File size in bytes.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long size() {
|
||||
public Optional<Long> size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -289,9 +286,6 @@ public class GetMediaMetaDataPart {
|
||||
return (Optional<GetMediaMetaDataHasThumbnail>) hasThumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of streams for this part.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetMediaMetaDataStream>> stream() {
|
||||
@@ -351,6 +345,15 @@ public class GetMediaMetaDataPart {
|
||||
* Key to access this part.
|
||||
*/
|
||||
public GetMediaMetaDataPart withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public GetMediaMetaDataPart withKey(Optional<String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
@@ -390,6 +393,15 @@ public class GetMediaMetaDataPart {
|
||||
* File path for the part.
|
||||
*/
|
||||
public GetMediaMetaDataPart withFile(String file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = Optional.ofNullable(file);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public GetMediaMetaDataPart withFile(Optional<String> file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = file;
|
||||
return this;
|
||||
@@ -399,6 +411,15 @@ public class GetMediaMetaDataPart {
|
||||
* File size in bytes.
|
||||
*/
|
||||
public GetMediaMetaDataPart withSize(long size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public GetMediaMetaDataPart withSize(Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
@@ -512,18 +533,12 @@ public class GetMediaMetaDataPart {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of streams for this part.
|
||||
*/
|
||||
public GetMediaMetaDataPart withStream(List<GetMediaMetaDataStream> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = Optional.ofNullable(stream);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of streams for this part.
|
||||
*/
|
||||
public GetMediaMetaDataPart withStream(Optional<? extends List<GetMediaMetaDataStream>> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = stream;
|
||||
@@ -609,15 +624,15 @@ public class GetMediaMetaDataPart {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String key;
|
||||
private Optional<String> key = Optional.empty();
|
||||
|
||||
private Optional<String> indexes = Optional.empty();
|
||||
|
||||
private Optional<Integer> duration = Optional.empty();
|
||||
|
||||
private String file;
|
||||
private Optional<String> file = Optional.empty();
|
||||
|
||||
private Long size;
|
||||
private Optional<Long> size = Optional.empty();
|
||||
|
||||
private Optional<Integer> packetLength = Optional.empty();
|
||||
|
||||
@@ -688,6 +703,15 @@ public class GetMediaMetaDataPart {
|
||||
* Key to access this part.
|
||||
*/
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public Builder key(Optional<String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
@@ -727,6 +751,15 @@ public class GetMediaMetaDataPart {
|
||||
* File path for the part.
|
||||
*/
|
||||
public Builder file(String file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = Optional.ofNullable(file);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public Builder file(Optional<String> file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = file;
|
||||
return this;
|
||||
@@ -736,6 +769,15 @@ public class GetMediaMetaDataPart {
|
||||
* File size in bytes.
|
||||
*/
|
||||
public Builder size(long size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public Builder size(Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
@@ -849,18 +891,12 @@ public class GetMediaMetaDataPart {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of streams for this part.
|
||||
*/
|
||||
public Builder stream(List<GetMediaMetaDataStream> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = Optional.ofNullable(stream);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of streams for this part.
|
||||
*/
|
||||
public Builder stream(Optional<? extends List<GetMediaMetaDataStream>> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = stream;
|
||||
|
||||
@@ -12,16 +12,16 @@ import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
|
||||
public class MetaDataRating {
|
||||
public class GetMediaMetaDataRatings {
|
||||
|
||||
/**
|
||||
* A URI or path to the rating image.
|
||||
* The image or reference for the rating.
|
||||
*/
|
||||
@JsonProperty("image")
|
||||
private String image;
|
||||
|
||||
/**
|
||||
* The value of the rating.
|
||||
* The rating value.
|
||||
*/
|
||||
@JsonProperty("value")
|
||||
private float value;
|
||||
@@ -33,7 +33,7 @@ public class MetaDataRating {
|
||||
private String type;
|
||||
|
||||
@JsonCreator
|
||||
public MetaDataRating(
|
||||
public GetMediaMetaDataRatings(
|
||||
@JsonProperty("image") String image,
|
||||
@JsonProperty("value") float value,
|
||||
@JsonProperty("type") String type) {
|
||||
@@ -46,7 +46,7 @@ public class MetaDataRating {
|
||||
}
|
||||
|
||||
/**
|
||||
* A URI or path to the rating image.
|
||||
* The image or reference for the rating.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String image() {
|
||||
@@ -54,7 +54,7 @@ public class MetaDataRating {
|
||||
}
|
||||
|
||||
/**
|
||||
* The value of the rating.
|
||||
* The rating value.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public float value() {
|
||||
@@ -74,18 +74,18 @@ public class MetaDataRating {
|
||||
}
|
||||
|
||||
/**
|
||||
* A URI or path to the rating image.
|
||||
* The image or reference for the rating.
|
||||
*/
|
||||
public MetaDataRating withImage(String image) {
|
||||
public GetMediaMetaDataRatings withImage(String image) {
|
||||
Utils.checkNotNull(image, "image");
|
||||
this.image = image;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The value of the rating.
|
||||
* The rating value.
|
||||
*/
|
||||
public MetaDataRating withValue(float value) {
|
||||
public GetMediaMetaDataRatings withValue(float value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
this.value = value;
|
||||
return this;
|
||||
@@ -94,7 +94,7 @@ public class MetaDataRating {
|
||||
/**
|
||||
* The type of rating (e.g., audience, critic).
|
||||
*/
|
||||
public MetaDataRating withType(String type) {
|
||||
public GetMediaMetaDataRatings withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
@@ -109,7 +109,7 @@ public class MetaDataRating {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
MetaDataRating other = (MetaDataRating) o;
|
||||
GetMediaMetaDataRatings other = (GetMediaMetaDataRatings) o;
|
||||
return
|
||||
Objects.deepEquals(this.image, other.image) &&
|
||||
Objects.deepEquals(this.value, other.value) &&
|
||||
@@ -126,7 +126,7 @@ public class MetaDataRating {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(MetaDataRating.class,
|
||||
return Utils.toString(GetMediaMetaDataRatings.class,
|
||||
"image", image,
|
||||
"value", value,
|
||||
"type", type);
|
||||
@@ -145,7 +145,7 @@ public class MetaDataRating {
|
||||
}
|
||||
|
||||
/**
|
||||
* A URI or path to the rating image.
|
||||
* The image or reference for the rating.
|
||||
*/
|
||||
public Builder image(String image) {
|
||||
Utils.checkNotNull(image, "image");
|
||||
@@ -154,7 +154,7 @@ public class MetaDataRating {
|
||||
}
|
||||
|
||||
/**
|
||||
* The value of the rating.
|
||||
* The rating value.
|
||||
*/
|
||||
public Builder value(float value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
@@ -171,8 +171,8 @@ public class MetaDataRating {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MetaDataRating build() {
|
||||
return new MetaDataRating(
|
||||
public GetMediaMetaDataRatings build() {
|
||||
return new GetMediaMetaDataRatings(
|
||||
image,
|
||||
value,
|
||||
type);
|
||||
@@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Float;
|
||||
@@ -28,12 +30,12 @@ public class GetMediaMetaDataStream {
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
* - VIDEO = 1
|
||||
* - AUDIO = 2
|
||||
* - SUBTITLE = 3
|
||||
*/
|
||||
@JsonProperty("streamType")
|
||||
private GetMediaMetaDataStreamType streamType;
|
||||
private long streamType;
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
@@ -52,8 +54,9 @@ public class GetMediaMetaDataStream {
|
||||
/**
|
||||
* Codec used by the stream.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("codec")
|
||||
private String codec;
|
||||
private Optional<String> codec;
|
||||
|
||||
/**
|
||||
* Index of the stream.
|
||||
@@ -291,14 +294,16 @@ public class GetMediaMetaDataStream {
|
||||
/**
|
||||
* Display title for the stream.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("displayTitle")
|
||||
private String displayTitle;
|
||||
private Optional<String> displayTitle;
|
||||
|
||||
/**
|
||||
* Extended display title for the stream.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("extendedDisplayTitle")
|
||||
private String extendedDisplayTitle;
|
||||
private Optional<String> extendedDisplayTitle;
|
||||
|
||||
/**
|
||||
* Indicates if this stream is selected (applicable for audio streams).
|
||||
@@ -363,10 +368,9 @@ public class GetMediaMetaDataStream {
|
||||
@JsonCreator
|
||||
public GetMediaMetaDataStream(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("streamType") GetMediaMetaDataStreamType streamType,
|
||||
@JsonProperty("format") Optional<String> format,
|
||||
@JsonProperty("default") Optional<Boolean> default_,
|
||||
@JsonProperty("codec") String codec,
|
||||
@JsonProperty("codec") Optional<String> codec,
|
||||
@JsonProperty("index") Optional<Integer> index,
|
||||
@JsonProperty("bitrate") Optional<Integer> bitrate,
|
||||
@JsonProperty("language") Optional<String> language,
|
||||
@@ -402,8 +406,8 @@ public class GetMediaMetaDataStream {
|
||||
@JsonProperty("embeddedInVideo") Optional<String> embeddedInVideo,
|
||||
@JsonProperty("refFrames") Optional<Integer> refFrames,
|
||||
@JsonProperty("width") Optional<Integer> width,
|
||||
@JsonProperty("displayTitle") String displayTitle,
|
||||
@JsonProperty("extendedDisplayTitle") String extendedDisplayTitle,
|
||||
@JsonProperty("displayTitle") Optional<String> displayTitle,
|
||||
@JsonProperty("extendedDisplayTitle") Optional<String> extendedDisplayTitle,
|
||||
@JsonProperty("selected") Optional<Boolean> selected,
|
||||
@JsonProperty("forced") Optional<Boolean> forced,
|
||||
@JsonProperty("channels") Optional<Integer> channels,
|
||||
@@ -414,7 +418,6 @@ public class GetMediaMetaDataStream {
|
||||
@JsonProperty("dub") Optional<Boolean> dub,
|
||||
@JsonProperty("title") Optional<String> title) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
Utils.checkNotNull(format, "format");
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
@@ -465,7 +468,7 @@ public class GetMediaMetaDataStream {
|
||||
Utils.checkNotNull(dub, "dub");
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.id = id;
|
||||
this.streamType = streamType;
|
||||
this.streamType = Builder._SINGLETON_VALUE_StreamType.value();
|
||||
this.format = format;
|
||||
this.default_ = default_;
|
||||
this.codec = codec;
|
||||
@@ -518,12 +521,8 @@ public class GetMediaMetaDataStream {
|
||||
}
|
||||
|
||||
public GetMediaMetaDataStream(
|
||||
long id,
|
||||
GetMediaMetaDataStreamType streamType,
|
||||
String codec,
|
||||
String displayTitle,
|
||||
String extendedDisplayTitle) {
|
||||
this(id, streamType, Optional.empty(), Optional.empty(), codec, 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(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
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(), 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());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,12 +535,12 @@ public class GetMediaMetaDataStream {
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
* - VIDEO = 1
|
||||
* - AUDIO = 2
|
||||
* - SUBTITLE = 3
|
||||
*/
|
||||
@JsonIgnore
|
||||
public GetMediaMetaDataStreamType streamType() {
|
||||
public long streamType() {
|
||||
return streamType;
|
||||
}
|
||||
|
||||
@@ -565,7 +564,7 @@ public class GetMediaMetaDataStream {
|
||||
* Codec used by the stream.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String codec() {
|
||||
public Optional<String> codec() {
|
||||
return codec;
|
||||
}
|
||||
|
||||
@@ -841,7 +840,7 @@ public class GetMediaMetaDataStream {
|
||||
* Display title for the stream.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String displayTitle() {
|
||||
public Optional<String> displayTitle() {
|
||||
return displayTitle;
|
||||
}
|
||||
|
||||
@@ -849,7 +848,7 @@ public class GetMediaMetaDataStream {
|
||||
* Extended display title for the stream.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String extendedDisplayTitle() {
|
||||
public Optional<String> extendedDisplayTitle() {
|
||||
return extendedDisplayTitle;
|
||||
}
|
||||
|
||||
@@ -935,18 +934,6 @@ public class GetMediaMetaDataStream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
public GetMediaMetaDataStream withStreamType(GetMediaMetaDataStreamType streamType) {
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
this.streamType = streamType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
*/
|
||||
@@ -987,6 +974,15 @@ public class GetMediaMetaDataStream {
|
||||
* Codec used by the stream.
|
||||
*/
|
||||
public GetMediaMetaDataStream withCodec(String codec) {
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
this.codec = Optional.ofNullable(codec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Codec used by the stream.
|
||||
*/
|
||||
public GetMediaMetaDataStream withCodec(Optional<String> codec) {
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
this.codec = codec;
|
||||
return this;
|
||||
@@ -1602,6 +1598,15 @@ public class GetMediaMetaDataStream {
|
||||
* Display title for the stream.
|
||||
*/
|
||||
public GetMediaMetaDataStream withDisplayTitle(String displayTitle) {
|
||||
Utils.checkNotNull(displayTitle, "displayTitle");
|
||||
this.displayTitle = Optional.ofNullable(displayTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display title for the stream.
|
||||
*/
|
||||
public GetMediaMetaDataStream withDisplayTitle(Optional<String> displayTitle) {
|
||||
Utils.checkNotNull(displayTitle, "displayTitle");
|
||||
this.displayTitle = displayTitle;
|
||||
return this;
|
||||
@@ -1611,6 +1616,15 @@ public class GetMediaMetaDataStream {
|
||||
* Extended display title for the stream.
|
||||
*/
|
||||
public GetMediaMetaDataStream withExtendedDisplayTitle(String extendedDisplayTitle) {
|
||||
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
||||
this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extended display title for the stream.
|
||||
*/
|
||||
public GetMediaMetaDataStream withExtendedDisplayTitle(Optional<String> extendedDisplayTitle) {
|
||||
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
||||
this.extendedDisplayTitle = extendedDisplayTitle;
|
||||
return this;
|
||||
@@ -1952,13 +1966,11 @@ public class GetMediaMetaDataStream {
|
||||
|
||||
private Long id;
|
||||
|
||||
private GetMediaMetaDataStreamType streamType;
|
||||
|
||||
private Optional<String> format = Optional.empty();
|
||||
|
||||
private Optional<Boolean> default_ = Optional.empty();
|
||||
|
||||
private String codec;
|
||||
private Optional<String> codec = Optional.empty();
|
||||
|
||||
private Optional<Integer> index = Optional.empty();
|
||||
|
||||
@@ -2030,9 +2042,9 @@ public class GetMediaMetaDataStream {
|
||||
|
||||
private Optional<Integer> width = Optional.empty();
|
||||
|
||||
private String displayTitle;
|
||||
private Optional<String> displayTitle = Optional.empty();
|
||||
|
||||
private String extendedDisplayTitle;
|
||||
private Optional<String> extendedDisplayTitle = Optional.empty();
|
||||
|
||||
private Optional<Boolean> selected = Optional.empty();
|
||||
|
||||
@@ -2065,18 +2077,6 @@ public class GetMediaMetaDataStream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
public Builder streamType(GetMediaMetaDataStreamType streamType) {
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
this.streamType = streamType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
*/
|
||||
@@ -2117,6 +2117,15 @@ public class GetMediaMetaDataStream {
|
||||
* Codec used by the stream.
|
||||
*/
|
||||
public Builder codec(String codec) {
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
this.codec = Optional.ofNullable(codec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Codec used by the stream.
|
||||
*/
|
||||
public Builder codec(Optional<String> codec) {
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
this.codec = codec;
|
||||
return this;
|
||||
@@ -2732,6 +2741,15 @@ public class GetMediaMetaDataStream {
|
||||
* Display title for the stream.
|
||||
*/
|
||||
public Builder displayTitle(String displayTitle) {
|
||||
Utils.checkNotNull(displayTitle, "displayTitle");
|
||||
this.displayTitle = Optional.ofNullable(displayTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display title for the stream.
|
||||
*/
|
||||
public Builder displayTitle(Optional<String> displayTitle) {
|
||||
Utils.checkNotNull(displayTitle, "displayTitle");
|
||||
this.displayTitle = displayTitle;
|
||||
return this;
|
||||
@@ -2741,6 +2759,15 @@ public class GetMediaMetaDataStream {
|
||||
* Extended display title for the stream.
|
||||
*/
|
||||
public Builder extendedDisplayTitle(String extendedDisplayTitle) {
|
||||
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
||||
this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extended display title for the stream.
|
||||
*/
|
||||
public Builder extendedDisplayTitle(Optional<String> extendedDisplayTitle) {
|
||||
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
||||
this.extendedDisplayTitle = extendedDisplayTitle;
|
||||
return this;
|
||||
@@ -2905,7 +2932,6 @@ public class GetMediaMetaDataStream {
|
||||
public GetMediaMetaDataStream build() {
|
||||
return new GetMediaMetaDataStream(
|
||||
id,
|
||||
streamType,
|
||||
format,
|
||||
default_,
|
||||
codec,
|
||||
@@ -2956,5 +2982,11 @@ public class GetMediaMetaDataStream {
|
||||
dub,
|
||||
title);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Long> _SINGLETON_VALUE_StreamType =
|
||||
new LazySingletonValue<>(
|
||||
"streamType",
|
||||
"1",
|
||||
new TypeReference<Long>() {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetMediaMetaDataStreamType
|
||||
*
|
||||
* <p>Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
@JsonDeserialize(using = GetMediaMetaDataStreamType._Deserializer.class)
|
||||
@JsonSerialize(using = GetMediaMetaDataStreamType._Serializer.class)
|
||||
public class GetMediaMetaDataStreamType {
|
||||
|
||||
public static final GetMediaMetaDataStreamType Video = new GetMediaMetaDataStreamType(1);
|
||||
public static final GetMediaMetaDataStreamType Audio = new GetMediaMetaDataStreamType(2);
|
||||
public static final GetMediaMetaDataStreamType Subtitle = new GetMediaMetaDataStreamType(3);
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<Integer, GetMediaMetaDataStreamType> values = createValuesMap();
|
||||
private static final Map<Integer, GetMediaMetaDataStreamTypeEnum> enums = createEnumsMap();
|
||||
|
||||
private final int value;
|
||||
|
||||
private GetMediaMetaDataStreamType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetMediaMetaDataStreamType with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetMediaMetaDataStreamType
|
||||
*/
|
||||
public static GetMediaMetaDataStreamType of(int value) {
|
||||
synchronized (GetMediaMetaDataStreamType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetMediaMetaDataStreamType(v));
|
||||
}
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetMediaMetaDataStreamTypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetMediaMetaDataStreamType other = (GetMediaMetaDataStreamType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetMediaMetaDataStreamType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetMediaMetaDataStreamType[] values() {
|
||||
synchronized (GetMediaMetaDataStreamType.class) {
|
||||
return values.values().toArray(new GetMediaMetaDataStreamType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<Integer, GetMediaMetaDataStreamType> createValuesMap() {
|
||||
Map<Integer, GetMediaMetaDataStreamType> map = new LinkedHashMap<>();
|
||||
map.put(1, Video);
|
||||
map.put(2, Audio);
|
||||
map.put(3, Subtitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<Integer, GetMediaMetaDataStreamTypeEnum> createEnumsMap() {
|
||||
Map<Integer, GetMediaMetaDataStreamTypeEnum> map = new HashMap<>();
|
||||
map.put(1, GetMediaMetaDataStreamTypeEnum.Video);
|
||||
map.put(2, GetMediaMetaDataStreamTypeEnum.Audio);
|
||||
map.put(3, GetMediaMetaDataStreamTypeEnum.Subtitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetMediaMetaDataStreamType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetMediaMetaDataStreamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetMediaMetaDataStreamType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetMediaMetaDataStreamType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetMediaMetaDataStreamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetMediaMetaDataStreamType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
int v = p.readValueAs(new TypeReference<Integer>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetMediaMetaDataStreamType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetMediaMetaDataStreamTypeEnum {
|
||||
|
||||
Video(1),
|
||||
Audio(2),
|
||||
Subtitle(3),;
|
||||
|
||||
private final int value;
|
||||
|
||||
private GetMediaMetaDataStreamTypeEnum(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,20 +188,23 @@ public class GetRecentlyAddedMetadata {
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionID")
|
||||
private long librarySectionID;
|
||||
private Optional<Long> librarySectionID;
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionKey")
|
||||
private String librarySectionKey;
|
||||
private Optional<String> librarySectionKey;
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionTitle")
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle;
|
||||
|
||||
/**
|
||||
* The original title of the media item (if different).
|
||||
@@ -213,8 +216,9 @@ public class GetRecentlyAddedMetadata {
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("originallyAvailableAt")
|
||||
private LocalDate originallyAvailableAt;
|
||||
private Optional<LocalDate> originallyAvailableAt;
|
||||
|
||||
/**
|
||||
* The GUID of the parent media item.
|
||||
@@ -506,11 +510,11 @@ public class GetRecentlyAddedMetadata {
|
||||
@JsonProperty("lastRatedAt") Optional<Long> lastRatedAt,
|
||||
@JsonProperty("lastViewedAt") Optional<Integer> lastViewedAt,
|
||||
@JsonProperty("leafCount") Optional<Integer> leafCount,
|
||||
@JsonProperty("librarySectionID") long librarySectionID,
|
||||
@JsonProperty("librarySectionKey") String librarySectionKey,
|
||||
@JsonProperty("librarySectionTitle") String librarySectionTitle,
|
||||
@JsonProperty("librarySectionID") Optional<Long> librarySectionID,
|
||||
@JsonProperty("librarySectionKey") Optional<String> librarySectionKey,
|
||||
@JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
|
||||
@JsonProperty("originalTitle") Optional<String> originalTitle,
|
||||
@JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt,
|
||||
@JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
|
||||
@JsonProperty("parentGuid") Optional<String> parentGuid,
|
||||
@JsonProperty("parentIndex") Optional<Integer> parentIndex,
|
||||
@JsonProperty("parentKey") Optional<String> parentKey,
|
||||
@@ -718,10 +722,6 @@ public class GetRecentlyAddedMetadata {
|
||||
String guid,
|
||||
int index,
|
||||
String key,
|
||||
long librarySectionID,
|
||||
String librarySectionKey,
|
||||
String librarySectionTitle,
|
||||
LocalDate originallyAvailableAt,
|
||||
String parentStudio,
|
||||
String parentTheme,
|
||||
String ratingKey,
|
||||
@@ -735,7 +735,7 @@ public class GetRecentlyAddedMetadata {
|
||||
String titleSort,
|
||||
String title,
|
||||
GetRecentlyAddedHubsType type) {
|
||||
this(addedAt, art, Optional.empty(), audienceRating, Optional.empty(), childCount, Optional.empty(), Optional.empty(), Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), guid, index, key, Optional.empty(), Optional.empty(), Optional.empty(), librarySectionID, librarySectionKey, librarySectionTitle, Optional.empty(), originallyAvailableAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), parentStudio, parentTheme, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ratingKey, rating, seasonCount, Optional.empty(), slug, Optional.empty(), Optional.empty(), summary, tagline, theme, thumb, titleSort, title, type, 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(addedAt, art, Optional.empty(), audienceRating, Optional.empty(), childCount, Optional.empty(), Optional.empty(), Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), guid, index, key, 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(), parentStudio, parentTheme, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ratingKey, rating, seasonCount, Optional.empty(), slug, Optional.empty(), Optional.empty(), summary, tagline, theme, thumb, titleSort, title, type, 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());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@@ -931,7 +931,7 @@ public class GetRecentlyAddedMetadata {
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long librarySectionID() {
|
||||
public Optional<Long> librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
@@ -939,7 +939,7 @@ public class GetRecentlyAddedMetadata {
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionKey() {
|
||||
public Optional<String> librarySectionKey() {
|
||||
return librarySectionKey;
|
||||
}
|
||||
|
||||
@@ -947,7 +947,7 @@ public class GetRecentlyAddedMetadata {
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionTitle() {
|
||||
public Optional<String> librarySectionTitle() {
|
||||
return librarySectionTitle;
|
||||
}
|
||||
|
||||
@@ -963,7 +963,7 @@ public class GetRecentlyAddedMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public LocalDate originallyAvailableAt() {
|
||||
public Optional<LocalDate> originallyAvailableAt() {
|
||||
return originallyAvailableAt;
|
||||
}
|
||||
|
||||
@@ -1669,6 +1669,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withLibrarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withLibrarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -1678,6 +1687,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withLibrarySectionKey(String librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = Optional.ofNullable(librarySectionKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withLibrarySectionKey(Optional<String> librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
return this;
|
||||
@@ -1687,6 +1705,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withLibrarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withLibrarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
@@ -1714,6 +1741,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public GetRecentlyAddedMetadata withOriginallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = originallyAvailableAt;
|
||||
return this;
|
||||
@@ -2641,15 +2677,15 @@ public class GetRecentlyAddedMetadata {
|
||||
|
||||
private Optional<Integer> leafCount = Optional.empty();
|
||||
|
||||
private Long librarySectionID;
|
||||
private Optional<Long> librarySectionID = Optional.empty();
|
||||
|
||||
private String librarySectionKey;
|
||||
private Optional<String> librarySectionKey = Optional.empty();
|
||||
|
||||
private String librarySectionTitle;
|
||||
private Optional<String> librarySectionTitle = Optional.empty();
|
||||
|
||||
private Optional<String> originalTitle = Optional.empty();
|
||||
|
||||
private LocalDate originallyAvailableAt;
|
||||
private Optional<LocalDate> originallyAvailableAt = Optional.empty();
|
||||
|
||||
private Optional<String> parentGuid = Optional.empty();
|
||||
|
||||
@@ -3108,6 +3144,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
@@ -3117,6 +3162,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public Builder librarySectionKey(String librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = Optional.ofNullable(librarySectionKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public Builder librarySectionKey(Optional<String> librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
return this;
|
||||
@@ -3126,6 +3180,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
@@ -3153,6 +3216,15 @@ public class GetRecentlyAddedMetadata {
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public Builder originallyAvailableAt(LocalDate originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original release date of the media item.
|
||||
*/
|
||||
public Builder originallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
|
||||
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
|
||||
this.originallyAvailableAt = originallyAvailableAt;
|
||||
return this;
|
||||
|
||||
@@ -1,106 +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.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesCollection {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesCollection(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCollection() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCollection withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCollection withTag(Optional<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;
|
||||
}
|
||||
GetSearchAllLibrariesCollection other = (GetSearchAllLibrariesCollection) o;
|
||||
return
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesCollection.class,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCollection build() {
|
||||
return new GetSearchAllLibrariesCollection(
|
||||
tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,34 +5,52 @@ 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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesCountry {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesCountry(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCountry() {
|
||||
this(Optional.empty());
|
||||
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -40,13 +58,20 @@ public class GetSearchAllLibrariesCountry {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCountry withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public GetSearchAllLibrariesCountry withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesCountry withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
*/
|
||||
public GetSearchAllLibrariesCountry withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -63,36 +88,48 @@ public class GetSearchAllLibrariesCountry {
|
||||
}
|
||||
GetSearchAllLibrariesCountry other = (GetSearchAllLibrariesCountry) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesCountry.class,
|
||||
"id", id,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
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);
|
||||
/**
|
||||
* The unique identifier for the country.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public Builder id(int 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;
|
||||
@@ -100,6 +137,7 @@ public class GetSearchAllLibrariesCountry {
|
||||
|
||||
public GetSearchAllLibrariesCountry build() {
|
||||
return new GetSearchAllLibrariesCountry(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -16,42 +17,108 @@ import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesDirector {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* Unique identifier for the director.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesDirector(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@JsonProperty("thumb") Optional<String> thumb) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirector() {
|
||||
this(Optional.empty());
|
||||
public GetSearchAllLibrariesDirector(
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the director.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirector withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* Unique identifier for the director.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirector withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirector withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
public GetSearchAllLibrariesDirector withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirector withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirector withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -63,44 +130,80 @@ public class GetSearchAllLibrariesDirector {
|
||||
}
|
||||
GetSearchAllLibrariesDirector other = (GetSearchAllLibrariesDirector) o;
|
||||
return
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag) &&
|
||||
Objects.deepEquals(this.thumb, other.thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesDirector.class,
|
||||
"tag", tag);
|
||||
"id", id,
|
||||
"tag", tag,
|
||||
"thumb", thumb);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
private String tag;
|
||||
|
||||
private Optional<String> thumb = 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 director.
|
||||
*/
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Director
|
||||
*/
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the director.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirector build() {
|
||||
return new GetSearchAllLibrariesDirector(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,621 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesDirectory {
|
||||
|
||||
/**
|
||||
* The unique identifier path for the search result item.
|
||||
*/
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
@JsonProperty("librarySectionID")
|
||||
private long librarySectionID;
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
@JsonProperty("librarySectionKey")
|
||||
private String librarySectionKey;
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonProperty("librarySectionTitle")
|
||||
private String librarySectionTitle;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionType")
|
||||
private Optional<Long> librarySectionType;
|
||||
|
||||
/**
|
||||
* The type of the directory.
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonProperty("id")
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* The filter string used to query this specific item in the library.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("filter")
|
||||
private Optional<String> filter;
|
||||
|
||||
@JsonProperty("tag")
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* The type of tag associated with this search result (e.g., Director, Actor).
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("tagType")
|
||||
private Optional<Long> tagType;
|
||||
|
||||
/**
|
||||
* The unique identifier for the tag associated with this search result.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("tagKey")
|
||||
private Optional<String> tagKey;
|
||||
|
||||
/**
|
||||
* The URL to the thumbnail image associated with this search result.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
/**
|
||||
* The number of items associated with this search result.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("count")
|
||||
private Optional<Long> count;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesDirectory(
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("librarySectionID") long librarySectionID,
|
||||
@JsonProperty("librarySectionKey") String librarySectionKey,
|
||||
@JsonProperty("librarySectionTitle") String librarySectionTitle,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("filter") Optional<String> filter,
|
||||
@JsonProperty("tag") String tag,
|
||||
@JsonProperty("tagKey") Optional<String> tagKey,
|
||||
@JsonProperty("thumb") Optional<String> thumb,
|
||||
@JsonProperty("count") Optional<Long> count) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.key = key;
|
||||
this.librarySectionID = librarySectionID;
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
this.librarySectionType = Builder._SINGLETON_VALUE_LibrarySectionType.value();
|
||||
this.type = type;
|
||||
this.id = id;
|
||||
this.filter = filter;
|
||||
this.tag = tag;
|
||||
this.tagType = Builder._SINGLETON_VALUE_TagType.value();
|
||||
this.tagKey = tagKey;
|
||||
this.thumb = thumb;
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirectory(
|
||||
String key,
|
||||
long librarySectionID,
|
||||
String librarySectionKey,
|
||||
String librarySectionTitle,
|
||||
String type,
|
||||
long id,
|
||||
String tag) {
|
||||
this(key, librarySectionID, librarySectionKey, librarySectionTitle, type, id, Optional.empty(), tag, Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier path for the search result item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionKey() {
|
||||
return librarySectionKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String librarySectionTitle() {
|
||||
return librarySectionTitle;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> librarySectionType() {
|
||||
return librarySectionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of the directory.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string used to query this specific item in the library.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> filter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of tag associated with this search result (e.g., Director, Actor).
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> tagType() {
|
||||
return tagType;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the tag associated with this search result.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tagKey() {
|
||||
return tagKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to the thumbnail image associated with this search result.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of items associated with this search result.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> count() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier path for the search result item.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withLibrarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withLibrarySectionKey(String librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withLibrarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of the directory.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirectory withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string used to query this specific item in the library.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string used to query this specific item in the library.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withFilter(Optional<String> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirectory withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the tag associated with this search result.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withTagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = Optional.ofNullable(tagKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the tag associated with this search result.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withTagKey(Optional<String> tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to the thumbnail image associated with this search result.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to the thumbnail image associated with this search result.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of items associated with this search result.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withCount(long count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = Optional.ofNullable(count);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of items associated with this search result.
|
||||
*/
|
||||
public GetSearchAllLibrariesDirectory withCount(Optional<Long> count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetSearchAllLibrariesDirectory other = (GetSearchAllLibrariesDirectory) o;
|
||||
return
|
||||
Objects.deepEquals(this.key, other.key) &&
|
||||
Objects.deepEquals(this.librarySectionID, other.librarySectionID) &&
|
||||
Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) &&
|
||||
Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) &&
|
||||
Objects.deepEquals(this.librarySectionType, other.librarySectionType) &&
|
||||
Objects.deepEquals(this.type, other.type) &&
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.filter, other.filter) &&
|
||||
Objects.deepEquals(this.tag, other.tag) &&
|
||||
Objects.deepEquals(this.tagType, other.tagType) &&
|
||||
Objects.deepEquals(this.tagKey, other.tagKey) &&
|
||||
Objects.deepEquals(this.thumb, other.thumb) &&
|
||||
Objects.deepEquals(this.count, other.count);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
key,
|
||||
librarySectionID,
|
||||
librarySectionKey,
|
||||
librarySectionTitle,
|
||||
librarySectionType,
|
||||
type,
|
||||
id,
|
||||
filter,
|
||||
tag,
|
||||
tagType,
|
||||
tagKey,
|
||||
thumb,
|
||||
count);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesDirectory.class,
|
||||
"key", key,
|
||||
"librarySectionID", librarySectionID,
|
||||
"librarySectionKey", librarySectionKey,
|
||||
"librarySectionTitle", librarySectionTitle,
|
||||
"librarySectionType", librarySectionType,
|
||||
"type", type,
|
||||
"id", id,
|
||||
"filter", filter,
|
||||
"tag", tag,
|
||||
"tagType", tagType,
|
||||
"tagKey", tagKey,
|
||||
"thumb", thumb,
|
||||
"count", count);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String key;
|
||||
|
||||
private Long librarySectionID;
|
||||
|
||||
private String librarySectionKey;
|
||||
|
||||
private String librarySectionTitle;
|
||||
|
||||
private String type;
|
||||
|
||||
private Long id;
|
||||
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private String tag;
|
||||
|
||||
private Optional<String> tagKey = Optional.empty();
|
||||
|
||||
private Optional<String> thumb = Optional.empty();
|
||||
|
||||
private Optional<Long> count = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier path for the search result item.
|
||||
*/
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The key corresponding to the library section.
|
||||
*/
|
||||
public Builder librarySectionKey(String librarySectionKey) {
|
||||
Utils.checkNotNull(librarySectionKey, "librarySectionKey");
|
||||
this.librarySectionKey = librarySectionKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of the directory.
|
||||
*/
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder id(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string used to query this specific item in the library.
|
||||
*/
|
||||
public Builder filter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter string used to query this specific item in the library.
|
||||
*/
|
||||
public Builder filter(Optional<String> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the tag associated with this search result.
|
||||
*/
|
||||
public Builder tagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = Optional.ofNullable(tagKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the tag associated with this search result.
|
||||
*/
|
||||
public Builder tagKey(Optional<String> tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to the thumbnail image associated with this search result.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to the thumbnail image associated with this search result.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of items associated with this search result.
|
||||
*/
|
||||
public Builder count(long count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = Optional.ofNullable(count);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of items associated with this search result.
|
||||
*/
|
||||
public Builder count(Optional<Long> count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesDirectory build() {
|
||||
return new GetSearchAllLibrariesDirectory(
|
||||
key,
|
||||
librarySectionID,
|
||||
librarySectionKey,
|
||||
librarySectionTitle,
|
||||
type,
|
||||
id,
|
||||
filter,
|
||||
tag,
|
||||
tagKey,
|
||||
thumb,
|
||||
count);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Optional<Long>> _SINGLETON_VALUE_LibrarySectionType =
|
||||
new LazySingletonValue<>(
|
||||
"librarySectionType",
|
||||
"1",
|
||||
new TypeReference<Optional<Long>>() {});
|
||||
|
||||
private static final LazySingletonValue<Optional<Long>> _SINGLETON_VALUE_TagType =
|
||||
new LazySingletonValue<>(
|
||||
"tagType",
|
||||
"4",
|
||||
new TypeReference<Optional<Long>>() {});
|
||||
}
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetSearchAllLibrariesEnableCreditsMarkerGeneration
|
||||
*
|
||||
* <p>Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
*/
|
||||
@JsonDeserialize(using = GetSearchAllLibrariesEnableCreditsMarkerGeneration._Deserializer.class)
|
||||
@JsonSerialize(using = GetSearchAllLibrariesEnableCreditsMarkerGeneration._Serializer.class)
|
||||
public class GetSearchAllLibrariesEnableCreditsMarkerGeneration {
|
||||
|
||||
public static final GetSearchAllLibrariesEnableCreditsMarkerGeneration LibraryDefault = new GetSearchAllLibrariesEnableCreditsMarkerGeneration("-1");
|
||||
public static final GetSearchAllLibrariesEnableCreditsMarkerGeneration Disabled = new GetSearchAllLibrariesEnableCreditsMarkerGeneration("0");
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, GetSearchAllLibrariesEnableCreditsMarkerGeneration> values = createValuesMap();
|
||||
private static final Map<String, GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum> enums = createEnumsMap();
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetSearchAllLibrariesEnableCreditsMarkerGeneration(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetSearchAllLibrariesEnableCreditsMarkerGeneration with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetSearchAllLibrariesEnableCreditsMarkerGeneration
|
||||
*/
|
||||
public static GetSearchAllLibrariesEnableCreditsMarkerGeneration of(String value) {
|
||||
synchronized (GetSearchAllLibrariesEnableCreditsMarkerGeneration.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetSearchAllLibrariesEnableCreditsMarkerGeneration(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetSearchAllLibrariesEnableCreditsMarkerGeneration other = (GetSearchAllLibrariesEnableCreditsMarkerGeneration) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetSearchAllLibrariesEnableCreditsMarkerGeneration [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetSearchAllLibrariesEnableCreditsMarkerGeneration[] values() {
|
||||
synchronized (GetSearchAllLibrariesEnableCreditsMarkerGeneration.class) {
|
||||
return values.values().toArray(new GetSearchAllLibrariesEnableCreditsMarkerGeneration[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetSearchAllLibrariesEnableCreditsMarkerGeneration> createValuesMap() {
|
||||
Map<String, GetSearchAllLibrariesEnableCreditsMarkerGeneration> map = new LinkedHashMap<>();
|
||||
map.put("-1", LibraryDefault);
|
||||
map.put("0", Disabled);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum> createEnumsMap() {
|
||||
Map<String, GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum> map = new HashMap<>();
|
||||
map.put("-1", GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum.LibraryDefault);
|
||||
map.put("0", GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum.Disabled);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetSearchAllLibrariesEnableCreditsMarkerGeneration> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetSearchAllLibrariesEnableCreditsMarkerGeneration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetSearchAllLibrariesEnableCreditsMarkerGeneration value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetSearchAllLibrariesEnableCreditsMarkerGeneration> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetSearchAllLibrariesEnableCreditsMarkerGeneration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetSearchAllLibrariesEnableCreditsMarkerGeneration deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetSearchAllLibrariesEnableCreditsMarkerGeneration.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum {
|
||||
|
||||
LibraryDefault("-1"),
|
||||
Disabled("0"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetSearchAllLibrariesEpisodeSort
|
||||
*
|
||||
* <p>Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
*/
|
||||
@JsonDeserialize(using = GetSearchAllLibrariesEpisodeSort._Deserializer.class)
|
||||
@JsonSerialize(using = GetSearchAllLibrariesEpisodeSort._Serializer.class)
|
||||
public class GetSearchAllLibrariesEpisodeSort {
|
||||
|
||||
public static final GetSearchAllLibrariesEpisodeSort LibraryDefault = new GetSearchAllLibrariesEpisodeSort("-1");
|
||||
public static final GetSearchAllLibrariesEpisodeSort OldestFirst = new GetSearchAllLibrariesEpisodeSort("0");
|
||||
public static final GetSearchAllLibrariesEpisodeSort NewestFirst = new GetSearchAllLibrariesEpisodeSort("1");
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<String, GetSearchAllLibrariesEpisodeSort> values = createValuesMap();
|
||||
private static final Map<String, GetSearchAllLibrariesEpisodeSortEnum> enums = createEnumsMap();
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetSearchAllLibrariesEpisodeSort(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetSearchAllLibrariesEpisodeSort with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as GetSearchAllLibrariesEpisodeSort
|
||||
*/
|
||||
public static GetSearchAllLibrariesEpisodeSort of(String value) {
|
||||
synchronized (GetSearchAllLibrariesEpisodeSort.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetSearchAllLibrariesEpisodeSort(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<GetSearchAllLibrariesEpisodeSortEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GetSearchAllLibrariesEpisodeSort other = (GetSearchAllLibrariesEpisodeSort) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetSearchAllLibrariesEpisodeSort [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetSearchAllLibrariesEpisodeSort[] values() {
|
||||
synchronized (GetSearchAllLibrariesEpisodeSort.class) {
|
||||
return values.values().toArray(new GetSearchAllLibrariesEpisodeSort[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetSearchAllLibrariesEpisodeSort> createValuesMap() {
|
||||
Map<String, GetSearchAllLibrariesEpisodeSort> map = new LinkedHashMap<>();
|
||||
map.put("-1", LibraryDefault);
|
||||
map.put("0", OldestFirst);
|
||||
map.put("1", NewestFirst);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetSearchAllLibrariesEpisodeSortEnum> createEnumsMap() {
|
||||
Map<String, GetSearchAllLibrariesEpisodeSortEnum> map = new HashMap<>();
|
||||
map.put("-1", GetSearchAllLibrariesEpisodeSortEnum.LibraryDefault);
|
||||
map.put("0", GetSearchAllLibrariesEpisodeSortEnum.OldestFirst);
|
||||
map.put("1", GetSearchAllLibrariesEpisodeSortEnum.NewestFirst);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetSearchAllLibrariesEpisodeSort> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetSearchAllLibrariesEpisodeSort.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetSearchAllLibrariesEpisodeSort value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetSearchAllLibrariesEpisodeSort> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetSearchAllLibrariesEpisodeSort.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetSearchAllLibrariesEpisodeSort deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
String v = p.readValueAs(new TypeReference<String>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return GetSearchAllLibrariesEpisodeSort.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetSearchAllLibrariesEpisodeSortEnum {
|
||||
|
||||
LibraryDefault("-1"),
|
||||
OldestFirst("0"),
|
||||
NewestFirst("1"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetSearchAllLibrariesEpisodeSortEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,34 +5,52 @@ 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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesGenre {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesGenre(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesGenre() {
|
||||
this(Optional.empty());
|
||||
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -40,13 +58,20 @@ public class GetSearchAllLibrariesGenre {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesGenre withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public GetSearchAllLibrariesGenre withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesGenre withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
public GetSearchAllLibrariesGenre withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -63,36 +88,48 @@ public class GetSearchAllLibrariesGenre {
|
||||
}
|
||||
GetSearchAllLibrariesGenre other = (GetSearchAllLibrariesGenre) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesGenre.class,
|
||||
"id", id,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
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);
|
||||
/**
|
||||
* The unique identifier for the genre.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<String> tag) {
|
||||
/**
|
||||
* The genre name of this media-item
|
||||
*/
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
@@ -100,6 +137,7 @@ public class GetSearchAllLibrariesGenre {
|
||||
|
||||
public GetSearchAllLibrariesGenre build() {
|
||||
return new GetSearchAllLibrariesGenre(
|
||||
id,
|
||||
tag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,25 +11,23 @@ import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
|
||||
public class GetSearchAllLibrariesMediaGuid {
|
||||
public class GetSearchAllLibrariesGuids {
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesMediaGuid(
|
||||
public GetSearchAllLibrariesGuids(
|
||||
@JsonProperty("id") String id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String id() {
|
||||
@@ -41,10 +39,9 @@ public class GetSearchAllLibrariesMediaGuid {
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaGuid withId(String id) {
|
||||
public GetSearchAllLibrariesGuids withId(String id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -59,7 +56,7 @@ public class GetSearchAllLibrariesMediaGuid {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetSearchAllLibrariesMediaGuid other = (GetSearchAllLibrariesMediaGuid) o;
|
||||
GetSearchAllLibrariesGuids other = (GetSearchAllLibrariesGuids) o;
|
||||
return
|
||||
Objects.deepEquals(this.id, other.id);
|
||||
}
|
||||
@@ -72,7 +69,7 @@ public class GetSearchAllLibrariesMediaGuid {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesMediaGuid.class,
|
||||
return Utils.toString(GetSearchAllLibrariesGuids.class,
|
||||
"id", id);
|
||||
}
|
||||
|
||||
@@ -85,8 +82,7 @@ public class GetSearchAllLibrariesMediaGuid {
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be one of the following formats:
|
||||
* imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
* The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||||
*/
|
||||
public Builder id(String id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
@@ -94,8 +90,8 @@ public class GetSearchAllLibrariesMediaGuid {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesMediaGuid build() {
|
||||
return new GetSearchAllLibrariesMediaGuid(
|
||||
public GetSearchAllLibrariesGuids build() {
|
||||
return new GetSearchAllLibrariesGuids(
|
||||
id);
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,11 @@ import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetSearchAllLibrariesHasThumbnail
|
||||
*
|
||||
* <p>Indicates if the part has a thumbnail.
|
||||
*/
|
||||
public enum GetSearchAllLibrariesHasThumbnail {
|
||||
False("0"),
|
||||
True("1");
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import dev.plexapi.sdk.utils.OneOfDeserializer;
|
||||
import dev.plexapi.sdk.utils.TypedObject;
|
||||
import dev.plexapi.sdk.utils.Utils.JsonShape;
|
||||
import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* GetSearchAllLibrariesLibraryOptimizedForStreaming
|
||||
*
|
||||
* <p>Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
@JsonDeserialize(using = GetSearchAllLibrariesLibraryOptimizedForStreaming._Deserializer.class)
|
||||
public class GetSearchAllLibrariesLibraryOptimizedForStreaming {
|
||||
|
||||
@JsonValue
|
||||
private TypedObject value;
|
||||
|
||||
private GetSearchAllLibrariesLibraryOptimizedForStreaming(TypedObject value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static GetSearchAllLibrariesLibraryOptimizedForStreaming of(GetSearchAllLibrariesOptimizedForStreamingLibrary1 value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetSearchAllLibrariesLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetSearchAllLibrariesOptimizedForStreamingLibrary1>(){}));
|
||||
}
|
||||
|
||||
public static GetSearchAllLibrariesLibraryOptimizedForStreaming of(boolean value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetSearchAllLibrariesLibraryOptimizedForStreaming(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.GetSearchAllLibrariesOptimizedForStreamingLibrary1}</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;
|
||||
}
|
||||
GetSearchAllLibrariesLibraryOptimizedForStreaming other = (GetSearchAllLibrariesLibraryOptimizedForStreaming) 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<GetSearchAllLibrariesLibraryOptimizedForStreaming> {
|
||||
|
||||
public _Deserializer() {
|
||||
super(GetSearchAllLibrariesLibraryOptimizedForStreaming.class, false,
|
||||
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
|
||||
TypeReferenceWithShape.of(new TypeReference<GetSearchAllLibrariesOptimizedForStreamingLibrary1>() {}, JsonShape.DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesLibraryOptimizedForStreaming.class,
|
||||
"value", value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,34 +5,31 @@ 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;
|
||||
|
||||
/**
|
||||
* GetSearchAllLibrariesLocation
|
||||
*
|
||||
* <p>The folder path for the media item.
|
||||
*/
|
||||
public class GetSearchAllLibrariesLocation {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("path")
|
||||
private Optional<String> path;
|
||||
private String path;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesLocation(
|
||||
@JsonProperty("path") Optional<String> path) {
|
||||
@JsonProperty("path") String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesLocation() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> path() {
|
||||
public String path() {
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -41,12 +38,6 @@ public class GetSearchAllLibrariesLocation {
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesLocation withPath(String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = Optional.ofNullable(path);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesLocation withPath(Optional<String> path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
return this;
|
||||
@@ -80,19 +71,13 @@ public class GetSearchAllLibrariesLocation {
|
||||
|
||||
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
@@ -5,37 +5,180 @@ 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.Boolean;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesMediaContainer {
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
@JsonProperty("size")
|
||||
private double size;
|
||||
private int size;
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonProperty("allowSync")
|
||||
private boolean allowSync;
|
||||
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*/
|
||||
@JsonProperty("identifier")
|
||||
private String identifier;
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionID")
|
||||
private Optional<Long> librarySectionID;
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionTitle")
|
||||
private Optional<String> librarySectionTitle;
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionUUID")
|
||||
private Optional<String> librarySectionUUID;
|
||||
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*/
|
||||
@JsonProperty("mediaTagPrefix")
|
||||
private String mediaTagPrefix;
|
||||
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*/
|
||||
@JsonProperty("mediaTagVersion")
|
||||
private long mediaTagVersion;
|
||||
|
||||
@JsonProperty("SearchResult")
|
||||
private List<SearchResult> searchResult;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesMediaContainer(
|
||||
@JsonProperty("size") double size,
|
||||
@JsonProperty("size") int size,
|
||||
@JsonProperty("allowSync") boolean allowSync,
|
||||
@JsonProperty("identifier") String identifier,
|
||||
@JsonProperty("librarySectionID") Optional<Long> librarySectionID,
|
||||
@JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
|
||||
@JsonProperty("librarySectionUUID") Optional<String> librarySectionUUID,
|
||||
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
|
||||
@JsonProperty("mediaTagVersion") long mediaTagVersion,
|
||||
@JsonProperty("SearchResult") List<SearchResult> searchResult) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
|
||||
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
|
||||
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
|
||||
Utils.checkNotNull(searchResult, "searchResult");
|
||||
this.size = size;
|
||||
this.allowSync = allowSync;
|
||||
this.identifier = identifier;
|
||||
this.librarySectionID = librarySectionID;
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
this.librarySectionUUID = librarySectionUUID;
|
||||
this.mediaTagPrefix = mediaTagPrefix;
|
||||
this.mediaTagVersion = mediaTagVersion;
|
||||
this.searchResult = searchResult;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesMediaContainer(
|
||||
int size,
|
||||
boolean allowSync,
|
||||
String identifier,
|
||||
String mediaTagPrefix,
|
||||
long mediaTagVersion,
|
||||
List<SearchResult> searchResult) {
|
||||
this(size, allowSync, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, searchResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public double size() {
|
||||
public int size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean allowSync() {
|
||||
return allowSync;
|
||||
}
|
||||
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String identifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> librarySectionTitle() {
|
||||
return librarySectionTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> librarySectionUUID() {
|
||||
return librarySectionUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String mediaTagPrefix() {
|
||||
return mediaTagPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long mediaTagVersion() {
|
||||
return mediaTagVersion;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public List<SearchResult> searchResult() {
|
||||
return searchResult;
|
||||
@@ -45,12 +188,105 @@ public class GetSearchAllLibrariesMediaContainer {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesMediaContainer withSize(double size) {
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withSize(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withAllowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withIdentifier(String identifier) {
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withLibrarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withLibrarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withLibrarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withLibrarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withLibrarySectionUUID(String librarySectionUUID) {
|
||||
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
|
||||
this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withLibrarySectionUUID(Optional<String> librarySectionUUID) {
|
||||
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
|
||||
this.librarySectionUUID = librarySectionUUID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withMediaTagPrefix(String mediaTagPrefix) {
|
||||
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
|
||||
this.mediaTagPrefix = mediaTagPrefix;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*/
|
||||
public GetSearchAllLibrariesMediaContainer withMediaTagVersion(long mediaTagVersion) {
|
||||
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
|
||||
this.mediaTagVersion = mediaTagVersion;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesMediaContainer withSearchResult(List<SearchResult> searchResult) {
|
||||
Utils.checkNotNull(searchResult, "searchResult");
|
||||
this.searchResult = searchResult;
|
||||
@@ -69,6 +305,13 @@ public class GetSearchAllLibrariesMediaContainer {
|
||||
GetSearchAllLibrariesMediaContainer other = (GetSearchAllLibrariesMediaContainer) o;
|
||||
return
|
||||
Objects.deepEquals(this.size, other.size) &&
|
||||
Objects.deepEquals(this.allowSync, other.allowSync) &&
|
||||
Objects.deepEquals(this.identifier, other.identifier) &&
|
||||
Objects.deepEquals(this.librarySectionID, other.librarySectionID) &&
|
||||
Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) &&
|
||||
Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) &&
|
||||
Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) &&
|
||||
Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) &&
|
||||
Objects.deepEquals(this.searchResult, other.searchResult);
|
||||
}
|
||||
|
||||
@@ -76,6 +319,13 @@ public class GetSearchAllLibrariesMediaContainer {
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
size,
|
||||
allowSync,
|
||||
identifier,
|
||||
librarySectionID,
|
||||
librarySectionTitle,
|
||||
librarySectionUUID,
|
||||
mediaTagPrefix,
|
||||
mediaTagVersion,
|
||||
searchResult);
|
||||
}
|
||||
|
||||
@@ -83,12 +333,33 @@ public class GetSearchAllLibrariesMediaContainer {
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesMediaContainer.class,
|
||||
"size", size,
|
||||
"allowSync", allowSync,
|
||||
"identifier", identifier,
|
||||
"librarySectionID", librarySectionID,
|
||||
"librarySectionTitle", librarySectionTitle,
|
||||
"librarySectionUUID", librarySectionUUID,
|
||||
"mediaTagPrefix", mediaTagPrefix,
|
||||
"mediaTagVersion", mediaTagVersion,
|
||||
"searchResult", searchResult);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Double size;
|
||||
private Integer size;
|
||||
|
||||
private Boolean allowSync;
|
||||
|
||||
private String identifier;
|
||||
|
||||
private Optional<Long> librarySectionID = Optional.empty();
|
||||
|
||||
private Optional<String> librarySectionTitle = Optional.empty();
|
||||
|
||||
private Optional<String> librarySectionUUID = Optional.empty();
|
||||
|
||||
private String mediaTagPrefix;
|
||||
|
||||
private Long mediaTagVersion;
|
||||
|
||||
private List<SearchResult> searchResult;
|
||||
|
||||
@@ -96,12 +367,105 @@ public class GetSearchAllLibrariesMediaContainer {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder size(double size) {
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
public Builder size(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public Builder allowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*/
|
||||
public Builder identifier(String identifier) {
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(long librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionID(Optional<Long> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(String librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library section.
|
||||
*/
|
||||
public Builder librarySectionTitle(Optional<String> librarySectionTitle) {
|
||||
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
|
||||
this.librarySectionTitle = librarySectionTitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionUUID(String librarySectionUUID) {
|
||||
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
|
||||
this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library section.
|
||||
*/
|
||||
public Builder librarySectionUUID(Optional<String> librarySectionUUID) {
|
||||
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
|
||||
this.librarySectionUUID = librarySectionUUID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*/
|
||||
public Builder mediaTagPrefix(String mediaTagPrefix) {
|
||||
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
|
||||
this.mediaTagPrefix = mediaTagPrefix;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*/
|
||||
public Builder mediaTagVersion(long mediaTagVersion) {
|
||||
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
|
||||
this.mediaTagVersion = mediaTagVersion;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder searchResult(List<SearchResult> searchResult) {
|
||||
Utils.checkNotNull(searchResult, "searchResult");
|
||||
this.searchResult = searchResult;
|
||||
@@ -111,6 +475,13 @@ public class GetSearchAllLibrariesMediaContainer {
|
||||
public GetSearchAllLibrariesMediaContainer build() {
|
||||
return new GetSearchAllLibrariesMediaContainer(
|
||||
size,
|
||||
allowSync,
|
||||
identifier,
|
||||
librarySectionID,
|
||||
librarySectionTitle,
|
||||
librarySectionUUID,
|
||||
mediaTagPrefix,
|
||||
mediaTagVersion,
|
||||
searchResult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,181 +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.Float;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
|
||||
public class GetSearchAllLibrariesMetaDataRating {
|
||||
|
||||
/**
|
||||
* A URI or path to the rating image.
|
||||
*/
|
||||
@JsonProperty("image")
|
||||
private String image;
|
||||
|
||||
/**
|
||||
* The value of the rating.
|
||||
*/
|
||||
@JsonProperty("value")
|
||||
private float value;
|
||||
|
||||
/**
|
||||
* The type of rating (e.g., audience, critic).
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesMetaDataRating(
|
||||
@JsonProperty("image") String image,
|
||||
@JsonProperty("value") float value,
|
||||
@JsonProperty("type") String type) {
|
||||
Utils.checkNotNull(image, "image");
|
||||
Utils.checkNotNull(value, "value");
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.image = image;
|
||||
this.value = value;
|
||||
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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of rating (e.g., audience, critic).
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* A URI or path to the rating image.
|
||||
*/
|
||||
public GetSearchAllLibrariesMetaDataRating withImage(String image) {
|
||||
Utils.checkNotNull(image, "image");
|
||||
this.image = image;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The value of the rating.
|
||||
*/
|
||||
public GetSearchAllLibrariesMetaDataRating withValue(float value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of rating (e.g., audience, critic).
|
||||
*/
|
||||
public GetSearchAllLibrariesMetaDataRating withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetSearchAllLibrariesMetaDataRating other = (GetSearchAllLibrariesMetaDataRating) o;
|
||||
return
|
||||
Objects.deepEquals(this.image, other.image) &&
|
||||
Objects.deepEquals(this.value, other.value) &&
|
||||
Objects.deepEquals(this.type, other.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
image,
|
||||
value,
|
||||
type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesMetaDataRating.class,
|
||||
"image", image,
|
||||
"value", value,
|
||||
"type", type);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String image;
|
||||
|
||||
private Float value;
|
||||
|
||||
private String type;
|
||||
|
||||
private Builder() {
|
||||
// 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) {
|
||||
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 GetSearchAllLibrariesMetaDataRating build() {
|
||||
return new GetSearchAllLibrariesMetaDataRating(
|
||||
image,
|
||||
value,
|
||||
type);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,31 +4,98 @@
|
||||
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 GetSearchAllLibrariesOptimizedForStreaming {
|
||||
Disable(0),
|
||||
Enable(1);
|
||||
/**
|
||||
* GetSearchAllLibrariesOptimizedForStreaming
|
||||
*
|
||||
* <p>Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
@JsonDeserialize(using = GetSearchAllLibrariesOptimizedForStreaming._Deserializer.class)
|
||||
public class GetSearchAllLibrariesOptimizedForStreaming {
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private GetSearchAllLibrariesOptimizedForStreaming(int value) {
|
||||
private TypedObject value;
|
||||
|
||||
private GetSearchAllLibrariesOptimizedForStreaming(TypedObject value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
|
||||
public static GetSearchAllLibrariesOptimizedForStreaming of(GetSearchAllLibrariesOptimizedForStreaming1 value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetSearchAllLibrariesOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetSearchAllLibrariesOptimizedForStreaming1>(){}));
|
||||
}
|
||||
|
||||
public static GetSearchAllLibrariesOptimizedForStreaming of(boolean value) {
|
||||
Utils.checkNotNull(value, "value");
|
||||
return new GetSearchAllLibrariesOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
|
||||
}
|
||||
|
||||
public static Optional<GetSearchAllLibrariesOptimizedForStreaming> fromValue(int value) {
|
||||
for (GetSearchAllLibrariesOptimizedForStreaming o: GetSearchAllLibrariesOptimizedForStreaming.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.GetSearchAllLibrariesOptimizedForStreaming1}</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;
|
||||
}
|
||||
GetSearchAllLibrariesOptimizedForStreaming other = (GetSearchAllLibrariesOptimizedForStreaming) 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<GetSearchAllLibrariesOptimizedForStreaming> {
|
||||
|
||||
public _Deserializer() {
|
||||
super(GetSearchAllLibrariesOptimizedForStreaming.class, false,
|
||||
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
|
||||
TypeReferenceWithShape.of(new TypeReference<GetSearchAllLibrariesOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesOptimizedForStreaming.class,
|
||||
"value", value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum GetSearchAllLibrariesOptimizedForStreaming1 {
|
||||
ZERO(0),
|
||||
ONE(1);
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private GetSearchAllLibrariesOptimizedForStreaming1(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetSearchAllLibrariesOptimizedForStreaming1> fromValue(int value) {
|
||||
for (GetSearchAllLibrariesOptimizedForStreaming1 o: GetSearchAllLibrariesOptimizedForStreaming1.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum GetSearchAllLibrariesOptimizedForStreamingLibrary1 {
|
||||
ZERO(0),
|
||||
ONE(1);
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private GetSearchAllLibrariesOptimizedForStreamingLibrary1(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetSearchAllLibrariesOptimizedForStreamingLibrary1> fromValue(int value) {
|
||||
for (GetSearchAllLibrariesOptimizedForStreamingLibrary1 o: GetSearchAllLibrariesOptimizedForStreamingLibrary1.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,34 +17,84 @@ import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesPart {
|
||||
|
||||
/**
|
||||
* 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 int id;
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
private Optional<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.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("file")
|
||||
private String file;
|
||||
|
||||
@JsonProperty("size")
|
||||
private long size;
|
||||
private Optional<String> file;
|
||||
|
||||
/**
|
||||
* The container format of the media file.
|
||||
* File size in bytes.
|
||||
*/
|
||||
@JsonProperty("container")
|
||||
private String container;
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<Long> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("packetLength")
|
||||
private Optional<Integer> packetLength;
|
||||
|
||||
/**
|
||||
* Container format of the part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("container")
|
||||
private Optional<String> container;
|
||||
|
||||
/**
|
||||
* Video profile for the part.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("videoProfile")
|
||||
private Optional<String> videoProfile;
|
||||
|
||||
/**
|
||||
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("audioProfile")
|
||||
private Optional<String> audioProfile;
|
||||
@@ -53,111 +103,156 @@ public class GetSearchAllLibrariesPart {
|
||||
@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 GetSearchAllLibrariesLibraryOptimizedForStreaming> optimizedForStreaming;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("hasThumbnail")
|
||||
private Optional<? extends GetSearchAllLibrariesHasThumbnail> hasThumbnail;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Stream")
|
||||
private Optional<? extends List<GetSearchAllLibrariesStream>> stream;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesPart(
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("accessible") Optional<Boolean> accessible,
|
||||
@JsonProperty("exists") Optional<Boolean> exists,
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("key") Optional<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("file") Optional<String> file,
|
||||
@JsonProperty("size") Optional<Long> size,
|
||||
@JsonProperty("packetLength") Optional<Integer> packetLength,
|
||||
@JsonProperty("container") Optional<String> container,
|
||||
@JsonProperty("videoProfile") Optional<String> videoProfile,
|
||||
@JsonProperty("audioProfile") Optional<String> audioProfile,
|
||||
@JsonProperty("has64bitOffsets") Optional<Boolean> has64bitOffsets,
|
||||
@JsonProperty("optimizedForStreaming") Optional<Boolean> optimizedForStreaming,
|
||||
@JsonProperty("videoProfile") Optional<String> videoProfile,
|
||||
@JsonProperty("indexes") Optional<String> indexes,
|
||||
@JsonProperty("hasThumbnail") Optional<? extends GetSearchAllLibrariesHasThumbnail> hasThumbnail,
|
||||
@JsonProperty("Stream") Optional<? extends List<GetSearchAllLibrariesStream>> stream) {
|
||||
@JsonProperty("optimizedForStreaming") Optional<? extends GetSearchAllLibrariesLibraryOptimizedForStreaming> optimizedForStreaming,
|
||||
@JsonProperty("hasThumbnail") Optional<? extends GetSearchAllLibrariesHasThumbnail> hasThumbnail) {
|
||||
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 GetSearchAllLibrariesPart(
|
||||
int 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 id) {
|
||||
this(Optional.empty(), Optional.empty(), 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());
|
||||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
public Optional<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() {
|
||||
public Optional<String> file() {
|
||||
return file;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long size() {
|
||||
public Optional<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;
|
||||
@@ -168,19 +263,13 @@ public class GetSearchAllLibrariesPart {
|
||||
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<GetSearchAllLibrariesLibraryOptimizedForStreaming> optimizedForStreaming() {
|
||||
return (Optional<GetSearchAllLibrariesLibraryOptimizedForStreaming>) optimizedForStreaming;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -189,67 +278,199 @@ public class GetSearchAllLibrariesPart {
|
||||
return (Optional<GetSearchAllLibrariesHasThumbnail>) hasThumbnail;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<List<GetSearchAllLibrariesStream>> stream() {
|
||||
return (Optional<List<GetSearchAllLibrariesStream>>) stream;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withId(int id) {
|
||||
/**
|
||||
* Indicates if the part is accessible.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withAccessible(boolean accessible) {
|
||||
Utils.checkNotNull(accessible, "accessible");
|
||||
this.accessible = Optional.ofNullable(accessible);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the part is accessible.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withAccessible(Optional<Boolean> accessible) {
|
||||
Utils.checkNotNull(accessible, "accessible");
|
||||
this.accessible = accessible;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the part exists.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withExists(boolean exists) {
|
||||
Utils.checkNotNull(exists, "exists");
|
||||
this.exists = Optional.ofNullable(exists);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the part exists.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withExists(Optional<Boolean> exists) {
|
||||
Utils.checkNotNull(exists, "exists");
|
||||
this.exists = exists;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique part identifier.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withKey(Optional<String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withIndexes(String indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = Optional.ofNullable(indexes);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withIndexes(Optional<String> indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = indexes;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duration of the part in milliseconds.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withDuration(int duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = Optional.ofNullable(duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duration of the part in milliseconds.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withDuration(Optional<Integer> duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withFile(String file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = Optional.ofNullable(file);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withFile(Optional<String> file) {
|
||||
Utils.checkNotNull(file, "file");
|
||||
this.file = file;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withSize(long size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withSize(Optional<Long> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withPacketLength(int packetLength) {
|
||||
Utils.checkNotNull(packetLength, "packetLength");
|
||||
this.packetLength = Optional.ofNullable(packetLength);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart 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 GetSearchAllLibrariesPart withContainer(String container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
this.container = Optional.ofNullable(container);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Container format of the part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withContainer(Optional<String> container) {
|
||||
Utils.checkNotNull(container, "container");
|
||||
this.container = container;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Video profile for the part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withVideoProfile(String videoProfile) {
|
||||
Utils.checkNotNull(videoProfile, "videoProfile");
|
||||
this.videoProfile = Optional.ofNullable(videoProfile);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Video profile for the part.
|
||||
*/
|
||||
public GetSearchAllLibrariesPart 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 GetSearchAllLibrariesPart 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 GetSearchAllLibrariesPart withAudioProfile(Optional<String> audioProfile) {
|
||||
Utils.checkNotNull(audioProfile, "audioProfile");
|
||||
this.audioProfile = audioProfile;
|
||||
@@ -268,42 +489,24 @@ public class GetSearchAllLibrariesPart {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withOptimizedForStreaming(boolean optimizedForStreaming) {
|
||||
/**
|
||||
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withOptimizedForStreaming(GetSearchAllLibrariesLibraryOptimizedForStreaming optimizedForStreaming) {
|
||||
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
|
||||
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withOptimizedForStreaming(Optional<Boolean> optimizedForStreaming) {
|
||||
/**
|
||||
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
*/
|
||||
public GetSearchAllLibrariesPart withOptimizedForStreaming(Optional<? extends GetSearchAllLibrariesLibraryOptimizedForStreaming> optimizedForStreaming) {
|
||||
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
|
||||
this.optimizedForStreaming = optimizedForStreaming;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withVideoProfile(String videoProfile) {
|
||||
Utils.checkNotNull(videoProfile, "videoProfile");
|
||||
this.videoProfile = Optional.ofNullable(videoProfile);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withVideoProfile(Optional<String> videoProfile) {
|
||||
Utils.checkNotNull(videoProfile, "videoProfile");
|
||||
this.videoProfile = videoProfile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withIndexes(String indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = Optional.ofNullable(indexes);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withIndexes(Optional<String> indexes) {
|
||||
Utils.checkNotNull(indexes, "indexes");
|
||||
this.indexes = indexes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withHasThumbnail(GetSearchAllLibrariesHasThumbnail hasThumbnail) {
|
||||
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
|
||||
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
|
||||
@@ -316,18 +519,6 @@ public class GetSearchAllLibrariesPart {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withStream(List<GetSearchAllLibrariesStream> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = Optional.ofNullable(stream);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart withStream(Optional<? extends List<GetSearchAllLibrariesStream>> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = stream;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -339,140 +530,288 @@ public class GetSearchAllLibrariesPart {
|
||||
}
|
||||
GetSearchAllLibrariesPart other = (GetSearchAllLibrariesPart) 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);
|
||||
Objects.deepEquals(this.hasThumbnail, other.hasThumbnail);
|
||||
}
|
||||
|
||||
@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);
|
||||
hasThumbnail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesPart.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);
|
||||
"hasThumbnail", hasThumbnail);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Integer id;
|
||||
private Optional<Boolean> accessible = Optional.empty();
|
||||
|
||||
private String key;
|
||||
private Optional<Boolean> exists = Optional.empty();
|
||||
|
||||
private Long id;
|
||||
|
||||
private Optional<String> key = Optional.empty();
|
||||
|
||||
private Optional<String> indexes = Optional.empty();
|
||||
|
||||
private Optional<Integer> duration = Optional.empty();
|
||||
|
||||
private String file;
|
||||
private Optional<String> file = Optional.empty();
|
||||
|
||||
private Long size;
|
||||
private Optional<Long> size = Optional.empty();
|
||||
|
||||
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 GetSearchAllLibrariesLibraryOptimizedForStreaming> optimizedForStreaming = Optional.empty();
|
||||
|
||||
private Optional<? extends GetSearchAllLibrariesHasThumbnail> hasThumbnail;
|
||||
|
||||
private Optional<? extends List<GetSearchAllLibrariesStream>> stream = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// 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 = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key to access this part.
|
||||
*/
|
||||
public Builder key(Optional<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 = Optional.ofNullable(file);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File path for the part.
|
||||
*/
|
||||
public Builder file(Optional<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 = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* File size in bytes.
|
||||
*/
|
||||
public Builder size(Optional<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;
|
||||
@@ -491,42 +830,24 @@ public class GetSearchAllLibrariesPart {
|
||||
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(GetSearchAllLibrariesLibraryOptimizedForStreaming 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 GetSearchAllLibrariesLibraryOptimizedForStreaming> 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(GetSearchAllLibrariesHasThumbnail hasThumbnail) {
|
||||
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
|
||||
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
|
||||
@@ -538,37 +859,27 @@ public class GetSearchAllLibrariesPart {
|
||||
this.hasThumbnail = hasThumbnail;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder stream(List<GetSearchAllLibrariesStream> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = Optional.ofNullable(stream);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder stream(Optional<? extends List<GetSearchAllLibrariesStream>> stream) {
|
||||
Utils.checkNotNull(stream, "stream");
|
||||
this.stream = stream;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesPart build() {
|
||||
if (hasThumbnail == null) {
|
||||
hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value();
|
||||
}
|
||||
return new GetSearchAllLibrariesPart(
|
||||
accessible,
|
||||
exists,
|
||||
id,
|
||||
key,
|
||||
indexes,
|
||||
duration,
|
||||
file,
|
||||
size,
|
||||
packetLength,
|
||||
container,
|
||||
videoProfile,
|
||||
audioProfile,
|
||||
has64bitOffsets,
|
||||
optimizedForStreaming,
|
||||
videoProfile,
|
||||
indexes,
|
||||
hasThumbnail,
|
||||
stream);
|
||||
hasThumbnail);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Optional<? extends GetSearchAllLibrariesHasThumbnail>> _SINGLETON_VALUE_HasThumbnail =
|
||||
|
||||
@@ -9,7 +9,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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -18,217 +18,112 @@ import java.util.Optional;
|
||||
public class GetSearchAllLibrariesRole {
|
||||
|
||||
/**
|
||||
* The ID of the tag or actor.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("id")
|
||||
private Optional<Long> id;
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
* The display tag for the actor (typically the actor's name).
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("filter")
|
||||
private Optional<String> filter;
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
@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 absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesRole(
|
||||
@JsonProperty("id") Optional<Long> id,
|
||||
@JsonProperty("filter") Optional<String> filter,
|
||||
@JsonProperty("thumb") Optional<String> thumb,
|
||||
@JsonProperty("tag") Optional<String> tag,
|
||||
@JsonProperty("tagKey") Optional<String> tagKey,
|
||||
@JsonProperty("role") Optional<String> role) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@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 GetSearchAllLibrariesRole() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
public GetSearchAllLibrariesRole(
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the tag or actor.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<Long> id() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
* The display tag for the actor (typically the actor's name).
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> filter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tagKey() {
|
||||
return tagKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 absolute 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.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withId(long id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = Optional.ofNullable(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the tag or actor.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withId(Optional<Long> id) {
|
||||
public GetSearchAllLibrariesRole withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withFilter(Optional<String> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The thumbnail of the actor
|
||||
*/
|
||||
public GetSearchAllLibrariesRole 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 GetSearchAllLibrariesRole withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the tag or actor.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withTag(Optional<String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the tag.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withTagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = Optional.ofNullable(tagKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the tag.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withTagKey(Optional<String> tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of the actor or tag in the media.
|
||||
* The role played by the actor in the media item.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withRole(String role) {
|
||||
Utils.checkNotNull(role, "role");
|
||||
@@ -237,7 +132,7 @@ public class GetSearchAllLibrariesRole {
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of the actor or tag in the media.
|
||||
* The role played by the actor in the media item.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withRole(Optional<String> role) {
|
||||
Utils.checkNotNull(role, "role");
|
||||
@@ -245,6 +140,24 @@ public class GetSearchAllLibrariesRole {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
public GetSearchAllLibrariesRole withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -257,145 +170,64 @@ public class GetSearchAllLibrariesRole {
|
||||
GetSearchAllLibrariesRole other = (GetSearchAllLibrariesRole) o;
|
||||
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
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
id,
|
||||
filter,
|
||||
thumb,
|
||||
tag,
|
||||
tagKey,
|
||||
role);
|
||||
role,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesRole.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 Integer id;
|
||||
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private Optional<String> thumb = Optional.empty();
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
|
||||
private Optional<String> tagKey = Optional.empty();
|
||||
private String tag;
|
||||
|
||||
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.
|
||||
* The unique identifier for the role.
|
||||
* NOTE: This is different for each Plex server and is not globally unique.
|
||||
*/
|
||||
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) {
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter used to find the actor or tag.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
public Builder tagKey(String tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = Optional.ofNullable(tagKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the tag.
|
||||
*/
|
||||
public Builder tagKey(Optional<String> tagKey) {
|
||||
Utils.checkNotNull(tagKey, "tagKey");
|
||||
this.tagKey = tagKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 +236,38 @@ public class GetSearchAllLibrariesRole {
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 absolute 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 absolute URL of the thumbnail image for the actor.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesRole build() {
|
||||
return new GetSearchAllLibrariesRole(
|
||||
id,
|
||||
filter,
|
||||
thumb,
|
||||
tag,
|
||||
tagKey,
|
||||
role);
|
||||
role,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,11 +45,12 @@ import java.util.Optional;
|
||||
* GetSearchAllLibrariesShowOrdering
|
||||
*
|
||||
* <p>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)).
|
||||
* Options:
|
||||
* - None = Library default
|
||||
* - tmdbAiring = The Movie Database (Aired)
|
||||
* - aired = TheTVDB (Aired)
|
||||
* - dvd = TheTVDB (DVD)
|
||||
* - absolute = TheTVDB (Absolute)
|
||||
*/
|
||||
@JsonDeserialize(using = GetSearchAllLibrariesShowOrdering._Deserializer.class)
|
||||
@JsonSerialize(using = GetSearchAllLibrariesShowOrdering._Serializer.class)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,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.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -16,42 +17,108 @@ import java.util.Optional;
|
||||
|
||||
public class GetSearchAllLibrariesWriter {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
/**
|
||||
* Unique identifier for the writer.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private Optional<String> tag;
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<String> thumb;
|
||||
|
||||
@JsonCreator
|
||||
public GetSearchAllLibrariesWriter(
|
||||
@JsonProperty("tag") Optional<String> tag) {
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@JsonProperty("thumb") Optional<String> thumb) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.id = id;
|
||||
this.tag = tag;
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesWriter() {
|
||||
this(Optional.empty());
|
||||
public GetSearchAllLibrariesWriter(
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifier for the writer.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> tag() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Optional<String> thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesWriter withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
/**
|
||||
* Unique identifier for the writer.
|
||||
*/
|
||||
public GetSearchAllLibrariesWriter withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesWriter withTag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
public GetSearchAllLibrariesWriter withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public GetSearchAllLibrariesWriter withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public GetSearchAllLibrariesWriter withThumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -63,44 +130,80 @@ public class GetSearchAllLibrariesWriter {
|
||||
}
|
||||
GetSearchAllLibrariesWriter other = (GetSearchAllLibrariesWriter) o;
|
||||
return
|
||||
Objects.deepEquals(this.tag, other.tag);
|
||||
Objects.deepEquals(this.id, other.id) &&
|
||||
Objects.deepEquals(this.tag, other.tag) &&
|
||||
Objects.deepEquals(this.thumb, other.thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetSearchAllLibrariesWriter.class,
|
||||
"tag", tag);
|
||||
"id", id,
|
||||
"tag", tag,
|
||||
"thumb", thumb);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<String> tag = Optional.empty();
|
||||
private Integer id;
|
||||
|
||||
private String tag;
|
||||
|
||||
private Optional<String> thumb = 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(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<String> tag) {
|
||||
/**
|
||||
* The role of Writer
|
||||
*/
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL of the thumbnail image for the writer.
|
||||
*/
|
||||
public Builder thumb(Optional<String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetSearchAllLibrariesWriter build() {
|
||||
return new GetSearchAllLibrariesWriter(
|
||||
tag);
|
||||
id,
|
||||
tag,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,52 +5,103 @@ 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.Float;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class SearchResult {
|
||||
|
||||
/**
|
||||
* The score of the search result, typically a float value between 0 and 1.
|
||||
*/
|
||||
@JsonProperty("score")
|
||||
private float score;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Directory")
|
||||
private Optional<? extends GetSearchAllLibrariesDirectory> directory;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Metadata")
|
||||
private GetSearchAllLibrariesMetadata metadata;
|
||||
private Optional<? extends GetSearchAllLibrariesMetadata> metadata;
|
||||
|
||||
@JsonCreator
|
||||
public SearchResult(
|
||||
@JsonProperty("score") float score,
|
||||
@JsonProperty("Metadata") GetSearchAllLibrariesMetadata metadata) {
|
||||
@JsonProperty("Directory") Optional<? extends GetSearchAllLibrariesDirectory> directory,
|
||||
@JsonProperty("Metadata") Optional<? extends GetSearchAllLibrariesMetadata> metadata) {
|
||||
Utils.checkNotNull(score, "score");
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.score = score;
|
||||
this.directory = directory;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public SearchResult(
|
||||
float score) {
|
||||
this(score, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* The score of the search result, typically a float value between 0 and 1.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public float score() {
|
||||
return score;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public GetSearchAllLibrariesMetadata metadata() {
|
||||
return metadata;
|
||||
public Optional<GetSearchAllLibrariesDirectory> directory() {
|
||||
return (Optional<GetSearchAllLibrariesDirectory>) directory;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public Optional<GetSearchAllLibrariesMetadata> metadata() {
|
||||
return (Optional<GetSearchAllLibrariesMetadata>) metadata;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The score of the search result, typically a float value between 0 and 1.
|
||||
*/
|
||||
public SearchResult withScore(float score) {
|
||||
Utils.checkNotNull(score, "score");
|
||||
this.score = score;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SearchResult withDirectory(GetSearchAllLibrariesDirectory directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = Optional.ofNullable(directory);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SearchResult withDirectory(Optional<? extends GetSearchAllLibrariesDirectory> directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SearchResult withMetadata(GetSearchAllLibrariesMetadata metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = Optional.ofNullable(metadata);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SearchResult withMetadata(Optional<? extends GetSearchAllLibrariesMetadata> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
@@ -68,6 +119,7 @@ public class SearchResult {
|
||||
SearchResult other = (SearchResult) o;
|
||||
return
|
||||
Objects.deepEquals(this.score, other.score) &&
|
||||
Objects.deepEquals(this.directory, other.directory) &&
|
||||
Objects.deepEquals(this.metadata, other.metadata);
|
||||
}
|
||||
|
||||
@@ -75,6 +127,7 @@ public class SearchResult {
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
score,
|
||||
directory,
|
||||
metadata);
|
||||
}
|
||||
|
||||
@@ -82,6 +135,7 @@ public class SearchResult {
|
||||
public String toString() {
|
||||
return Utils.toString(SearchResult.class,
|
||||
"score", score,
|
||||
"directory", directory,
|
||||
"metadata", metadata);
|
||||
}
|
||||
|
||||
@@ -89,19 +143,42 @@ public class SearchResult {
|
||||
|
||||
private Float score;
|
||||
|
||||
private GetSearchAllLibrariesMetadata metadata;
|
||||
private Optional<? extends GetSearchAllLibrariesDirectory> directory = Optional.empty();
|
||||
|
||||
private Optional<? extends GetSearchAllLibrariesMetadata> metadata = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The score of the search result, typically a float value between 0 and 1.
|
||||
*/
|
||||
public Builder score(float score) {
|
||||
Utils.checkNotNull(score, "score");
|
||||
this.score = score;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder directory(GetSearchAllLibrariesDirectory directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = Optional.ofNullable(directory);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder directory(Optional<? extends GetSearchAllLibrariesDirectory> directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metadata(GetSearchAllLibrariesMetadata metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = Optional.ofNullable(metadata);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metadata(Optional<? extends GetSearchAllLibrariesMetadata> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
@@ -110,6 +187,7 @@ public class SearchResult {
|
||||
public SearchResult build() {
|
||||
return new SearchResult(
|
||||
score,
|
||||
directory,
|
||||
metadata);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,11 +45,12 @@ import java.util.Optional;
|
||||
* ShowOrdering
|
||||
*
|
||||
* <p>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)).
|
||||
* Options:
|
||||
* - None = Library default
|
||||
* - tmdbAiring = The Movie Database (Aired)
|
||||
* - aired = TheTVDB (Aired)
|
||||
* - dvd = TheTVDB (DVD)
|
||||
* - absolute = TheTVDB (Absolute)
|
||||
*/
|
||||
@JsonDeserialize(using = ShowOrdering._Deserializer.class)
|
||||
@JsonSerialize(using = ShowOrdering._Serializer.class)
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Float;
|
||||
@@ -28,12 +30,12 @@ public class Stream {
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
* - VIDEO = 1
|
||||
* - AUDIO = 2
|
||||
* - SUBTITLE = 3
|
||||
*/
|
||||
@JsonProperty("streamType")
|
||||
private StreamType streamType;
|
||||
private long streamType;
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
@@ -363,7 +365,6 @@ public class Stream {
|
||||
@JsonCreator
|
||||
public Stream(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("streamType") StreamType streamType,
|
||||
@JsonProperty("format") Optional<String> format,
|
||||
@JsonProperty("default") Optional<Boolean> default_,
|
||||
@JsonProperty("codec") String codec,
|
||||
@@ -414,7 +415,6 @@ public class Stream {
|
||||
@JsonProperty("dub") Optional<Boolean> dub,
|
||||
@JsonProperty("title") Optional<String> title) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
Utils.checkNotNull(format, "format");
|
||||
Utils.checkNotNull(default_, "default_");
|
||||
Utils.checkNotNull(codec, "codec");
|
||||
@@ -465,7 +465,7 @@ public class Stream {
|
||||
Utils.checkNotNull(dub, "dub");
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.id = id;
|
||||
this.streamType = streamType;
|
||||
this.streamType = Builder._SINGLETON_VALUE_StreamType.value();
|
||||
this.format = format;
|
||||
this.default_ = default_;
|
||||
this.codec = codec;
|
||||
@@ -519,11 +519,10 @@ public class Stream {
|
||||
|
||||
public Stream(
|
||||
long id,
|
||||
StreamType streamType,
|
||||
String codec,
|
||||
String displayTitle,
|
||||
String extendedDisplayTitle) {
|
||||
this(id, streamType, Optional.empty(), Optional.empty(), codec, 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(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
this(id, Optional.empty(), Optional.empty(), codec, 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(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,12 +535,12 @@ public class Stream {
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
* - VIDEO = 1
|
||||
* - AUDIO = 2
|
||||
* - SUBTITLE = 3
|
||||
*/
|
||||
@JsonIgnore
|
||||
public StreamType streamType() {
|
||||
public long streamType() {
|
||||
return streamType;
|
||||
}
|
||||
|
||||
@@ -935,18 +934,6 @@ public class Stream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
public Stream withStreamType(StreamType streamType) {
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
this.streamType = streamType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
*/
|
||||
@@ -1952,8 +1939,6 @@ public class Stream {
|
||||
|
||||
private Long id;
|
||||
|
||||
private StreamType streamType;
|
||||
|
||||
private Optional<String> format = Optional.empty();
|
||||
|
||||
private Optional<Boolean> default_ = Optional.empty();
|
||||
@@ -2065,18 +2050,6 @@ public class Stream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
public Builder streamType(StreamType streamType) {
|
||||
Utils.checkNotNull(streamType, "streamType");
|
||||
this.streamType = streamType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the stream (e.g., srt).
|
||||
*/
|
||||
@@ -2905,7 +2878,6 @@ public class Stream {
|
||||
public Stream build() {
|
||||
return new Stream(
|
||||
id,
|
||||
streamType,
|
||||
format,
|
||||
default_,
|
||||
codec,
|
||||
@@ -2956,5 +2928,11 @@ public class Stream {
|
||||
dub,
|
||||
title);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Long> _SINGLETON_VALUE_StreamType =
|
||||
new LazySingletonValue<>(
|
||||
"streamType",
|
||||
"1",
|
||||
new TypeReference<Long>() {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import java.io.IOException;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||
* to evolve (particularly with the addition of enum members over time). If an
|
||||
* open enum is used then the appearance of unexpected enum values (say in a
|
||||
* response from an updated an API) will not bring about a runtime error thus
|
||||
* ensuring that non-updated client versions can continue to work without error.
|
||||
*
|
||||
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||
* cache is maintained to ensure that). As a consequence instances created with the
|
||||
* same value will satisfy reference equality (via {@code ==}).
|
||||
*
|
||||
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||
* Java does not permit the use of an instance in a switch expression but you can
|
||||
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* StreamType
|
||||
*
|
||||
* <p>Stream type:
|
||||
* - 1 = video
|
||||
* - 2 = audio
|
||||
* - 3 = subtitle
|
||||
*/
|
||||
@JsonDeserialize(using = StreamType._Deserializer.class)
|
||||
@JsonSerialize(using = StreamType._Serializer.class)
|
||||
public class StreamType {
|
||||
|
||||
public static final StreamType Video = new StreamType(1);
|
||||
public static final StreamType Audio = new StreamType(2);
|
||||
public static final StreamType Subtitle = new StreamType(3);
|
||||
|
||||
// This map will grow whenever a Color gets created with a new
|
||||
// unrecognized value (a potential memory leak if the user is not
|
||||
// careful). Keep this field lower case to avoid clashing with
|
||||
// generated member names which will always be upper cased (Java
|
||||
// convention)
|
||||
private static final Map<Integer, StreamType> values = createValuesMap();
|
||||
private static final Map<Integer, StreamTypeEnum> enums = createEnumsMap();
|
||||
|
||||
private final int value;
|
||||
|
||||
private StreamType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a StreamType with the given value. For a specific value the
|
||||
* returned object will always be a singleton so reference equality
|
||||
* is satisfied when the values are the same.
|
||||
*
|
||||
* @param value value to be wrapped as StreamType
|
||||
*/
|
||||
public static StreamType of(int value) {
|
||||
synchronized (StreamType.class) {
|
||||
return values.computeIfAbsent(value, v -> new StreamType(v));
|
||||
}
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Optional<StreamTypeEnum> asEnum() {
|
||||
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
return asEnum().isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
StreamType other = (StreamType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StreamType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static StreamType[] values() {
|
||||
synchronized (StreamType.class) {
|
||||
return values.values().toArray(new StreamType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<Integer, StreamType> createValuesMap() {
|
||||
Map<Integer, StreamType> map = new LinkedHashMap<>();
|
||||
map.put(1, Video);
|
||||
map.put(2, Audio);
|
||||
map.put(3, Subtitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<Integer, StreamTypeEnum> createEnumsMap() {
|
||||
Map<Integer, StreamTypeEnum> map = new HashMap<>();
|
||||
map.put(1, StreamTypeEnum.Video);
|
||||
map.put(2, StreamTypeEnum.Audio);
|
||||
map.put(3, StreamTypeEnum.Subtitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<StreamType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(StreamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(StreamType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<StreamType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(StreamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreamType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JacksonException {
|
||||
int v = p.readValueAs(new TypeReference<Integer>() {});
|
||||
// use the factory method to ensure we get singletons
|
||||
return StreamType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum StreamTypeEnum {
|
||||
|
||||
Video(1),
|
||||
Audio(2),
|
||||
Subtitle(3),;
|
||||
|
||||
private final int value;
|
||||
|
||||
private StreamTypeEnum(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface HTTPClient {
|
||||
* Sends an HTTP request and returns the response.
|
||||
*
|
||||
* <p>Note that {@link HttpRequest} is immutable. To modify the request you can use
|
||||
* {@link HttpRequest#newBuilder(HttpRequest, BiPredicate<String, String>)} with
|
||||
* {@code HttpRequest#newBuilder(HttpRequest, BiPredicate<String, String>)} with
|
||||
* JDK 16 and later (which will copy the request for modification in a builder).
|
||||
* If that method is not available then use {@link Helpers#copy} (which also returns
|
||||
* a builder).
|
||||
|
||||
Reference in New Issue
Block a user