mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 20:47:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.529.1
This commit is contained in:
@@ -52,7 +52,7 @@ public class PlexAPI {
|
||||
/**
|
||||
* The full address of your Plex Server
|
||||
*/
|
||||
"{protocol}://{ip}:{port}",
|
||||
"https://10.10.10.47:32400",
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -508,4 +508,5 @@ public class PlexAPI {
|
||||
this.updater = new Updater(sdkConfiguration);
|
||||
this.users = new Users(sdkConfiguration);
|
||||
this.sdkConfiguration.initialize();
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ class SDKConfiguration {
|
||||
} };
|
||||
private static final String LANGUAGE = "java";
|
||||
public static final String OPENAPI_DOC_VERSION = "0.0.3";
|
||||
public static final String SDK_VERSION = "0.14.1";
|
||||
public static final String GEN_VERSION = "2.565.1";
|
||||
public static final String SDK_VERSION = "0.14.2";
|
||||
public static final String GEN_VERSION = "2.566.5";
|
||||
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
|
||||
public static final String USER_AGENT =
|
||||
String.format("speakeasy-sdk/%s %s %s %s %s",
|
||||
|
||||
@@ -5,54 +5,96 @@ package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetAllLibrariesDirectory {
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonProperty("allowSync")
|
||||
private boolean allowSync;
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
@JsonProperty("art")
|
||||
private String art;
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
@JsonProperty("composite")
|
||||
private String composite;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("filters")
|
||||
private boolean filters;
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
@JsonProperty("refreshing")
|
||||
private boolean refreshing;
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
@JsonProperty("thumb")
|
||||
private String thumb;
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
private GetAllLibrariesType type;
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
@JsonProperty("agent")
|
||||
private String agent;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("scanner")
|
||||
private String scanner;
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
@JsonProperty("language")
|
||||
private String language;
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
@JsonProperty("uuid")
|
||||
private String uuid;
|
||||
|
||||
@@ -62,11 +104,9 @@ public class GetAllLibrariesDirectory {
|
||||
@JsonProperty("updatedAt")
|
||||
private long updatedAt;
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("createdAt")
|
||||
private long createdAt;
|
||||
private Optional<Long> createdAt;
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
@@ -74,20 +114,27 @@ public class GetAllLibrariesDirectory {
|
||||
@JsonProperty("scannedAt")
|
||||
private long scannedAt;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("content")
|
||||
private boolean content;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("directory")
|
||||
private boolean directory;
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
* The number of seconds since the content was last changed relative to now.
|
||||
*/
|
||||
@JsonProperty("contentChangedAt")
|
||||
private long contentChangedAt;
|
||||
private int contentChangedAt;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("hidden")
|
||||
private int hidden;
|
||||
private Optional<? extends Hidden> hidden;
|
||||
|
||||
@JsonProperty("Location")
|
||||
private List<GetAllLibrariesLocation> location;
|
||||
@@ -101,19 +148,19 @@ public class GetAllLibrariesDirectory {
|
||||
@JsonProperty("refreshing") boolean refreshing,
|
||||
@JsonProperty("thumb") String thumb,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("type") GetAllLibrariesType type,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("agent") String agent,
|
||||
@JsonProperty("scanner") String scanner,
|
||||
@JsonProperty("language") String language,
|
||||
@JsonProperty("uuid") String uuid,
|
||||
@JsonProperty("updatedAt") long updatedAt,
|
||||
@JsonProperty("createdAt") long createdAt,
|
||||
@JsonProperty("createdAt") Optional<Long> createdAt,
|
||||
@JsonProperty("scannedAt") long scannedAt,
|
||||
@JsonProperty("content") boolean content,
|
||||
@JsonProperty("directory") boolean directory,
|
||||
@JsonProperty("contentChangedAt") long contentChangedAt,
|
||||
@JsonProperty("hidden") int hidden,
|
||||
@JsonProperty("contentChangedAt") int contentChangedAt,
|
||||
@JsonProperty("hidden") Optional<? extends Hidden> hidden,
|
||||
@JsonProperty("Location") List<GetAllLibrariesLocation> location) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
Utils.checkNotNull(art, "art");
|
||||
@@ -158,67 +205,126 @@ public class GetAllLibrariesDirectory {
|
||||
this.hidden = hidden;
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory(
|
||||
boolean allowSync,
|
||||
String art,
|
||||
String composite,
|
||||
boolean filters,
|
||||
boolean refreshing,
|
||||
String thumb,
|
||||
String key,
|
||||
GetAllLibrariesType type,
|
||||
String title,
|
||||
String agent,
|
||||
String scanner,
|
||||
String language,
|
||||
String uuid,
|
||||
long updatedAt,
|
||||
long scannedAt,
|
||||
boolean content,
|
||||
boolean directory,
|
||||
int contentChangedAt,
|
||||
List<GetAllLibrariesLocation> location) {
|
||||
this(allowSync, art, composite, filters, refreshing, thumb, key, type, title, agent, scanner, language, uuid, updatedAt, Optional.empty(), scannedAt, content, directory, contentChangedAt, Optional.empty(), location);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean allowSync() {
|
||||
return allowSync;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String art() {
|
||||
return art;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String composite() {
|
||||
return composite;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean filters() {
|
||||
return filters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean refreshing() {
|
||||
return refreshing;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
public GetAllLibrariesType type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String agent() {
|
||||
return agent;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String scanner() {
|
||||
return scanner;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String language() {
|
||||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String uuid() {
|
||||
return uuid;
|
||||
@@ -232,11 +338,8 @@ public class GetAllLibrariesDirectory {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long createdAt() {
|
||||
public Optional<Long> createdAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@@ -248,27 +351,34 @@ public class GetAllLibrariesDirectory {
|
||||
return scannedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean content() {
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean directory() {
|
||||
return directory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
* The number of seconds since the content was last changed relative to now.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long contentChangedAt() {
|
||||
public int contentChangedAt() {
|
||||
return contentChangedAt;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public int hidden() {
|
||||
return hidden;
|
||||
public Optional<Hidden> hidden() {
|
||||
return (Optional<Hidden>) hidden;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@@ -280,78 +390,114 @@ public class GetAllLibrariesDirectory {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withAllowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withArt(String art) {
|
||||
Utils.checkNotNull(art, "art");
|
||||
this.art = art;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withComposite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withFilters(boolean filters) {
|
||||
Utils.checkNotNull(filters, "filters");
|
||||
this.filters = filters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
public GetAllLibrariesDirectory withRefreshing(boolean refreshing) {
|
||||
Utils.checkNotNull(refreshing, "refreshing");
|
||||
this.refreshing = refreshing;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
public GetAllLibrariesDirectory withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory withType(String type) {
|
||||
public GetAllLibrariesDirectory withType(GetAllLibrariesType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
public GetAllLibrariesDirectory withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withAgent(String agent) {
|
||||
Utils.checkNotNull(agent, "agent");
|
||||
this.agent = agent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withScanner(String scanner) {
|
||||
Utils.checkNotNull(scanner, "scanner");
|
||||
this.scanner = scanner;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
public GetAllLibrariesDirectory withLanguage(String language) {
|
||||
Utils.checkNotNull(language, "language");
|
||||
this.language = language;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withUuid(String uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = uuid;
|
||||
@@ -367,10 +513,13 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
public GetAllLibrariesDirectory withCreatedAt(long createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = Optional.ofNullable(createdAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory withCreatedAt(Optional<Long> createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
@@ -385,12 +534,18 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withContent(boolean content) {
|
||||
Utils.checkNotNull(content, "content");
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withDirectory(boolean directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
@@ -398,15 +553,21 @@ public class GetAllLibrariesDirectory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
* The number of seconds since the content was last changed relative to now.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withContentChangedAt(long contentChangedAt) {
|
||||
public GetAllLibrariesDirectory withContentChangedAt(int contentChangedAt) {
|
||||
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
||||
this.contentChangedAt = contentChangedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory withHidden(int hidden) {
|
||||
public GetAllLibrariesDirectory withHidden(Hidden hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = Optional.ofNullable(hidden);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory withHidden(Optional<? extends Hidden> hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = hidden;
|
||||
return this;
|
||||
@@ -520,7 +681,7 @@ public class GetAllLibrariesDirectory {
|
||||
|
||||
private String key;
|
||||
|
||||
private String type;
|
||||
private GetAllLibrariesType type;
|
||||
|
||||
private String title;
|
||||
|
||||
@@ -534,7 +695,7 @@ public class GetAllLibrariesDirectory {
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private Long createdAt;
|
||||
private Optional<Long> createdAt = Optional.empty();
|
||||
|
||||
private Long scannedAt;
|
||||
|
||||
@@ -542,9 +703,9 @@ public class GetAllLibrariesDirectory {
|
||||
|
||||
private Boolean directory;
|
||||
|
||||
private Long contentChangedAt;
|
||||
private Integer contentChangedAt;
|
||||
|
||||
private Integer hidden;
|
||||
private Optional<? extends Hidden> hidden;
|
||||
|
||||
private List<GetAllLibrariesLocation> location;
|
||||
|
||||
@@ -552,78 +713,114 @@ public class GetAllLibrariesDirectory {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public Builder allowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
public Builder art(String art) {
|
||||
Utils.checkNotNull(art, "art");
|
||||
this.art = art;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
public Builder composite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder filters(boolean filters) {
|
||||
Utils.checkNotNull(filters, "filters");
|
||||
this.filters = filters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
public Builder refreshing(boolean refreshing) {
|
||||
Utils.checkNotNull(refreshing, "refreshing");
|
||||
this.refreshing = refreshing;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
public Builder type(GetAllLibrariesType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
public Builder agent(String agent) {
|
||||
Utils.checkNotNull(agent, "agent");
|
||||
this.agent = agent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder scanner(String scanner) {
|
||||
Utils.checkNotNull(scanner, "scanner");
|
||||
this.scanner = scanner;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
public Builder language(String language) {
|
||||
Utils.checkNotNull(language, "language");
|
||||
this.language = language;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
public Builder uuid(String uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = uuid;
|
||||
@@ -639,10 +836,13 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
public Builder createdAt(long createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = Optional.ofNullable(createdAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder createdAt(Optional<Long> createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
@@ -657,12 +857,18 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder content(boolean content) {
|
||||
Utils.checkNotNull(content, "content");
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder directory(boolean directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
@@ -670,15 +876,21 @@ public class GetAllLibrariesDirectory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
* The number of seconds since the content was last changed relative to now.
|
||||
*/
|
||||
public Builder contentChangedAt(long contentChangedAt) {
|
||||
public Builder contentChangedAt(int contentChangedAt) {
|
||||
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
||||
this.contentChangedAt = contentChangedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder hidden(int hidden) {
|
||||
public Builder hidden(Hidden hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = Optional.ofNullable(hidden);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder hidden(Optional<? extends Hidden> hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = hidden;
|
||||
return this;
|
||||
@@ -691,6 +903,9 @@ public class GetAllLibrariesDirectory {
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory build() {
|
||||
if (hidden == null) {
|
||||
hidden = _SINGLETON_VALUE_Hidden.value();
|
||||
}
|
||||
return new GetAllLibrariesDirectory(
|
||||
allowSync,
|
||||
art,
|
||||
@@ -714,5 +929,11 @@ public class GetAllLibrariesDirectory {
|
||||
hidden,
|
||||
location);
|
||||
}
|
||||
|
||||
private static final LazySingletonValue<Optional<? extends Hidden>> _SINGLETON_VALUE_Hidden =
|
||||
new LazySingletonValue<>(
|
||||
"hidden",
|
||||
"0",
|
||||
new TypeReference<Optional<? extends Hidden>>() {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,15 @@ import java.util.Objects;
|
||||
|
||||
public class GetAllLibrariesLocation {
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
@JsonProperty("path")
|
||||
private String path;
|
||||
|
||||
@@ -30,11 +36,17 @@ public class GetAllLibrariesLocation {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String path() {
|
||||
return path;
|
||||
@@ -44,12 +56,18 @@ public class GetAllLibrariesLocation {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
public GetAllLibrariesLocation withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
public GetAllLibrariesLocation withPath(String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
@@ -95,12 +113,18 @@ public class GetAllLibrariesLocation {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
public Builder path(String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
|
||||
@@ -5,35 +5,49 @@ package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetAllLibrariesMediaContainer {
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
@JsonProperty("size")
|
||||
private int size;
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonProperty("allowSync")
|
||||
private boolean allowSync;
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
@JsonProperty("title1")
|
||||
private String title1;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Directory")
|
||||
private List<GetAllLibrariesDirectory> directory;
|
||||
private Optional<? extends List<GetAllLibrariesDirectory>> directory;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesMediaContainer(
|
||||
@JsonProperty("size") int size,
|
||||
@JsonProperty("allowSync") boolean allowSync,
|
||||
@JsonProperty("title1") String title1,
|
||||
@JsonProperty("Directory") List<GetAllLibrariesDirectory> directory) {
|
||||
@JsonProperty("Directory") Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
Utils.checkNotNull(title1, "title1");
|
||||
@@ -43,43 +57,69 @@ public class GetAllLibrariesMediaContainer {
|
||||
this.title1 = title1;
|
||||
this.directory = directory;
|
||||
}
|
||||
|
||||
public GetAllLibrariesMediaContainer(
|
||||
int size,
|
||||
boolean allowSync,
|
||||
String title1) {
|
||||
this(size, allowSync, title1, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean allowSync() {
|
||||
return allowSync;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String title1() {
|
||||
return title1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public List<GetAllLibrariesDirectory> directory() {
|
||||
return directory;
|
||||
public Optional<List<GetAllLibrariesDirectory>> directory() {
|
||||
return (Optional<List<GetAllLibrariesDirectory>>) directory;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
public GetAllLibrariesMediaContainer withSize(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public GetAllLibrariesMediaContainer withAllowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
public GetAllLibrariesMediaContainer withTitle1(String title1) {
|
||||
Utils.checkNotNull(title1, "title1");
|
||||
this.title1 = title1;
|
||||
@@ -87,6 +127,12 @@ public class GetAllLibrariesMediaContainer {
|
||||
}
|
||||
|
||||
public GetAllLibrariesMediaContainer withDirectory(List<GetAllLibrariesDirectory> directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = Optional.ofNullable(directory);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesMediaContainer withDirectory(Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
return this;
|
||||
@@ -135,24 +181,33 @@ public class GetAllLibrariesMediaContainer {
|
||||
|
||||
private String title1;
|
||||
|
||||
private List<GetAllLibrariesDirectory> directory;
|
||||
private Optional<? extends List<GetAllLibrariesDirectory>> directory = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
public Builder size(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public Builder allowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
public Builder title1(String title1) {
|
||||
Utils.checkNotNull(title1, "title1");
|
||||
this.title1 = title1;
|
||||
@@ -160,6 +215,12 @@ public class GetAllLibrariesMediaContainer {
|
||||
}
|
||||
|
||||
public Builder directory(List<GetAllLibrariesDirectory> directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = Optional.ofNullable(directory);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder directory(Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
return this;
|
||||
|
||||
@@ -5,11 +5,15 @@ package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetAllLibrariesResponseBody
|
||||
@@ -18,19 +22,25 @@ import java.util.Objects;
|
||||
*/
|
||||
public class GetAllLibrariesResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("MediaContainer")
|
||||
private GetAllLibrariesMediaContainer mediaContainer;
|
||||
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesResponseBody(
|
||||
@JsonProperty("MediaContainer") GetAllLibrariesMediaContainer mediaContainer) {
|
||||
@JsonProperty("MediaContainer") Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public GetAllLibrariesMediaContainer mediaContainer() {
|
||||
return mediaContainer;
|
||||
public Optional<GetAllLibrariesMediaContainer> mediaContainer() {
|
||||
return (Optional<GetAllLibrariesMediaContainer>) mediaContainer;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
@@ -38,6 +48,12 @@ public class GetAllLibrariesResponseBody {
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody withMediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody withMediaContainer(Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
@@ -71,13 +87,19 @@ public class GetAllLibrariesResponseBody {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private GetAllLibrariesMediaContainer mediaContainer;
|
||||
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder mediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder mediaContainer(Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* GetAllLibrariesType
|
||||
*
|
||||
* <p>The library type
|
||||
*/
|
||||
public enum GetAllLibrariesType {
|
||||
Movie("movie"),
|
||||
TvShow("show"),
|
||||
Season("season"),
|
||||
Episode("episode"),
|
||||
Artist("artist"),
|
||||
Album("album");
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
private GetAllLibrariesType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetAllLibrariesType> fromValue(String value) {
|
||||
for (GetAllLibrariesType o: GetAllLibrariesType.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
39
src/main/java/dev/plexapi/sdk/models/operations/Hidden.java
Normal file
39
src/main/java/dev/plexapi/sdk/models/operations/Hidden.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Hidden
|
||||
*
|
||||
* <p>UNKNOWN
|
||||
*/
|
||||
public enum Hidden {
|
||||
Disable(0),
|
||||
Enable(1);
|
||||
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
private Hidden(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<Hidden> fromValue(int value) {
|
||||
for (Hidden o: Hidden.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +158,8 @@ public final class SessionManager<T extends SessionManager.HasSessionKey> {
|
||||
if (!t.tokenType.orElse("").equals("Bearer")) {
|
||||
throw new AuthException("Expected 'Bearer' token type but was '" + t.tokenType.orElse("") + "'");
|
||||
}
|
||||
final Optional<OffsetDateTime> expiresAt = t.expiresInMs
|
||||
.map(x -> OffsetDateTime.now().plus(x, ChronoUnit.MILLIS));
|
||||
final Optional<OffsetDateTime> expiresAt = t.expiresInSeconds
|
||||
.map(x -> OffsetDateTime.now().plus(x, ChronoUnit.SECONDS));
|
||||
return new Session<T>(credentials, t.accessToken, scopes, expiresAt);
|
||||
} catch (IOException | IllegalArgumentException | IllegalAccessException | InterruptedException | URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -175,7 +175,7 @@ public final class SessionManager<T extends SessionManager.HasSessionKey> {
|
||||
Optional<String> tokenType;
|
||||
|
||||
@JsonProperty("expires_in")
|
||||
Optional<Long> expiresInMs;
|
||||
Optional<Long> expiresInSeconds;;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user