ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2

This commit is contained in:
speakeasybot
2024-09-21 00:25:44 +00:00
parent f3780ae807
commit 3499fe6d12
190 changed files with 4636 additions and 5690 deletions

View File

@@ -77,7 +77,7 @@ public class Activities implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -234,7 +234,7 @@ public class Activities implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -24,7 +24,6 @@ import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
import dev.plexapi.sdk.models.operations.GetTransientTokenRequest;
import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder;
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
@@ -118,7 +117,7 @@ public class Authentication implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetTransientTokenRequest.class,
@@ -271,7 +270,7 @@ public class Authentication implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSourceConnectionInformationRequest.class,
@@ -426,7 +425,7 @@ public class Authentication implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -564,32 +563,20 @@ public class Authentication implements
* @throws Exception if the API call fails
*/
public PostUsersSignInDataResponse postUsersSignInDataDirect() throws Exception {
return postUsersSignInData(Optional.empty(), Optional.empty(), Optional.empty());
return postUsersSignInData(Optional.empty(), Optional.empty());
}
/**
* Get User Sign In Data
* Sign in user with username and password and return user data with Plex authentication token
* @param clientID The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
* @param requestBody Login credentials
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public PostUsersSignInDataResponse postUsersSignInData(
Optional<String> clientID,
Optional<? extends PostUsersSignInDataRequestBody> requestBody,
Optional<? extends PostUsersSignInDataRequestBody> request,
Optional<String> serverURL) throws Exception {
PostUsersSignInDataRequest request =
PostUsersSignInDataRequest
.builder()
.clientID(clientID)
.requestBody(requestBody)
.build();
String _baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap<String, String>());
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
@@ -602,21 +589,16 @@ public class Authentication implements
Object _convertedRequest = Utils.convertToShape(
request,
JsonShape.DEFAULT,
new TypeReference<Object>() {});
new TypeReference<Optional<? extends PostUsersSignInDataRequestBody>>() {});
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
_convertedRequest,
"requestBody",
"request",
"form",
false);
_req.setBody(Optional.ofNullable(_serializedRequestBody));
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
_req.addQueryParams(Utils.getQueryParams(
PostUsersSignInDataRequest.class,
request,
this.sdkConfiguration.globals));
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =

View File

@@ -89,7 +89,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -246,7 +246,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -384,7 +384,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -540,7 +540,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -688,7 +688,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -97,7 +97,7 @@ public class Hubs implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetGlobalHubsRequest.class,
@@ -280,7 +280,7 @@ public class Hubs implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetLibraryHubsRequest.class,

View File

@@ -168,7 +168,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetFileHashRequest.class,
@@ -339,7 +339,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetRecentlyAddedRequest.class,
@@ -503,7 +503,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -798,7 +798,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetLibraryDetailsRequest.class,
@@ -962,7 +962,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -1142,7 +1142,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetLibraryItemsRequest.class,
@@ -1326,7 +1326,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetRefreshLibraryMetadataRequest.class,
@@ -1524,7 +1524,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSearchLibraryRequest.class,
@@ -1688,7 +1688,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -1864,7 +1864,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetMetadataChildrenRequest.class,
@@ -2055,7 +2055,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetTopWatchedContentRequest.class,
@@ -2209,7 +2209,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -101,7 +101,7 @@ public class Log implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
LogLineRequest.class,
@@ -299,7 +299,7 @@ public class Log implements
_req.setBody(Optional.ofNullable(_serializedRequestBody));
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -437,7 +437,7 @@ public class Log implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -97,7 +97,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
MarkPlayedRequest.class,
@@ -246,7 +246,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
MarkUnplayedRequest.class,
@@ -403,7 +403,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
UpdatePlayProgressRequest.class,
@@ -548,7 +548,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "image/jpeg")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetBannerImageRequest.class,
@@ -704,7 +704,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "image/jpeg")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetThumbImageRequest.class,

View File

@@ -134,7 +134,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
CreatePlaylistRequest.class,
@@ -307,7 +307,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetPlaylistsRequest.class,
@@ -473,7 +473,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -632,7 +632,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -799,7 +799,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
UpdatePlaylistRequest.class,
@@ -967,7 +967,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetPlaylistContentsRequest.class,
@@ -1131,7 +1131,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -1303,7 +1303,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
AddPlaylistContentsRequest.class,
@@ -1456,17 +1456,20 @@ public class Playlists implements
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
* @param sectionID Possibly the section ID to upload the playlist to, we are not certain.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public UploadPlaylistResponse uploadPlaylist(
String path,
QueryParamForce force) throws Exception {
QueryParamForce force,
long sectionID) throws Exception {
UploadPlaylistRequest request =
UploadPlaylistRequest
.builder()
.path(path)
.force(force)
.sectionID(sectionID)
.build();
String _baseUrl = Utils.templateUrl(
@@ -1478,7 +1481,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
UploadPlaylistRequest.class,

View File

@@ -163,7 +163,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -324,7 +324,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -485,7 +485,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
@@ -629,7 +629,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -767,16 +767,12 @@ public class Plex implements
* @throws Exception if the API call fails
*/
public GetServerResourcesResponse getServerResourcesDirect() throws Exception {
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
* Get Server Resources
* Get Plex server access tokens and server connections
* @param clientID The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
* @param includeHttps Include Https entries in the results
* @param includeRelay Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
@@ -787,7 +783,6 @@ public class Plex implements
* @throws Exception if the API call fails
*/
public GetServerResourcesResponse getServerResources(
Optional<String> clientID,
Optional<? extends IncludeHttps> includeHttps,
Optional<? extends IncludeRelay> includeRelay,
Optional<? extends IncludeIPv6> includeIPv6,
@@ -795,7 +790,6 @@ public class Plex implements
GetServerResourcesRequest request =
GetServerResourcesRequest
.builder()
.clientID(clientID)
.includeHttps(includeHttps)
.includeRelay(includeRelay)
.includeIPv6(includeIPv6)
@@ -812,7 +806,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetServerResourcesRequest.class,
@@ -982,7 +976,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetPinRequest.class,
@@ -1108,29 +1102,23 @@ public class Plex implements
*/
public GetTokenByPinIdResponse getTokenByPinId(
long pinID) throws Exception {
return getTokenByPinId(Optional.empty(), pinID, Optional.empty());
return getTokenByPinId(pinID, Optional.empty());
}
/**
* Get Access Token by PinId
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
* @param clientID The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
* @param pinID The PinID to retrieve an access token for
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetTokenByPinIdResponse getTokenByPinId(
Optional<String> clientID,
long pinID,
Optional<String> serverURL) throws Exception {
GetTokenByPinIdRequest request =
GetTokenByPinIdRequest
.builder()
.clientID(clientID)
.pinID(pinID)
.build();
@@ -1147,12 +1135,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
_req.addQueryParams(Utils.getQueryParams(
GetTokenByPinIdRequest.class,
request,
this.sdkConfiguration.globals));
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =

View File

@@ -9,6 +9,7 @@ import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
import dev.plexapi.sdk.utils.HTTPClient;
import dev.plexapi.sdk.utils.RetryConfig;
import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
import dev.plexapi.sdk.utils.Utils;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
@@ -337,7 +338,7 @@ public class PlexAPI {
* @return The builder instance.
*/
public Builder serverURL(String serverUrl, Map<String, String> params) {
this.sdkConfiguration.serverUrl = dev.plexapi.sdk.utils.Utils.templateUrl(serverUrl, params);
this.sdkConfiguration.serverUrl = Utils.templateUrl(serverUrl, params);
return this;
}

View File

@@ -34,11 +34,14 @@ class SDKConfiguration {
put("port", "32400");
} });
} };
public String language = "java";
public String openapiDocVersion = "0.0.3";
public String sdkVersion = "0.3.6";
public String genVersion = "2.416.6";
public String userAgent = "speakeasy-sdk/java 0.3.6 2.416.6 0.0.3 dev.plexapi.sdk";
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "0.0.3";
public static final String SDK_VERSION = "0.4.0";
public static final String GEN_VERSION = "2.421.3";
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
LANGUAGE, SDK_VERSION, GEN_VERSION, OPENAPI_DOC_VERSION, BASE_PACKAGE);
private Hooks _hooks = createHooks();

View File

@@ -141,7 +141,7 @@ public class Search implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
PerformSearchRequest.class,
@@ -320,7 +320,7 @@ public class Search implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
PerformVoiceSearchRequest.class,
@@ -469,7 +469,7 @@ public class Search implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSearchResultsRequest.class,

View File

@@ -113,7 +113,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -260,7 +260,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -407,7 +407,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -554,7 +554,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -701,7 +701,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
@@ -829,7 +829,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -980,7 +980,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetResizedPhotoRequest.class,
@@ -1129,7 +1129,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetMediaProvidersRequest.class,
@@ -1281,7 +1281,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -86,7 +86,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -265,7 +265,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSessionHistoryRequest.class,
@@ -417,7 +417,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -574,7 +574,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -101,7 +101,7 @@ public class Statistics implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetStatisticsRequest.class,
@@ -273,7 +273,7 @@ public class Statistics implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetResourcesStatisticsRequest.class,
@@ -445,7 +445,7 @@ public class Statistics implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetBandwidthStatisticsRequest.class,

View File

@@ -81,7 +81,7 @@ public class Updater implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -246,7 +246,7 @@ public class Updater implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
CheckForUpdatesRequest.class,
@@ -411,7 +411,7 @@ public class Updater implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
ApplyUpdatesRequest.class,

View File

@@ -73,7 +73,7 @@ public class Video implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetTimelineRequest.class,
@@ -216,7 +216,7 @@ public class Video implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
StartUniversalTranscodeRequest.class,

View File

@@ -97,7 +97,7 @@ public class Watchlist implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetWatchListRequest.class,

View File

@@ -26,7 +26,7 @@ public class AddPlaylistContentsRequestBuilder {
return this;
}
public AddPlaylistContentsRequestBuilder uri(java.lang.String uri) {
public AddPlaylistContentsRequestBuilder uri(String uri) {
Utils.checkNotNull(uri, "uri");
this.uri = uri;
return this;
@@ -38,7 +38,7 @@ public class AddPlaylistContentsRequestBuilder {
return this;
}
public AddPlaylistContentsRequestBuilder playQueueID(java.util.Optional<java.lang.Double> playQueueID) {
public AddPlaylistContentsRequestBuilder playQueueID(Optional<Double> playQueueID) {
Utils.checkNotNull(playQueueID, "playQueueID");
this.playQueueID = playQueueID;
return this;

View File

@@ -17,25 +17,25 @@ public class ApplyUpdatesRequestBuilder {
this.sdk = sdk;
}
public ApplyUpdatesRequestBuilder tonight(dev.plexapi.sdk.models.operations.Tonight tonight) {
public ApplyUpdatesRequestBuilder tonight(Tonight tonight) {
Utils.checkNotNull(tonight, "tonight");
this.tonight = Optional.of(tonight);
return this;
}
public ApplyUpdatesRequestBuilder tonight(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Tonight> tonight) {
public ApplyUpdatesRequestBuilder tonight(Optional<? extends Tonight> tonight) {
Utils.checkNotNull(tonight, "tonight");
this.tonight = tonight;
return this;
}
public ApplyUpdatesRequestBuilder skip(dev.plexapi.sdk.models.operations.Skip skip) {
public ApplyUpdatesRequestBuilder skip(Skip skip) {
Utils.checkNotNull(skip, "skip");
this.skip = Optional.of(skip);
return this;
}
public ApplyUpdatesRequestBuilder skip(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Skip> skip) {
public ApplyUpdatesRequestBuilder skip(Optional<? extends Skip> skip) {
Utils.checkNotNull(skip, "skip");
this.skip = skip;
return this;

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public enum AutoSelectSubtitle {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private AutoSelectSubtitle(String value) {
private AutoSelectSubtitle(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -16,7 +16,7 @@ public class CancelServerActivitiesRequestBuilder {
this.sdk = sdk;
}
public CancelServerActivitiesRequestBuilder activityUUID(java.lang.String activityUUID) {
public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) {
Utils.checkNotNull(activityUUID, "activityUUID");
this.activityUUID = activityUUID;
return this;

View File

@@ -16,13 +16,13 @@ public class CheckForUpdatesRequestBuilder {
this.sdk = sdk;
}
public CheckForUpdatesRequestBuilder download(dev.plexapi.sdk.models.operations.Download download) {
public CheckForUpdatesRequestBuilder download(Download download) {
Utils.checkNotNull(download, "download");
this.download = Optional.of(download);
return this;
}
public CheckForUpdatesRequestBuilder download(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Download> download) {
public CheckForUpdatesRequestBuilder download(Optional<? extends Download> download) {
Utils.checkNotNull(download, "download");
this.download = download;
return this;

View File

@@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -18,32 +18,53 @@ import java.util.Objects;
public class Connections {
/**
* The protocol used for the connection (http, https, etc)
*/
@JsonProperty("protocol")
private String protocol;
private Protocol protocol;
/**
* The (ip) address or domain name used for the connection
*/
@JsonProperty("address")
private String address;
/**
* The port used for the connection
*/
@JsonProperty("port")
private double port;
private int port;
/**
* The full URI of the connection
*/
@JsonProperty("uri")
private String uri;
/**
* If the connection is local address
*/
@JsonProperty("local")
private boolean local;
/**
* If the connection is relayed through plex.direct
*/
@JsonProperty("relay")
private boolean relay;
/**
* If the connection is using IPv6
*/
@JsonProperty("IPv6")
private boolean iPv6;
@JsonCreator
public Connections(
@JsonProperty("protocol") String protocol,
@JsonProperty("protocol") Protocol protocol,
@JsonProperty("address") String address,
@JsonProperty("port") double port,
@JsonProperty("port") int port,
@JsonProperty("uri") String uri,
@JsonProperty("local") boolean local,
@JsonProperty("relay") boolean relay,
@@ -64,36 +85,57 @@ public class Connections {
this.iPv6 = iPv6;
}
/**
* The protocol used for the connection (http, https, etc)
*/
@JsonIgnore
public String protocol() {
public Protocol protocol() {
return protocol;
}
/**
* The (ip) address or domain name used for the connection
*/
@JsonIgnore
public String address() {
return address;
}
/**
* The port used for the connection
*/
@JsonIgnore
public double port() {
public int port() {
return port;
}
/**
* The full URI of the connection
*/
@JsonIgnore
public String uri() {
return uri;
}
/**
* If the connection is local address
*/
@JsonIgnore
public boolean local() {
return local;
}
/**
* If the connection is relayed through plex.direct
*/
@JsonIgnore
public boolean relay() {
return relay;
}
/**
* If the connection is using IPv6
*/
@JsonIgnore
public boolean iPv6() {
return iPv6;
@@ -103,42 +145,63 @@ public class Connections {
return new Builder();
}
public Connections withProtocol(String protocol) {
/**
* The protocol used for the connection (http, https, etc)
*/
public Connections withProtocol(Protocol protocol) {
Utils.checkNotNull(protocol, "protocol");
this.protocol = protocol;
return this;
}
/**
* The (ip) address or domain name used for the connection
*/
public Connections withAddress(String address) {
Utils.checkNotNull(address, "address");
this.address = address;
return this;
}
public Connections withPort(double port) {
/**
* The port used for the connection
*/
public Connections withPort(int port) {
Utils.checkNotNull(port, "port");
this.port = port;
return this;
}
/**
* The full URI of the connection
*/
public Connections withUri(String uri) {
Utils.checkNotNull(uri, "uri");
this.uri = uri;
return this;
}
/**
* If the connection is local address
*/
public Connections withLocal(boolean local) {
Utils.checkNotNull(local, "local");
this.local = local;
return this;
}
/**
* If the connection is relayed through plex.direct
*/
public Connections withRelay(boolean relay) {
Utils.checkNotNull(relay, "relay");
this.relay = relay;
return this;
}
/**
* If the connection is using IPv6
*/
public Connections withIPv6(boolean iPv6) {
Utils.checkNotNull(iPv6, "iPv6");
this.iPv6 = iPv6;
@@ -190,11 +253,11 @@ public class Connections {
public final static class Builder {
private String protocol;
private Protocol protocol;
private String address;
private Double port;
private Integer port;
private String uri;
@@ -208,42 +271,63 @@ public class Connections {
// force use of static builder() method
}
public Builder protocol(String protocol) {
/**
* The protocol used for the connection (http, https, etc)
*/
public Builder protocol(Protocol protocol) {
Utils.checkNotNull(protocol, "protocol");
this.protocol = protocol;
return this;
}
/**
* The (ip) address or domain name used for the connection
*/
public Builder address(String address) {
Utils.checkNotNull(address, "address");
this.address = address;
return this;
}
public Builder port(double port) {
/**
* The port used for the connection
*/
public Builder port(int port) {
Utils.checkNotNull(port, "port");
this.port = port;
return this;
}
/**
* The full URI of the connection
*/
public Builder uri(String uri) {
Utils.checkNotNull(uri, "uri");
this.uri = uri;
return this;
}
/**
* If the connection is local address
*/
public Builder local(boolean local) {
Utils.checkNotNull(local, "local");
this.local = local;
return this;
}
/**
* If the connection is relayed through plex.direct
*/
public Builder relay(boolean relay) {
Utils.checkNotNull(relay, "relay");
this.relay = relay;
return this;
}
/**
* If the connection is using IPv6
*/
public Builder iPv6(boolean iPv6) {
Utils.checkNotNull(iPv6, "iPv6");
this.iPv6 = iPv6;

View File

@@ -15,7 +15,7 @@ public class CreatePlaylistRequestBuilder {
this.sdk = sdk;
}
public CreatePlaylistRequestBuilder request(dev.plexapi.sdk.models.operations.CreatePlaylistRequest request) {
public CreatePlaylistRequestBuilder request(CreatePlaylistRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* DefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
* DefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
*/
public enum DefaultSubtitleAccessibility {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private DefaultSubtitleAccessibility(String value) {
private DefaultSubtitleAccessibility(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* DefaultSubtitleForced - The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public enum DefaultSubtitleForced {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private DefaultSubtitleForced(String value) {
private DefaultSubtitleForced(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -7,8 +7,6 @@ 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;
@@ -16,130 +14,107 @@ 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 {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("allowSync")
private Optional<Boolean> allowSync;
private boolean allowSync;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("art")
private Optional<String> art;
private String art;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("composite")
private Optional<String> composite;
private String composite;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("filters")
private Optional<Boolean> filters;
private boolean filters;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("refreshing")
private Optional<Boolean> refreshing;
private boolean refreshing;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
private Optional<String> thumb;
private String thumb;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("key")
private Optional<String> key;
private String key;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("type")
private Optional<String> type;
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("title")
private Optional<String> title;
private String title;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("agent")
private Optional<String> agent;
private String agent;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("scanner")
private Optional<String> scanner;
private String scanner;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("language")
private Optional<String> language;
private String language;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("uuid")
private Optional<String> uuid;
private String uuid;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("updatedAt")
private Optional<Long> updatedAt;
private long updatedAt;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("createdAt")
private Optional<Long> createdAt;
private long createdAt;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("scannedAt")
private Optional<Long> scannedAt;
private long scannedAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("content")
private Optional<Boolean> content;
private boolean content;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("directory")
private Optional<Boolean> directory;
private boolean directory;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("contentChangedAt")
private Optional<Integer> contentChangedAt;
private int contentChangedAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hidden")
private Optional<Integer> hidden;
private int hidden;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Location")
private Optional<? extends List<Location>> location;
private List<Location> location;
@JsonCreator
public GetAllLibrariesDirectory(
@JsonProperty("allowSync") Optional<Boolean> allowSync,
@JsonProperty("art") Optional<String> art,
@JsonProperty("composite") Optional<String> composite,
@JsonProperty("filters") Optional<Boolean> filters,
@JsonProperty("refreshing") Optional<Boolean> refreshing,
@JsonProperty("thumb") Optional<String> thumb,
@JsonProperty("key") Optional<String> key,
@JsonProperty("type") Optional<String> type,
@JsonProperty("title") Optional<String> title,
@JsonProperty("agent") Optional<String> agent,
@JsonProperty("scanner") Optional<String> scanner,
@JsonProperty("language") Optional<String> language,
@JsonProperty("uuid") Optional<String> uuid,
@JsonProperty("updatedAt") Optional<Long> updatedAt,
@JsonProperty("createdAt") Optional<Long> createdAt,
@JsonProperty("scannedAt") Optional<Long> scannedAt,
@JsonProperty("content") Optional<Boolean> content,
@JsonProperty("directory") Optional<Boolean> directory,
@JsonProperty("contentChangedAt") Optional<Integer> contentChangedAt,
@JsonProperty("hidden") Optional<Integer> hidden,
@JsonProperty("Location") Optional<? extends List<Location>> location) {
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("composite") String composite,
@JsonProperty("filters") boolean filters,
@JsonProperty("refreshing") boolean refreshing,
@JsonProperty("thumb") String thumb,
@JsonProperty("key") String key,
@JsonProperty("type") String 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("scannedAt") long scannedAt,
@JsonProperty("content") boolean content,
@JsonProperty("directory") boolean directory,
@JsonProperty("contentChangedAt") int contentChangedAt,
@JsonProperty("hidden") int hidden,
@JsonProperty("Location") List<Location> location) {
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(art, "art");
Utils.checkNotNull(composite, "composite");
@@ -183,124 +158,119 @@ public class GetAllLibrariesDirectory {
this.hidden = hidden;
this.location = location;
}
public GetAllLibrariesDirectory() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Boolean> allowSync() {
public boolean allowSync() {
return allowSync;
}
@JsonIgnore
public Optional<String> art() {
public String art() {
return art;
}
@JsonIgnore
public Optional<String> composite() {
public String composite() {
return composite;
}
@JsonIgnore
public Optional<Boolean> filters() {
public boolean filters() {
return filters;
}
@JsonIgnore
public Optional<Boolean> refreshing() {
public boolean refreshing() {
return refreshing;
}
@JsonIgnore
public Optional<String> thumb() {
public String thumb() {
return thumb;
}
@JsonIgnore
public Optional<String> key() {
public String key() {
return key;
}
@JsonIgnore
public Optional<String> type() {
public String type() {
return type;
}
@JsonIgnore
public Optional<String> title() {
public String title() {
return title;
}
@JsonIgnore
public Optional<String> agent() {
public String agent() {
return agent;
}
@JsonIgnore
public Optional<String> scanner() {
public String scanner() {
return scanner;
}
@JsonIgnore
public Optional<String> language() {
public String language() {
return language;
}
@JsonIgnore
public Optional<String> uuid() {
public String uuid() {
return uuid;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public Optional<Long> updatedAt() {
public long updatedAt() {
return updatedAt;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public Optional<Long> createdAt() {
public long createdAt() {
return createdAt;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public Optional<Long> scannedAt() {
public long scannedAt() {
return scannedAt;
}
@JsonIgnore
public Optional<Boolean> content() {
public boolean content() {
return content;
}
@JsonIgnore
public Optional<Boolean> directory() {
public boolean directory() {
return directory;
}
@JsonIgnore
public Optional<Integer> contentChangedAt() {
public int contentChangedAt() {
return contentChangedAt;
}
@JsonIgnore
public Optional<Integer> hidden() {
public int hidden() {
return hidden;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Location>> location() {
return (Optional<List<Location>>) location;
public List<Location> location() {
return location;
}
public final static Builder builder() {
@@ -308,270 +278,135 @@ public class GetAllLibrariesDirectory {
}
public GetAllLibrariesDirectory withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public GetAllLibrariesDirectory withAllowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public GetAllLibrariesDirectory withArt(String art) {
Utils.checkNotNull(art, "art");
this.art = Optional.ofNullable(art);
return this;
}
public GetAllLibrariesDirectory withArt(Optional<String> art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
public GetAllLibrariesDirectory withComposite(String composite) {
Utils.checkNotNull(composite, "composite");
this.composite = Optional.ofNullable(composite);
return this;
}
public GetAllLibrariesDirectory withComposite(Optional<String> composite) {
Utils.checkNotNull(composite, "composite");
this.composite = composite;
return this;
}
public GetAllLibrariesDirectory withFilters(boolean filters) {
Utils.checkNotNull(filters, "filters");
this.filters = Optional.ofNullable(filters);
return this;
}
public GetAllLibrariesDirectory withFilters(Optional<Boolean> filters) {
Utils.checkNotNull(filters, "filters");
this.filters = filters;
return this;
}
public GetAllLibrariesDirectory withRefreshing(boolean refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = Optional.ofNullable(refreshing);
return this;
}
public GetAllLibrariesDirectory withRefreshing(Optional<Boolean> refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = refreshing;
return this;
}
public GetAllLibrariesDirectory withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
public GetAllLibrariesDirectory withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public GetAllLibrariesDirectory withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public GetAllLibrariesDirectory withKey(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllLibrariesDirectory withType(String type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public GetAllLibrariesDirectory withType(Optional<String> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllLibrariesDirectory withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = Optional.ofNullable(title);
return this;
}
public GetAllLibrariesDirectory withTitle(Optional<String> title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllLibrariesDirectory withAgent(String agent) {
Utils.checkNotNull(agent, "agent");
this.agent = Optional.ofNullable(agent);
return this;
}
public GetAllLibrariesDirectory withAgent(Optional<String> agent) {
Utils.checkNotNull(agent, "agent");
this.agent = agent;
return this;
}
public GetAllLibrariesDirectory withScanner(String scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = Optional.ofNullable(scanner);
return this;
}
public GetAllLibrariesDirectory withScanner(Optional<String> scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = scanner;
return this;
}
public GetAllLibrariesDirectory withLanguage(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
public GetAllLibrariesDirectory withLanguage(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
}
public GetAllLibrariesDirectory withUuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = Optional.ofNullable(uuid);
return this;
}
public GetAllLibrariesDirectory withUuid(Optional<String> uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetAllLibrariesDirectory withUpdatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = Optional.ofNullable(updatedAt);
return this;
}
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withUpdatedAt(Optional<Long> updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetAllLibrariesDirectory withCreatedAt(long createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = Optional.ofNullable(createdAt);
return this;
}
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withCreatedAt(Optional<Long> createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = createdAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetAllLibrariesDirectory withScannedAt(long scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = Optional.ofNullable(scannedAt);
return this;
}
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withScannedAt(Optional<Long> scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = scannedAt;
return this;
}
public GetAllLibrariesDirectory withContent(boolean content) {
Utils.checkNotNull(content, "content");
this.content = Optional.ofNullable(content);
return this;
}
public GetAllLibrariesDirectory withContent(Optional<Boolean> content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
public GetAllLibrariesDirectory withDirectory(boolean directory) {
Utils.checkNotNull(directory, "directory");
this.directory = Optional.ofNullable(directory);
return this;
}
public GetAllLibrariesDirectory withDirectory(Optional<Boolean> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = directory;
return this;
}
public GetAllLibrariesDirectory withContentChangedAt(int contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = Optional.ofNullable(contentChangedAt);
return this;
}
public GetAllLibrariesDirectory withContentChangedAt(Optional<Integer> contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = contentChangedAt;
return this;
}
public GetAllLibrariesDirectory withHidden(int hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = Optional.ofNullable(hidden);
return this;
}
public GetAllLibrariesDirectory withHidden(Optional<Integer> hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = hidden;
return this;
}
public GetAllLibrariesDirectory withLocation(List<Location> location) {
Utils.checkNotNull(location, "location");
this.location = Optional.ofNullable(location);
return this;
}
public GetAllLibrariesDirectory withLocation(Optional<? extends List<Location>> location) {
Utils.checkNotNull(location, "location");
this.location = location;
return this;
@@ -664,317 +499,182 @@ public class GetAllLibrariesDirectory {
public final static class Builder {
private Optional<Boolean> allowSync = Optional.empty();
private Boolean allowSync;
private Optional<String> art = Optional.empty();
private String art;
private Optional<String> composite = Optional.empty();
private String composite;
private Optional<Boolean> filters = Optional.empty();
private Boolean filters;
private Optional<Boolean> refreshing = Optional.empty();
private Boolean refreshing;
private Optional<String> thumb = Optional.empty();
private String thumb;
private Optional<String> key = Optional.empty();
private String key;
private Optional<String> type = Optional.empty();
private String type;
private Optional<String> title = Optional.empty();
private String title;
private Optional<String> agent = Optional.empty();
private String agent;
private Optional<String> scanner = Optional.empty();
private String scanner;
private Optional<String> language = Optional.empty();
private String language;
private Optional<String> uuid = Optional.empty();
private String uuid;
private Optional<Long> updatedAt = Optional.empty();
private Long updatedAt;
private Optional<Long> createdAt = Optional.empty();
private Long createdAt;
private Optional<Long> scannedAt = Optional.empty();
private Long scannedAt;
private Optional<Boolean> content = Optional.empty();
private Boolean content;
private Optional<Boolean> directory = Optional.empty();
private Boolean directory;
private Optional<Integer> contentChangedAt = Optional.empty();
private Integer contentChangedAt;
private Optional<Integer> hidden = Optional.empty();
private Integer hidden;
private Optional<? extends List<Location>> location = Optional.empty();
private List<Location> location;
private Builder() {
// force use of static builder() method
}
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public Builder allowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public Builder art(String art) {
Utils.checkNotNull(art, "art");
this.art = Optional.ofNullable(art);
return this;
}
public Builder art(Optional<String> art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
public Builder composite(String composite) {
Utils.checkNotNull(composite, "composite");
this.composite = Optional.ofNullable(composite);
return this;
}
public Builder composite(Optional<String> composite) {
Utils.checkNotNull(composite, "composite");
this.composite = composite;
return this;
}
public Builder filters(boolean filters) {
Utils.checkNotNull(filters, "filters");
this.filters = Optional.ofNullable(filters);
return this;
}
public Builder filters(Optional<Boolean> filters) {
Utils.checkNotNull(filters, "filters");
this.filters = filters;
return this;
}
public Builder refreshing(boolean refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = Optional.ofNullable(refreshing);
return this;
}
public Builder refreshing(Optional<Boolean> refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = refreshing;
return this;
}
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public Builder key(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public Builder type(Optional<String> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = Optional.ofNullable(title);
return this;
}
public Builder title(Optional<String> title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public Builder agent(String agent) {
Utils.checkNotNull(agent, "agent");
this.agent = Optional.ofNullable(agent);
return this;
}
public Builder agent(Optional<String> agent) {
Utils.checkNotNull(agent, "agent");
this.agent = agent;
return this;
}
public Builder scanner(String scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = Optional.ofNullable(scanner);
return this;
}
public Builder scanner(Optional<String> scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = scanner;
return this;
}
public Builder language(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
public Builder language(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
}
public Builder uuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = Optional.ofNullable(uuid);
return this;
}
public Builder uuid(Optional<String> uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder updatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = Optional.ofNullable(updatedAt);
return this;
}
/**
* Unix epoch datetime
*/
public Builder updatedAt(Optional<Long> updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder createdAt(long createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = Optional.ofNullable(createdAt);
return this;
}
/**
* Unix epoch datetime
*/
public Builder createdAt(Optional<Long> createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = createdAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder scannedAt(long scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = Optional.ofNullable(scannedAt);
return this;
}
/**
* Unix epoch datetime
*/
public Builder scannedAt(Optional<Long> scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = scannedAt;
return this;
}
public Builder content(boolean content) {
Utils.checkNotNull(content, "content");
this.content = Optional.ofNullable(content);
return this;
}
public Builder content(Optional<Boolean> content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
public Builder directory(boolean directory) {
Utils.checkNotNull(directory, "directory");
this.directory = Optional.ofNullable(directory);
return this;
}
public Builder directory(Optional<Boolean> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = directory;
return this;
}
public Builder contentChangedAt(int contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = Optional.ofNullable(contentChangedAt);
return this;
}
public Builder contentChangedAt(Optional<Integer> contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = contentChangedAt;
return this;
}
public Builder hidden(int hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = Optional.ofNullable(hidden);
return this;
}
public Builder hidden(Optional<Integer> hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = hidden;
return this;
}
public Builder location(List<Location> location) {
Utils.checkNotNull(location, "location");
this.location = Optional.ofNullable(location);
return this;
}
public Builder location(Optional<? extends List<Location>> location) {
Utils.checkNotNull(location, "location");
this.location = location;
return this;

View File

@@ -7,18 +7,14 @@ 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 {
@@ -32,16 +28,15 @@ public class GetAllLibrariesMediaContainer {
@JsonProperty("title1")
private String title1;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Directory")
private Optional<? extends List<GetAllLibrariesDirectory>> directory;
private List<GetAllLibrariesDirectory> directory;
@JsonCreator
public GetAllLibrariesMediaContainer(
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("title1") String title1,
@JsonProperty("Directory") Optional<? extends List<GetAllLibrariesDirectory>> directory) {
@JsonProperty("Directory") List<GetAllLibrariesDirectory> directory) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(title1, "title1");
@@ -51,13 +46,6 @@ public class GetAllLibrariesMediaContainer {
this.title1 = title1;
this.directory = directory;
}
public GetAllLibrariesMediaContainer(
int size,
boolean allowSync,
String title1) {
this(size, allowSync, title1, Optional.empty());
}
@JsonIgnore
public int size() {
@@ -74,10 +62,9 @@ public class GetAllLibrariesMediaContainer {
return title1;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllLibrariesDirectory>> directory() {
return (Optional<List<GetAllLibrariesDirectory>>) directory;
public List<GetAllLibrariesDirectory> directory() {
return directory;
}
public final static Builder builder() {
@@ -103,12 +90,6 @@ 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;
@@ -156,7 +137,7 @@ public class GetAllLibrariesMediaContainer {
private String title1;
private Optional<? extends List<GetAllLibrariesDirectory>> directory = Optional.empty();
private List<GetAllLibrariesDirectory> directory;
private Builder() {
// force use of static builder() method
@@ -181,12 +162,6 @@ 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;

View File

@@ -7,15 +7,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.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllLibrariesResponseBody - The libraries available on the Server
@@ -23,25 +19,19 @@ import java.util.Optional;
public class GetAllLibrariesResponseBody {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("MediaContainer")
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer;
private GetAllLibrariesMediaContainer mediaContainer;
@JsonCreator
public GetAllLibrariesResponseBody(
@JsonProperty("MediaContainer") Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
@JsonProperty("MediaContainer") GetAllLibrariesMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
}
public GetAllLibrariesResponseBody() {
this(Optional.empty());
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllLibrariesMediaContainer> mediaContainer() {
return (Optional<GetAllLibrariesMediaContainer>) mediaContainer;
public GetAllLibrariesMediaContainer mediaContainer() {
return mediaContainer;
}
public final static Builder builder() {
@@ -49,12 +39,6 @@ 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;
@@ -87,19 +71,13 @@ public class GetAllLibrariesResponseBody {
public final static class Builder {
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer = Optional.empty();
private GetAllLibrariesMediaContainer mediaContainer;
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;

View File

@@ -23,7 +23,7 @@ public class GetBandwidthStatisticsRequestBuilder {
return this;
}
public GetBandwidthStatisticsRequestBuilder timespan(java.util.Optional<java.lang.Long> timespan) {
public GetBandwidthStatisticsRequestBuilder timespan(Optional<Long> timespan) {
Utils.checkNotNull(timespan, "timespan");
this.timespan = timespan;
return this;

View File

@@ -15,7 +15,7 @@ public class GetBannerImageRequestBuilder {
this.sdk = sdk;
}
public GetBannerImageRequestBuilder request(dev.plexapi.sdk.models.operations.GetBannerImageRequest request) {
public GetBannerImageRequestBuilder request(GetBannerImageRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -17,13 +17,13 @@ public class GetCompanionsDataRequestBuilder {
this.sdk = sdk;
}
public GetCompanionsDataRequestBuilder serverURL(java.lang.String serverURL) {
public GetCompanionsDataRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetCompanionsDataRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetCompanionsDataRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;

View File

@@ -19,7 +19,7 @@ public class GetFileHashRequestBuilder {
this.sdk = sdk;
}
public GetFileHashRequestBuilder url(java.lang.String url) {
public GetFileHashRequestBuilder url(String url) {
Utils.checkNotNull(url, "url");
this.url = url;
return this;
@@ -31,7 +31,7 @@ public class GetFileHashRequestBuilder {
return this;
}
public GetFileHashRequestBuilder type(java.util.Optional<java.lang.Double> type) {
public GetFileHashRequestBuilder type(Optional<Double> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;

View File

@@ -17,13 +17,13 @@ public class GetGeoDataRequestBuilder {
this.sdk = sdk;
}
public GetGeoDataRequestBuilder serverURL(java.lang.String serverURL) {
public GetGeoDataRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetGeoDataRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetGeoDataRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;

View File

@@ -24,19 +24,19 @@ public class GetGlobalHubsRequestBuilder {
return this;
}
public GetGlobalHubsRequestBuilder count(java.util.Optional<java.lang.Double> count) {
public GetGlobalHubsRequestBuilder count(Optional<Double> count) {
Utils.checkNotNull(count, "count");
this.count = count;
return this;
}
public GetGlobalHubsRequestBuilder onlyTransient(dev.plexapi.sdk.models.operations.OnlyTransient onlyTransient) {
public GetGlobalHubsRequestBuilder onlyTransient(OnlyTransient onlyTransient) {
Utils.checkNotNull(onlyTransient, "onlyTransient");
this.onlyTransient = Optional.of(onlyTransient);
return this;
}
public GetGlobalHubsRequestBuilder onlyTransient(java.util.Optional<? extends dev.plexapi.sdk.models.operations.OnlyTransient> onlyTransient) {
public GetGlobalHubsRequestBuilder onlyTransient(Optional<? extends OnlyTransient> onlyTransient) {
Utils.checkNotNull(onlyTransient, "onlyTransient");
this.onlyTransient = onlyTransient;
return this;

View File

@@ -29,13 +29,13 @@ public class GetLibraryDetailsRequestBuilder {
return this;
}
public GetLibraryDetailsRequestBuilder includeDetails(dev.plexapi.sdk.models.operations.IncludeDetails includeDetails) {
public GetLibraryDetailsRequestBuilder includeDetails(IncludeDetails includeDetails) {
Utils.checkNotNull(includeDetails, "includeDetails");
this.includeDetails = Optional.of(includeDetails);
return this;
}
public GetLibraryDetailsRequestBuilder includeDetails(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeDetails> includeDetails) {
public GetLibraryDetailsRequestBuilder includeDetails(Optional<? extends IncludeDetails> includeDetails) {
Utils.checkNotNull(includeDetails, "includeDetails");
this.includeDetails = includeDetails;
return this;

View File

@@ -31,19 +31,19 @@ public class GetLibraryHubsRequestBuilder {
return this;
}
public GetLibraryHubsRequestBuilder count(java.util.Optional<java.lang.Double> count) {
public GetLibraryHubsRequestBuilder count(Optional<Double> count) {
Utils.checkNotNull(count, "count");
this.count = count;
return this;
}
public GetLibraryHubsRequestBuilder onlyTransient(dev.plexapi.sdk.models.operations.QueryParamOnlyTransient onlyTransient) {
public GetLibraryHubsRequestBuilder onlyTransient(QueryParamOnlyTransient onlyTransient) {
Utils.checkNotNull(onlyTransient, "onlyTransient");
this.onlyTransient = Optional.of(onlyTransient);
return this;
}
public GetLibraryHubsRequestBuilder onlyTransient(java.util.Optional<? extends dev.plexapi.sdk.models.operations.QueryParamOnlyTransient> onlyTransient) {
public GetLibraryHubsRequestBuilder onlyTransient(Optional<? extends QueryParamOnlyTransient> onlyTransient) {
Utils.checkNotNull(onlyTransient, "onlyTransient");
this.onlyTransient = onlyTransient;
return this;

View File

@@ -0,0 +1,199 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetLibraryItemsField {
@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 GetLibraryItemsField(
@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 GetLibraryItemsField(
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 GetLibraryItemsField withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetLibraryItemsField withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetLibraryItemsField withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetLibraryItemsField withSubType(String subType) {
Utils.checkNotNull(subType, "subType");
this.subType = Optional.ofNullable(subType);
return this;
}
public GetLibraryItemsField 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;
}
GetLibraryItemsField other = (GetLibraryItemsField) 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(GetLibraryItemsField.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 GetLibraryItemsField build() {
return new GetLibraryItemsField(
key,
title,
type,
subType);
}
}
}

View File

@@ -0,0 +1,119 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.List;
import java.util.Objects;
public class GetLibraryItemsFieldType {
@JsonProperty("type")
private String type;
@JsonProperty("Operator")
private List<GetLibraryItemsOperator> operator;
@JsonCreator
public GetLibraryItemsFieldType(
@JsonProperty("type") String type,
@JsonProperty("Operator") List<GetLibraryItemsOperator> operator) {
Utils.checkNotNull(type, "type");
Utils.checkNotNull(operator, "operator");
this.type = type;
this.operator = operator;
}
@JsonIgnore
public String type() {
return type;
}
@JsonIgnore
public List<GetLibraryItemsOperator> operator() {
return operator;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryItemsFieldType withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetLibraryItemsFieldType withOperator(List<GetLibraryItemsOperator> 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;
}
GetLibraryItemsFieldType other = (GetLibraryItemsFieldType) 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(GetLibraryItemsFieldType.class,
"type", type,
"operator", operator);
}
public final static class Builder {
private String type;
private List<GetLibraryItemsOperator> 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<GetLibraryItemsOperator> operator) {
Utils.checkNotNull(operator, "operator");
this.operator = operator;
return this;
}
public GetLibraryItemsFieldType build() {
return new GetLibraryItemsFieldType(
type,
operator);
}
}
}

View File

@@ -0,0 +1,205 @@
/*
* 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 GetLibraryItemsFilter {
@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 GetLibraryItemsFilter(
@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 GetLibraryItemsFilter withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
public GetLibraryItemsFilter withFilterType(String filterType) {
Utils.checkNotNull(filterType, "filterType");
this.filterType = filterType;
return this;
}
public GetLibraryItemsFilter withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetLibraryItemsFilter withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetLibraryItemsFilter 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;
}
GetLibraryItemsFilter other = (GetLibraryItemsFilter) 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(GetLibraryItemsFilter.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 GetLibraryItemsFilter build() {
return new GetLibraryItemsFilter(
filter,
filterType,
key,
title,
type);
}
}
}

View File

@@ -23,57 +23,44 @@ import java.util.Optional;
public class GetLibraryItemsMediaContainer {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("size")
private Optional<Integer> size;
private int size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("allowSync")
private Optional<Boolean> allowSync;
private boolean allowSync;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("art")
private Optional<String> art;
private String art;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("identifier")
private Optional<String> identifier;
private String identifier;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("librarySectionID")
private Optional<? extends LibrarySectionID> librarySectionID;
private LibrarySectionID librarySectionID;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("librarySectionTitle")
private Optional<String> librarySectionTitle;
private String librarySectionTitle;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("librarySectionUUID")
private Optional<String> librarySectionUUID;
private String librarySectionUUID;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("mediaTagPrefix")
private Optional<String> mediaTagPrefix;
private String mediaTagPrefix;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("mediaTagVersion")
private Optional<Integer> mediaTagVersion;
private int mediaTagVersion;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
private Optional<String> thumb;
private String thumb;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("title1")
private Optional<String> title1;
private String title1;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("title2")
private Optional<String> title2;
private String title2;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("viewGroup")
private Optional<String> viewGroup;
private String viewGroup;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("viewMode")
@@ -87,24 +74,33 @@ public class GetLibraryItemsMediaContainer {
@JsonProperty("Metadata")
private Optional<? extends List<GetLibraryItemsMetadata>> metadata;
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Meta")
private Optional<? extends Meta> meta;
@JsonCreator
public GetLibraryItemsMediaContainer(
@JsonProperty("size") Optional<Integer> size,
@JsonProperty("allowSync") Optional<Boolean> allowSync,
@JsonProperty("art") Optional<String> art,
@JsonProperty("identifier") Optional<String> identifier,
@JsonProperty("librarySectionID") Optional<? extends LibrarySectionID> librarySectionID,
@JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
@JsonProperty("librarySectionUUID") Optional<String> librarySectionUUID,
@JsonProperty("mediaTagPrefix") Optional<String> mediaTagPrefix,
@JsonProperty("mediaTagVersion") Optional<Integer> mediaTagVersion,
@JsonProperty("thumb") Optional<String> thumb,
@JsonProperty("title1") Optional<String> title1,
@JsonProperty("title2") Optional<String> title2,
@JsonProperty("viewGroup") Optional<String> viewGroup,
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("identifier") String identifier,
@JsonProperty("librarySectionID") LibrarySectionID librarySectionID,
@JsonProperty("librarySectionTitle") String librarySectionTitle,
@JsonProperty("librarySectionUUID") String librarySectionUUID,
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
@JsonProperty("mediaTagVersion") int mediaTagVersion,
@JsonProperty("thumb") String thumb,
@JsonProperty("title1") String title1,
@JsonProperty("title2") String title2,
@JsonProperty("viewGroup") String viewGroup,
@JsonProperty("viewMode") Optional<Integer> viewMode,
@JsonProperty("mixedParents") Optional<Boolean> mixedParents,
@JsonProperty("Metadata") Optional<? extends List<GetLibraryItemsMetadata>> metadata) {
@JsonProperty("Metadata") Optional<? extends List<GetLibraryItemsMetadata>> metadata,
@JsonProperty("Meta") Optional<? extends Meta> meta) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(art, "art");
@@ -121,6 +117,7 @@ public class GetLibraryItemsMediaContainer {
Utils.checkNotNull(viewMode, "viewMode");
Utils.checkNotNull(mixedParents, "mixedParents");
Utils.checkNotNull(metadata, "metadata");
Utils.checkNotNull(meta, "meta");
this.size = size;
this.allowSync = allowSync;
this.art = art;
@@ -137,75 +134,88 @@ public class GetLibraryItemsMediaContainer {
this.viewMode = viewMode;
this.mixedParents = mixedParents;
this.metadata = metadata;
this.meta = meta;
}
public GetLibraryItemsMediaContainer() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
public GetLibraryItemsMediaContainer(
int size,
boolean allowSync,
String art,
String identifier,
LibrarySectionID librarySectionID,
String librarySectionTitle,
String librarySectionUUID,
String mediaTagPrefix,
int mediaTagVersion,
String thumb,
String title1,
String title2,
String viewGroup) {
this(size, allowSync, art, identifier, librarySectionID, librarySectionTitle, librarySectionUUID, mediaTagPrefix, mediaTagVersion, thumb, title1, title2, viewGroup, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> size() {
public int size() {
return size;
}
@JsonIgnore
public Optional<Boolean> allowSync() {
public boolean allowSync() {
return allowSync;
}
@JsonIgnore
public Optional<String> art() {
public String art() {
return art;
}
@JsonIgnore
public Optional<String> identifier() {
public String identifier() {
return identifier;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<LibrarySectionID> librarySectionID() {
return (Optional<LibrarySectionID>) librarySectionID;
public LibrarySectionID librarySectionID() {
return librarySectionID;
}
@JsonIgnore
public Optional<String> librarySectionTitle() {
public String librarySectionTitle() {
return librarySectionTitle;
}
@JsonIgnore
public Optional<String> librarySectionUUID() {
public String librarySectionUUID() {
return librarySectionUUID;
}
@JsonIgnore
public Optional<String> mediaTagPrefix() {
public String mediaTagPrefix() {
return mediaTagPrefix;
}
@JsonIgnore
public Optional<Integer> mediaTagVersion() {
public int mediaTagVersion() {
return mediaTagVersion;
}
@JsonIgnore
public Optional<String> thumb() {
public String thumb() {
return thumb;
}
@JsonIgnore
public Optional<String> title1() {
public String title1() {
return title1;
}
@JsonIgnore
public Optional<String> title2() {
public String title2() {
return title2;
}
@JsonIgnore
public Optional<String> viewGroup() {
public String viewGroup() {
return viewGroup;
}
@@ -225,161 +235,93 @@ public class GetLibraryItemsMediaContainer {
return (Optional<List<GetLibraryItemsMetadata>>) metadata;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<Meta> meta() {
return (Optional<Meta>) meta;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryItemsMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = Optional.ofNullable(size);
return this;
}
public GetLibraryItemsMediaContainer withSize(Optional<Integer> size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetLibraryItemsMediaContainer withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public GetLibraryItemsMediaContainer withAllowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public GetLibraryItemsMediaContainer withArt(String art) {
Utils.checkNotNull(art, "art");
this.art = Optional.ofNullable(art);
return this;
}
public GetLibraryItemsMediaContainer withArt(Optional<String> art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
public GetLibraryItemsMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = Optional.ofNullable(identifier);
return this;
}
public GetLibraryItemsMediaContainer withIdentifier(Optional<String> identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
public GetLibraryItemsMediaContainer withLibrarySectionID(LibrarySectionID librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = Optional.ofNullable(librarySectionID);
return this;
}
public GetLibraryItemsMediaContainer withLibrarySectionID(Optional<? extends LibrarySectionID> librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = librarySectionID;
return this;
}
public GetLibraryItemsMediaContainer withLibrarySectionTitle(String librarySectionTitle) {
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
return this;
}
public GetLibraryItemsMediaContainer withLibrarySectionTitle(Optional<String> librarySectionTitle) {
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
this.librarySectionTitle = librarySectionTitle;
return this;
}
public GetLibraryItemsMediaContainer withLibrarySectionUUID(String librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
return this;
}
public GetLibraryItemsMediaContainer withLibrarySectionUUID(Optional<String> librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = librarySectionUUID;
return this;
}
public GetLibraryItemsMediaContainer withMediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix);
return this;
}
public GetLibraryItemsMediaContainer withMediaTagPrefix(Optional<String> mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
public GetLibraryItemsMediaContainer withMediaTagVersion(int mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = Optional.ofNullable(mediaTagVersion);
return this;
}
public GetLibraryItemsMediaContainer withMediaTagVersion(Optional<Integer> mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
public GetLibraryItemsMediaContainer withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
public GetLibraryItemsMediaContainer withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public GetLibraryItemsMediaContainer withTitle1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = Optional.ofNullable(title1);
return this;
}
public GetLibraryItemsMediaContainer withTitle1(Optional<String> title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
public GetLibraryItemsMediaContainer withTitle2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = Optional.ofNullable(title2);
return this;
}
public GetLibraryItemsMediaContainer withTitle2(Optional<String> title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
public GetLibraryItemsMediaContainer withViewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = Optional.ofNullable(viewGroup);
return this;
}
public GetLibraryItemsMediaContainer withViewGroup(Optional<String> viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
return this;
@@ -420,6 +362,26 @@ public class GetLibraryItemsMediaContainer {
this.metadata = metadata;
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public GetLibraryItemsMediaContainer withMeta(Meta meta) {
Utils.checkNotNull(meta, "meta");
this.meta = Optional.ofNullable(meta);
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public GetLibraryItemsMediaContainer withMeta(Optional<? extends Meta> meta) {
Utils.checkNotNull(meta, "meta");
this.meta = meta;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -446,7 +408,8 @@ public class GetLibraryItemsMediaContainer {
Objects.deepEquals(this.viewGroup, other.viewGroup) &&
Objects.deepEquals(this.viewMode, other.viewMode) &&
Objects.deepEquals(this.mixedParents, other.mixedParents) &&
Objects.deepEquals(this.metadata, other.metadata);
Objects.deepEquals(this.metadata, other.metadata) &&
Objects.deepEquals(this.meta, other.meta);
}
@Override
@@ -467,7 +430,8 @@ public class GetLibraryItemsMediaContainer {
viewGroup,
viewMode,
mixedParents,
metadata);
metadata,
meta);
}
@Override
@@ -488,198 +452,123 @@ public class GetLibraryItemsMediaContainer {
"viewGroup", viewGroup,
"viewMode", viewMode,
"mixedParents", mixedParents,
"metadata", metadata);
"metadata", metadata,
"meta", meta);
}
public final static class Builder {
private Optional<Integer> size = Optional.empty();
private Integer size;
private Optional<Boolean> allowSync = Optional.empty();
private Boolean allowSync;
private Optional<String> art = Optional.empty();
private String art;
private Optional<String> identifier = Optional.empty();
private String identifier;
private Optional<? extends LibrarySectionID> librarySectionID = Optional.empty();
private LibrarySectionID librarySectionID;
private Optional<String> librarySectionTitle = Optional.empty();
private String librarySectionTitle;
private Optional<String> librarySectionUUID = Optional.empty();
private String librarySectionUUID;
private Optional<String> mediaTagPrefix = Optional.empty();
private String mediaTagPrefix;
private Optional<Integer> mediaTagVersion = Optional.empty();
private Integer mediaTagVersion;
private Optional<String> thumb = Optional.empty();
private String thumb;
private Optional<String> title1 = Optional.empty();
private String title1;
private Optional<String> title2 = Optional.empty();
private String title2;
private Optional<String> viewGroup = Optional.empty();
private String viewGroup;
private Optional<Integer> viewMode = Optional.empty();
private Optional<Boolean> mixedParents = Optional.empty();
private Optional<? extends List<GetLibraryItemsMetadata>> metadata = Optional.empty();
private Optional<? extends List<GetLibraryItemsMetadata>> metadata = Optional.empty();
private Optional<? extends Meta> meta = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder size(int size) {
Utils.checkNotNull(size, "size");
this.size = Optional.ofNullable(size);
return this;
}
public Builder size(Optional<Integer> size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public Builder allowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public Builder art(String art) {
Utils.checkNotNull(art, "art");
this.art = Optional.ofNullable(art);
return this;
}
public Builder art(Optional<String> art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = Optional.ofNullable(identifier);
return this;
}
public Builder identifier(Optional<String> identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
public Builder librarySectionID(LibrarySectionID librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = Optional.ofNullable(librarySectionID);
return this;
}
public Builder librarySectionID(Optional<? extends LibrarySectionID> librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = librarySectionID;
return this;
}
public Builder librarySectionTitle(String librarySectionTitle) {
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
return this;
}
public Builder librarySectionTitle(Optional<String> librarySectionTitle) {
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
this.librarySectionTitle = librarySectionTitle;
return this;
}
public Builder librarySectionUUID(String librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
return this;
}
public Builder librarySectionUUID(Optional<String> librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = librarySectionUUID;
return this;
}
public Builder mediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix);
return this;
}
public Builder mediaTagPrefix(Optional<String> mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
public Builder mediaTagVersion(int mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = Optional.ofNullable(mediaTagVersion);
return this;
}
public Builder mediaTagVersion(Optional<Integer> mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public Builder title1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = Optional.ofNullable(title1);
return this;
}
public Builder title1(Optional<String> title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
public Builder title2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = Optional.ofNullable(title2);
return this;
}
public Builder title2(Optional<String> title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
public Builder viewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = Optional.ofNullable(viewGroup);
return this;
}
public Builder viewGroup(Optional<String> viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
return this;
@@ -720,6 +609,26 @@ public class GetLibraryItemsMediaContainer {
this.metadata = metadata;
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public Builder meta(Meta meta) {
Utils.checkNotNull(meta, "meta");
this.meta = Optional.ofNullable(meta);
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public Builder meta(Optional<? extends Meta> meta) {
Utils.checkNotNull(meta, "meta");
this.meta = meta;
return this;
}
public GetLibraryItemsMediaContainer build() {
return new GetLibraryItemsMediaContainer(
@@ -738,7 +647,8 @@ public class GetLibraryItemsMediaContainer {
viewGroup,
viewMode,
mixedParents,
metadata);
metadata,
meta);
}
}
}

View File

@@ -24,29 +24,24 @@ import java.util.Optional;
public class GetLibraryItemsMetadata {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("ratingKey")
private Optional<String> ratingKey;
private String ratingKey;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("key")
private Optional<String> key;
private String key;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("guid")
private Optional<String> guid;
private String guid;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("studio")
private Optional<String> studio;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("type")
private Optional<String> type;
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("title")
private Optional<String> title;
private String title;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("contentRating")
@@ -64,9 +59,8 @@ public class GetLibraryItemsMetadata {
@JsonProperty("audienceRating")
private Optional<Double> audienceRating;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("year")
private Optional<Integer> year;
private int year;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("tagline")
@@ -80,9 +74,8 @@ public class GetLibraryItemsMetadata {
@JsonProperty("art")
private Optional<String> art;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("duration")
private Optional<Integer> duration;
private int duration;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("originallyAvailableAt")
@@ -140,9 +133,8 @@ public class GetLibraryItemsMetadata {
@JsonProperty("grandparentTheme")
private Optional<String> grandparentTheme;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Media")
private Optional<? extends List<GetLibraryItemsMedia>> media;
private List<GetLibraryItemsMedia> media;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Genre")
@@ -164,6 +156,14 @@ public class GetLibraryItemsMetadata {
@JsonProperty("Role")
private Optional<? extends List<GetLibraryItemsRole>> role;
/**
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Guid")
private Optional<? extends List<MediaGuid>> mediaGuid;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("titleSort")
private Optional<String> titleSort;
@@ -254,21 +254,21 @@ public class GetLibraryItemsMetadata {
@JsonCreator
public GetLibraryItemsMetadata(
@JsonProperty("ratingKey") Optional<String> ratingKey,
@JsonProperty("key") Optional<String> key,
@JsonProperty("guid") Optional<String> guid,
@JsonProperty("ratingKey") String ratingKey,
@JsonProperty("key") String key,
@JsonProperty("guid") String guid,
@JsonProperty("studio") Optional<String> studio,
@JsonProperty("type") Optional<String> type,
@JsonProperty("title") Optional<String> title,
@JsonProperty("type") String type,
@JsonProperty("title") String title,
@JsonProperty("contentRating") Optional<String> contentRating,
@JsonProperty("summary") Optional<String> summary,
@JsonProperty("rating") Optional<Double> rating,
@JsonProperty("audienceRating") Optional<Double> audienceRating,
@JsonProperty("year") Optional<Integer> year,
@JsonProperty("year") int year,
@JsonProperty("tagline") Optional<String> tagline,
@JsonProperty("thumb") Optional<String> thumb,
@JsonProperty("art") Optional<String> art,
@JsonProperty("duration") Optional<Integer> duration,
@JsonProperty("duration") int duration,
@JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
@JsonProperty("addedAt") Optional<Integer> addedAt,
@JsonProperty("updatedAt") Optional<Integer> updatedAt,
@@ -283,12 +283,13 @@ public class GetLibraryItemsMetadata {
@JsonProperty("grandparentThumb") Optional<String> grandparentThumb,
@JsonProperty("grandparentArt") Optional<String> grandparentArt,
@JsonProperty("grandparentTheme") Optional<String> grandparentTheme,
@JsonProperty("Media") Optional<? extends List<GetLibraryItemsMedia>> media,
@JsonProperty("Media") List<GetLibraryItemsMedia> media,
@JsonProperty("Genre") Optional<? extends List<GetLibraryItemsGenre>> genre,
@JsonProperty("Country") Optional<? extends List<GetLibraryItemsCountry>> country,
@JsonProperty("Director") Optional<? extends List<GetLibraryItemsDirector>> director,
@JsonProperty("Writer") Optional<? extends List<GetLibraryItemsWriter>> writer,
@JsonProperty("Role") Optional<? extends List<GetLibraryItemsRole>> role,
@JsonProperty("Guid") Optional<? extends List<MediaGuid>> mediaGuid,
@JsonProperty("titleSort") Optional<String> titleSort,
@JsonProperty("viewCount") Optional<Integer> viewCount,
@JsonProperty("lastViewedAt") Optional<Integer> lastViewedAt,
@@ -346,6 +347,7 @@ public class GetLibraryItemsMetadata {
Utils.checkNotNull(director, "director");
Utils.checkNotNull(writer, "writer");
Utils.checkNotNull(role, "role");
Utils.checkNotNull(mediaGuid, "mediaGuid");
Utils.checkNotNull(titleSort, "titleSort");
Utils.checkNotNull(viewCount, "viewCount");
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
@@ -403,6 +405,7 @@ public class GetLibraryItemsMetadata {
this.director = director;
this.writer = writer;
this.role = role;
this.mediaGuid = mediaGuid;
this.titleSort = titleSort;
this.viewCount = viewCount;
this.lastViewedAt = lastViewedAt;
@@ -427,22 +430,30 @@ public class GetLibraryItemsMetadata {
this.parentTheme = parentTheme;
}
public GetLibraryItemsMetadata() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
public GetLibraryItemsMetadata(
String ratingKey,
String key,
String guid,
String type,
String title,
int year,
int duration,
List<GetLibraryItemsMedia> media) {
this(ratingKey, key, guid, Optional.empty(), type, title, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), year, Optional.empty(), Optional.empty(), Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), media, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<String> ratingKey() {
public String ratingKey() {
return ratingKey;
}
@JsonIgnore
public Optional<String> key() {
public String key() {
return key;
}
@JsonIgnore
public Optional<String> guid() {
public String guid() {
return guid;
}
@@ -452,12 +463,12 @@ public class GetLibraryItemsMetadata {
}
@JsonIgnore
public Optional<String> type() {
public String type() {
return type;
}
@JsonIgnore
public Optional<String> title() {
public String title() {
return title;
}
@@ -482,7 +493,7 @@ public class GetLibraryItemsMetadata {
}
@JsonIgnore
public Optional<Integer> year() {
public int year() {
return year;
}
@@ -502,7 +513,7 @@ public class GetLibraryItemsMetadata {
}
@JsonIgnore
public Optional<Integer> duration() {
public int duration() {
return duration;
}
@@ -576,10 +587,9 @@ public class GetLibraryItemsMetadata {
return grandparentTheme;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetLibraryItemsMedia>> media() {
return (Optional<List<GetLibraryItemsMedia>>) media;
public List<GetLibraryItemsMedia> media() {
return media;
}
@SuppressWarnings("unchecked")
@@ -612,6 +622,16 @@ public class GetLibraryItemsMetadata {
return (Optional<List<GetLibraryItemsRole>>) role;
}
/**
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<MediaGuid>> mediaGuid() {
return (Optional<List<MediaGuid>>) mediaGuid;
}
@JsonIgnore
public Optional<String> titleSort() {
return titleSort;
@@ -727,36 +747,18 @@ public class GetLibraryItemsMetadata {
}
public GetLibraryItemsMetadata withRatingKey(String ratingKey) {
Utils.checkNotNull(ratingKey, "ratingKey");
this.ratingKey = Optional.ofNullable(ratingKey);
return this;
}
public GetLibraryItemsMetadata withRatingKey(Optional<String> ratingKey) {
Utils.checkNotNull(ratingKey, "ratingKey");
this.ratingKey = ratingKey;
return this;
}
public GetLibraryItemsMetadata withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public GetLibraryItemsMetadata withKey(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetLibraryItemsMetadata withGuid(String guid) {
Utils.checkNotNull(guid, "guid");
this.guid = Optional.ofNullable(guid);
return this;
}
public GetLibraryItemsMetadata withGuid(Optional<String> guid) {
Utils.checkNotNull(guid, "guid");
this.guid = guid;
return this;
@@ -775,24 +777,12 @@ public class GetLibraryItemsMetadata {
}
public GetLibraryItemsMetadata withType(String type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public GetLibraryItemsMetadata withType(Optional<String> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetLibraryItemsMetadata withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = Optional.ofNullable(title);
return this;
}
public GetLibraryItemsMetadata withTitle(Optional<String> title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
@@ -847,12 +837,6 @@ public class GetLibraryItemsMetadata {
}
public GetLibraryItemsMetadata withYear(int year) {
Utils.checkNotNull(year, "year");
this.year = Optional.ofNullable(year);
return this;
}
public GetLibraryItemsMetadata withYear(Optional<Integer> year) {
Utils.checkNotNull(year, "year");
this.year = year;
return this;
@@ -895,12 +879,6 @@ public class GetLibraryItemsMetadata {
}
public GetLibraryItemsMetadata withDuration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
public GetLibraryItemsMetadata withDuration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
@@ -1075,12 +1053,6 @@ public class GetLibraryItemsMetadata {
}
public GetLibraryItemsMetadata withMedia(List<GetLibraryItemsMedia> media) {
Utils.checkNotNull(media, "media");
this.media = Optional.ofNullable(media);
return this;
}
public GetLibraryItemsMetadata withMedia(Optional<? extends List<GetLibraryItemsMedia>> media) {
Utils.checkNotNull(media, "media");
this.media = media;
return this;
@@ -1146,6 +1118,26 @@ public class GetLibraryItemsMetadata {
return this;
}
/**
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public GetLibraryItemsMetadata withMediaGuid(List<MediaGuid> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = Optional.ofNullable(mediaGuid);
return this;
}
/**
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public GetLibraryItemsMetadata withMediaGuid(Optional<? extends List<MediaGuid>> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = mediaGuid;
return this;
}
public GetLibraryItemsMetadata withTitleSort(String titleSort) {
Utils.checkNotNull(titleSort, "titleSort");
this.titleSort = Optional.ofNullable(titleSort);
@@ -1455,6 +1447,7 @@ public class GetLibraryItemsMetadata {
Objects.deepEquals(this.director, other.director) &&
Objects.deepEquals(this.writer, other.writer) &&
Objects.deepEquals(this.role, other.role) &&
Objects.deepEquals(this.mediaGuid, other.mediaGuid) &&
Objects.deepEquals(this.titleSort, other.titleSort) &&
Objects.deepEquals(this.viewCount, other.viewCount) &&
Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
@@ -1517,6 +1510,7 @@ public class GetLibraryItemsMetadata {
director,
writer,
role,
mediaGuid,
titleSort,
viewCount,
lastViewedAt,
@@ -1579,6 +1573,7 @@ public class GetLibraryItemsMetadata {
"director", director,
"writer", writer,
"role", role,
"mediaGuid", mediaGuid,
"titleSort", titleSort,
"viewCount", viewCount,
"lastViewedAt", lastViewedAt,
@@ -1605,17 +1600,17 @@ public class GetLibraryItemsMetadata {
public final static class Builder {
private Optional<String> ratingKey = Optional.empty();
private String ratingKey;
private Optional<String> key = Optional.empty();
private String key;
private Optional<String> guid = Optional.empty();
private String guid;
private Optional<String> studio = Optional.empty();
private Optional<String> type = Optional.empty();
private String type;
private Optional<String> title = Optional.empty();
private String title;
private Optional<String> contentRating = Optional.empty();
@@ -1625,7 +1620,7 @@ public class GetLibraryItemsMetadata {
private Optional<Double> audienceRating = Optional.empty();
private Optional<Integer> year = Optional.empty();
private Integer year;
private Optional<String> tagline = Optional.empty();
@@ -1633,7 +1628,7 @@ public class GetLibraryItemsMetadata {
private Optional<String> art = Optional.empty();
private Optional<Integer> duration = Optional.empty();
private Integer duration;
private Optional<LocalDate> originallyAvailableAt = Optional.empty();
@@ -1663,7 +1658,7 @@ public class GetLibraryItemsMetadata {
private Optional<String> grandparentTheme = Optional.empty();
private Optional<? extends List<GetLibraryItemsMedia>> media = Optional.empty();
private List<GetLibraryItemsMedia> media;
private Optional<? extends List<GetLibraryItemsGenre>> genre = Optional.empty();
@@ -1675,6 +1670,8 @@ public class GetLibraryItemsMetadata {
private Optional<? extends List<GetLibraryItemsRole>> role = Optional.empty();
private Optional<? extends List<MediaGuid>> mediaGuid = Optional.empty();
private Optional<String> titleSort = Optional.empty();
private Optional<Integer> viewCount = Optional.empty();
@@ -1724,36 +1721,18 @@ public class GetLibraryItemsMetadata {
}
public Builder ratingKey(String ratingKey) {
Utils.checkNotNull(ratingKey, "ratingKey");
this.ratingKey = Optional.ofNullable(ratingKey);
return this;
}
public Builder ratingKey(Optional<String> ratingKey) {
Utils.checkNotNull(ratingKey, "ratingKey");
this.ratingKey = ratingKey;
return this;
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public Builder key(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder guid(String guid) {
Utils.checkNotNull(guid, "guid");
this.guid = Optional.ofNullable(guid);
return this;
}
public Builder guid(Optional<String> guid) {
Utils.checkNotNull(guid, "guid");
this.guid = guid;
return this;
@@ -1772,24 +1751,12 @@ public class GetLibraryItemsMetadata {
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public Builder type(Optional<String> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = Optional.ofNullable(title);
return this;
}
public Builder title(Optional<String> title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
@@ -1844,12 +1811,6 @@ public class GetLibraryItemsMetadata {
}
public Builder year(int year) {
Utils.checkNotNull(year, "year");
this.year = Optional.ofNullable(year);
return this;
}
public Builder year(Optional<Integer> year) {
Utils.checkNotNull(year, "year");
this.year = year;
return this;
@@ -1892,12 +1853,6 @@ public class GetLibraryItemsMetadata {
}
public Builder duration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
public Builder duration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
@@ -2072,12 +2027,6 @@ public class GetLibraryItemsMetadata {
}
public Builder media(List<GetLibraryItemsMedia> media) {
Utils.checkNotNull(media, "media");
this.media = Optional.ofNullable(media);
return this;
}
public Builder media(Optional<? extends List<GetLibraryItemsMedia>> media) {
Utils.checkNotNull(media, "media");
this.media = media;
return this;
@@ -2143,6 +2092,26 @@ public class GetLibraryItemsMetadata {
return this;
}
/**
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public Builder mediaGuid(List<MediaGuid> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = Optional.ofNullable(mediaGuid);
return this;
}
/**
* The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
*
*/
public Builder mediaGuid(Optional<? extends List<MediaGuid>> mediaGuid) {
Utils.checkNotNull(mediaGuid, "mediaGuid");
this.mediaGuid = mediaGuid;
return this;
}
public Builder titleSort(String titleSort) {
Utils.checkNotNull(titleSort, "titleSort");
this.titleSort = Optional.ofNullable(titleSort);
@@ -2444,6 +2413,7 @@ public class GetLibraryItemsMetadata {
director,
writer,
role,
mediaGuid,
titleSort,
viewCount,
lastViewedAt,

View File

@@ -0,0 +1,118 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetLibraryItemsOperator {
@JsonProperty("key")
private String key;
@JsonProperty("title")
private String title;
@JsonCreator
public GetLibraryItemsOperator(
@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 GetLibraryItemsOperator withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetLibraryItemsOperator 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;
}
GetLibraryItemsOperator other = (GetLibraryItemsOperator) 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(GetLibraryItemsOperator.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 GetLibraryItemsOperator build() {
return new GetLibraryItemsOperator(
key,
title);
}
}
}

View File

@@ -361,9 +361,9 @@ public class GetLibraryItemsRequest {
private Tag tag;
private Optional<? extends IncludeGuids> includeGuids = Optional.empty();
private Optional<? extends IncludeGuids> includeGuids;
private Optional<? extends IncludeMeta> includeMeta = Optional.empty();
private Optional<? extends IncludeMeta> includeMeta;
private Type type;
@@ -499,6 +499,12 @@ public class GetLibraryItemsRequest {
}
public GetLibraryItemsRequest build() {
if (includeGuids == null) {
includeGuids = _SINGLETON_VALUE_IncludeGuids.value();
}
if (includeMeta == null) {
includeMeta = _SINGLETON_VALUE_IncludeMeta.value();
}
if (xPlexContainerStart == null) {
xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value();
}
@@ -514,6 +520,18 @@ public class GetLibraryItemsRequest {
xPlexContainerSize);
}
private static final LazySingletonValue<Optional<? extends IncludeGuids>> _SINGLETON_VALUE_IncludeGuids =
new LazySingletonValue<>(
"includeGuids",
"0",
new TypeReference<Optional<? extends IncludeGuids>>() {});
private static final LazySingletonValue<Optional<? extends IncludeMeta>> _SINGLETON_VALUE_IncludeMeta =
new LazySingletonValue<>(
"includeMeta",
"0",
new TypeReference<Optional<? extends IncludeMeta>>() {});
private static final LazySingletonValue<Optional<Integer>> _SINGLETON_VALUE_XPlexContainerStart =
new LazySingletonValue<>(
"X-Plex-Container-Start",

View File

@@ -15,7 +15,7 @@ public class GetLibraryItemsRequestBuilder {
this.sdk = sdk;
}
public GetLibraryItemsRequestBuilder request(dev.plexapi.sdk.models.operations.GetLibraryItemsRequest request) {
public GetLibraryItemsRequestBuilder request(GetLibraryItemsRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -0,0 +1,283 @@
/*
* 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 GetLibraryItemsSort {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("default")
private Optional<String> default_;
@JsonProperty("defaultDirection")
private String 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 GetLibraryItemsSort(
@JsonProperty("default") Optional<String> default_,
@JsonProperty("defaultDirection") String 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(defaultDirection, "defaultDirection");
Utils.checkNotNull(descKey, "descKey");
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
this.default_ = default_;
this.defaultDirection = defaultDirection;
this.descKey = descKey;
this.firstCharacterKey = firstCharacterKey;
this.key = key;
this.title = title;
}
public GetLibraryItemsSort(
String defaultDirection,
String key,
String title) {
this(Optional.empty(), defaultDirection, Optional.empty(), Optional.empty(), key, title);
}
@JsonIgnore
public Optional<String> default_() {
return default_;
}
@JsonIgnore
public String defaultDirection() {
return 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 GetLibraryItemsSort withDefault(String default_) {
Utils.checkNotNull(default_, "default_");
this.default_ = Optional.ofNullable(default_);
return this;
}
public GetLibraryItemsSort withDefault(Optional<String> default_) {
Utils.checkNotNull(default_, "default_");
this.default_ = default_;
return this;
}
public GetLibraryItemsSort withDefaultDirection(String defaultDirection) {
Utils.checkNotNull(defaultDirection, "defaultDirection");
this.defaultDirection = defaultDirection;
return this;
}
public GetLibraryItemsSort withDescKey(String descKey) {
Utils.checkNotNull(descKey, "descKey");
this.descKey = Optional.ofNullable(descKey);
return this;
}
public GetLibraryItemsSort withDescKey(Optional<String> descKey) {
Utils.checkNotNull(descKey, "descKey");
this.descKey = descKey;
return this;
}
public GetLibraryItemsSort withFirstCharacterKey(String firstCharacterKey) {
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
this.firstCharacterKey = Optional.ofNullable(firstCharacterKey);
return this;
}
public GetLibraryItemsSort withFirstCharacterKey(Optional<String> firstCharacterKey) {
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
this.firstCharacterKey = firstCharacterKey;
return this;
}
public GetLibraryItemsSort withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetLibraryItemsSort 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;
}
GetLibraryItemsSort other = (GetLibraryItemsSort) o;
return
Objects.deepEquals(this.default_, other.default_) &&
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_,
defaultDirection,
descKey,
firstCharacterKey,
key,
title);
}
@Override
public String toString() {
return Utils.toString(GetLibraryItemsSort.class,
"default_", default_,
"defaultDirection", defaultDirection,
"descKey", descKey,
"firstCharacterKey", firstCharacterKey,
"key", key,
"title", title);
}
public final static class Builder {
private Optional<String> default_ = Optional.empty();
private String 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 defaultDirection(String 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 GetLibraryItemsSort build() {
return new GetLibraryItemsSort(
default_,
defaultDirection,
descKey,
firstCharacterKey,
key,
title);
}
}
}

View File

@@ -0,0 +1,319 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
public class GetLibraryItemsType {
@JsonProperty("key")
private String key;
@JsonProperty("type")
private String type;
@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("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 GetLibraryItemsType(
String key,
String type,
String title,
boolean active) {
this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty());
}
@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 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 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;
}
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.title, other.title) &&
Objects.deepEquals(this.active, other.active) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.sort, other.sort) &&
Objects.deepEquals(this.field, other.field);
}
@Override
public int hashCode() {
return Objects.hash(
key,
type,
title,
active,
filter,
sort,
field);
}
@Override
public String toString() {
return Utils.toString(GetLibraryItemsType.class,
"key", key,
"type", type,
"title", title,
"active", active,
"filter", filter,
"sort", sort,
"field", field);
}
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
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder 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,
title,
active,
filter,
sort,
field);
}
}
}

View File

@@ -16,7 +16,7 @@ public class GetMediaProvidersRequestBuilder {
this.sdk = sdk;
}
public GetMediaProvidersRequestBuilder xPlexToken(java.lang.String xPlexToken) {
public GetMediaProvidersRequestBuilder xPlexToken(String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
return this;

View File

@@ -25,13 +25,13 @@ public class GetMetadataChildrenRequestBuilder {
return this;
}
public GetMetadataChildrenRequestBuilder includeElements(java.lang.String includeElements) {
public GetMetadataChildrenRequestBuilder includeElements(String includeElements) {
Utils.checkNotNull(includeElements, "includeElements");
this.includeElements = Optional.of(includeElements);
return this;
}
public GetMetadataChildrenRequestBuilder includeElements(java.util.Optional<java.lang.String> includeElements) {
public GetMetadataChildrenRequestBuilder includeElements(Optional<String> includeElements) {
Utils.checkNotNull(includeElements, "includeElements");
this.includeElements = includeElements;
return this;

View File

@@ -29,15 +29,6 @@ public class GetPinRequest {
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong")
private Optional<Boolean> strong;
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")
private Optional<String> clientID;
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")
private Optional<String> clientName;
@@ -53,19 +44,16 @@ public class GetPinRequest {
@JsonCreator
public GetPinRequest(
Optional<Boolean> strong,
Optional<String> clientID,
Optional<String> clientName,
Optional<String> deviceName,
Optional<String> clientVersion,
Optional<String> clientPlatform) {
Utils.checkNotNull(strong, "strong");
Utils.checkNotNull(clientID, "clientID");
Utils.checkNotNull(clientName, "clientName");
Utils.checkNotNull(deviceName, "deviceName");
Utils.checkNotNull(clientVersion, "clientVersion");
Utils.checkNotNull(clientPlatform, "clientPlatform");
this.strong = strong;
this.clientID = clientID;
this.clientName = clientName;
this.deviceName = deviceName;
this.clientVersion = clientVersion;
@@ -73,7 +61,7 @@ public class GetPinRequest {
}
public GetPinRequest() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -87,17 +75,6 @@ public class GetPinRequest {
return strong;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@JsonIgnore
public Optional<String> clientID() {
return clientID;
}
@JsonIgnore
public Optional<String> clientName() {
return clientName;
@@ -146,30 +123,6 @@ public class GetPinRequest {
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public GetPinRequest withClientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public GetPinRequest withClientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
public GetPinRequest withClientName(String clientName) {
Utils.checkNotNull(clientName, "clientName");
this.clientName = Optional.ofNullable(clientName);
@@ -229,7 +182,6 @@ public class GetPinRequest {
GetPinRequest other = (GetPinRequest) o;
return
Objects.deepEquals(this.strong, other.strong) &&
Objects.deepEquals(this.clientID, other.clientID) &&
Objects.deepEquals(this.clientName, other.clientName) &&
Objects.deepEquals(this.deviceName, other.deviceName) &&
Objects.deepEquals(this.clientVersion, other.clientVersion) &&
@@ -240,7 +192,6 @@ public class GetPinRequest {
public int hashCode() {
return Objects.hash(
strong,
clientID,
clientName,
deviceName,
clientVersion,
@@ -251,7 +202,6 @@ public class GetPinRequest {
public String toString() {
return Utils.toString(GetPinRequest.class,
"strong", strong,
"clientID", clientID,
"clientName", clientName,
"deviceName", deviceName,
"clientVersion", clientVersion,
@@ -262,8 +212,6 @@ public class GetPinRequest {
private Optional<Boolean> strong;
private Optional<String> clientID = Optional.empty();
private Optional<String> clientName = Optional.empty();
private Optional<String> deviceName = Optional.empty();
@@ -300,30 +248,6 @@ public class GetPinRequest {
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
public Builder clientName(String clientName) {
Utils.checkNotNull(clientName, "clientName");
this.clientName = Optional.ofNullable(clientName);
@@ -377,7 +301,6 @@ public class GetPinRequest {
strong = _SINGLETON_VALUE_Strong.value();
} return new GetPinRequest(
strong,
clientID,
clientName,
deviceName,
clientVersion,

View File

@@ -18,19 +18,19 @@ public class GetPinRequestBuilder {
this.sdk = sdk;
}
public GetPinRequestBuilder request(dev.plexapi.sdk.models.operations.GetPinRequest request) {
public GetPinRequestBuilder request(GetPinRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;
}
public GetPinRequestBuilder serverURL(java.lang.String serverURL) {
public GetPinRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetPinRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetPinRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;

View File

@@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonValue;
*
*/
public enum GetPlaylistContentsQueryParamType {
ONE(1L),
TWO(2L),
THREE(3L),
FOUR(4L);
Movie(1L),
Show(2L),
Season(3L),
Episode(4L);
@JsonValue
private final long value;

View File

@@ -23,7 +23,7 @@ public class GetPlaylistContentsRequestBuilder {
return this;
}
public GetPlaylistContentsRequestBuilder type(dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType type) {
public GetPlaylistContentsRequestBuilder type(GetPlaylistContentsQueryParamType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;

View File

@@ -17,25 +17,25 @@ public class GetPlaylistsRequestBuilder {
this.sdk = sdk;
}
public GetPlaylistsRequestBuilder playlistType(dev.plexapi.sdk.models.operations.PlaylistType playlistType) {
public GetPlaylistsRequestBuilder playlistType(PlaylistType playlistType) {
Utils.checkNotNull(playlistType, "playlistType");
this.playlistType = Optional.of(playlistType);
return this;
}
public GetPlaylistsRequestBuilder playlistType(java.util.Optional<? extends dev.plexapi.sdk.models.operations.PlaylistType> playlistType) {
public GetPlaylistsRequestBuilder playlistType(Optional<? extends PlaylistType> playlistType) {
Utils.checkNotNull(playlistType, "playlistType");
this.playlistType = playlistType;
return this;
}
public GetPlaylistsRequestBuilder smart(dev.plexapi.sdk.models.operations.QueryParamSmart smart) {
public GetPlaylistsRequestBuilder smart(QueryParamSmart smart) {
Utils.checkNotNull(smart, "smart");
this.smart = Optional.of(smart);
return this;
}
public GetPlaylistsRequestBuilder smart(java.util.Optional<? extends dev.plexapi.sdk.models.operations.QueryParamSmart> smart) {
public GetPlaylistsRequestBuilder smart(Optional<? extends QueryParamSmart> smart) {
Utils.checkNotNull(smart, "smart");
this.smart = smart;
return this;

View File

@@ -32,7 +32,7 @@ public class GetRecentlyAddedRequestBuilder {
return this;
}
public GetRecentlyAddedRequestBuilder xPlexContainerStart(java.util.Optional<java.lang.Integer> xPlexContainerStart) {
public GetRecentlyAddedRequestBuilder xPlexContainerStart(Optional<Integer> xPlexContainerStart) {
Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart");
this.xPlexContainerStart = xPlexContainerStart;
return this;
@@ -44,7 +44,7 @@ public class GetRecentlyAddedRequestBuilder {
return this;
}
public GetRecentlyAddedRequestBuilder xPlexContainerSize(java.util.Optional<java.lang.Integer> xPlexContainerSize) {
public GetRecentlyAddedRequestBuilder xPlexContainerSize(Optional<Integer> xPlexContainerSize) {
Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize");
this.xPlexContainerSize = xPlexContainerSize;
return this;

View File

@@ -24,13 +24,13 @@ public class GetRefreshLibraryMetadataRequestBuilder {
return this;
}
public GetRefreshLibraryMetadataRequestBuilder force(dev.plexapi.sdk.models.operations.Force force) {
public GetRefreshLibraryMetadataRequestBuilder force(Force force) {
Utils.checkNotNull(force, "force");
this.force = Optional.of(force);
return this;
}
public GetRefreshLibraryMetadataRequestBuilder force(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Force> force) {
public GetRefreshLibraryMetadataRequestBuilder force(Optional<? extends Force> force) {
Utils.checkNotNull(force, "force");
this.force = force;
return this;

View File

@@ -15,7 +15,7 @@ public class GetResizedPhotoRequestBuilder {
this.sdk = sdk;
}
public GetResizedPhotoRequestBuilder request(dev.plexapi.sdk.models.operations.GetResizedPhotoRequest request) {
public GetResizedPhotoRequestBuilder request(GetResizedPhotoRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -23,7 +23,7 @@ public class GetResourcesStatisticsRequestBuilder {
return this;
}
public GetResourcesStatisticsRequestBuilder timespan(java.util.Optional<java.lang.Long> timespan) {
public GetResourcesStatisticsRequestBuilder timespan(Optional<Long> timespan) {
Utils.checkNotNull(timespan, "timespan");
this.timespan = timespan;
return this;

View File

@@ -23,7 +23,7 @@ public class GetSearchLibraryRequestBuilder {
return this;
}
public GetSearchLibraryRequestBuilder type(dev.plexapi.sdk.models.operations.QueryParamType type) {
public GetSearchLibraryRequestBuilder type(QueryParamType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;

View File

@@ -16,7 +16,7 @@ public class GetSearchResultsRequestBuilder {
this.sdk = sdk;
}
public GetSearchResultsRequestBuilder query(java.lang.String query) {
public GetSearchResultsRequestBuilder query(String query) {
Utils.checkNotNull(query, "query");
this.query = query;
return this;

View File

@@ -20,15 +20,6 @@ import java.util.Optional;
public class GetServerResourcesRequest {
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")
private Optional<String> clientID;
/**
* Include Https entries in the results
*/
@@ -51,33 +42,19 @@ public class GetServerResourcesRequest {
@JsonCreator
public GetServerResourcesRequest(
Optional<String> clientID,
Optional<? extends IncludeHttps> includeHttps,
Optional<? extends IncludeRelay> includeRelay,
Optional<? extends IncludeIPv6> includeIPv6) {
Utils.checkNotNull(clientID, "clientID");
Utils.checkNotNull(includeHttps, "includeHttps");
Utils.checkNotNull(includeRelay, "includeRelay");
Utils.checkNotNull(includeIPv6, "includeIPv6");
this.clientID = clientID;
this.includeHttps = includeHttps;
this.includeRelay = includeRelay;
this.includeIPv6 = includeIPv6;
}
public GetServerResourcesRequest() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@JsonIgnore
public Optional<String> clientID() {
return clientID;
this(Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -113,30 +90,6 @@ public class GetServerResourcesRequest {
return new Builder();
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public GetServerResourcesRequest withClientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public GetServerResourcesRequest withClientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
/**
* Include Https entries in the results
*/
@@ -205,7 +158,6 @@ public class GetServerResourcesRequest {
}
GetServerResourcesRequest other = (GetServerResourcesRequest) o;
return
Objects.deepEquals(this.clientID, other.clientID) &&
Objects.deepEquals(this.includeHttps, other.includeHttps) &&
Objects.deepEquals(this.includeRelay, other.includeRelay) &&
Objects.deepEquals(this.includeIPv6, other.includeIPv6);
@@ -214,7 +166,6 @@ public class GetServerResourcesRequest {
@Override
public int hashCode() {
return Objects.hash(
clientID,
includeHttps,
includeRelay,
includeIPv6);
@@ -223,7 +174,6 @@ public class GetServerResourcesRequest {
@Override
public String toString() {
return Utils.toString(GetServerResourcesRequest.class,
"clientID", clientID,
"includeHttps", includeHttps,
"includeRelay", includeRelay,
"includeIPv6", includeIPv6);
@@ -231,8 +181,6 @@ public class GetServerResourcesRequest {
public final static class Builder {
private Optional<String> clientID = Optional.empty();
private Optional<? extends IncludeHttps> includeHttps;
private Optional<? extends IncludeRelay> includeRelay;
@@ -243,30 +191,6 @@ public class GetServerResourcesRequest {
// force use of static builder() method
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
/**
* Include Https entries in the results
*/
@@ -335,7 +259,6 @@ public class GetServerResourcesRequest {
if (includeIPv6 == null) {
includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value();
} return new GetServerResourcesRequest(
clientID,
includeHttps,
includeRelay,
includeIPv6);

View File

@@ -12,7 +12,6 @@ import java.util.Optional;
public class GetServerResourcesRequestBuilder {
private Optional<String> clientID = Optional.empty();
private Optional<? extends IncludeHttps> includeHttps = Utils.readDefaultOrConstValue(
"includeHttps",
"0",
@@ -32,61 +31,49 @@ public class GetServerResourcesRequestBuilder {
this.sdk = sdk;
}
public GetServerResourcesRequestBuilder clientID(java.lang.String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.of(clientID);
return this;
}
public GetServerResourcesRequestBuilder clientID(java.util.Optional<java.lang.String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
public GetServerResourcesRequestBuilder includeHttps(dev.plexapi.sdk.models.operations.IncludeHttps includeHttps) {
public GetServerResourcesRequestBuilder includeHttps(IncludeHttps includeHttps) {
Utils.checkNotNull(includeHttps, "includeHttps");
this.includeHttps = Optional.of(includeHttps);
return this;
}
public GetServerResourcesRequestBuilder includeHttps(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeHttps> includeHttps) {
public GetServerResourcesRequestBuilder includeHttps(Optional<? extends IncludeHttps> includeHttps) {
Utils.checkNotNull(includeHttps, "includeHttps");
this.includeHttps = includeHttps;
return this;
}
public GetServerResourcesRequestBuilder includeRelay(dev.plexapi.sdk.models.operations.IncludeRelay includeRelay) {
public GetServerResourcesRequestBuilder includeRelay(IncludeRelay includeRelay) {
Utils.checkNotNull(includeRelay, "includeRelay");
this.includeRelay = Optional.of(includeRelay);
return this;
}
public GetServerResourcesRequestBuilder includeRelay(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeRelay> includeRelay) {
public GetServerResourcesRequestBuilder includeRelay(Optional<? extends IncludeRelay> includeRelay) {
Utils.checkNotNull(includeRelay, "includeRelay");
this.includeRelay = includeRelay;
return this;
}
public GetServerResourcesRequestBuilder includeIPv6(dev.plexapi.sdk.models.operations.IncludeIPv6 includeIPv6) {
public GetServerResourcesRequestBuilder includeIPv6(IncludeIPv6 includeIPv6) {
Utils.checkNotNull(includeIPv6, "includeIPv6");
this.includeIPv6 = Optional.of(includeIPv6);
return this;
}
public GetServerResourcesRequestBuilder includeIPv6(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeIPv6> includeIPv6) {
public GetServerResourcesRequestBuilder includeIPv6(Optional<? extends IncludeIPv6> includeIPv6) {
Utils.checkNotNull(includeIPv6, "includeIPv6");
this.includeIPv6 = includeIPv6;
return this;
}
public GetServerResourcesRequestBuilder serverURL(java.lang.String serverURL) {
public GetServerResourcesRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetServerResourcesRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetServerResourcesRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;
@@ -103,7 +90,6 @@ public class GetServerResourcesRequestBuilder {
includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value();
}
return sdk.getServerResources(
clientID,
includeHttps,
includeRelay,
includeIPv6,

View File

@@ -21,13 +21,13 @@ public class GetSessionHistoryRequestBuilder {
this.sdk = sdk;
}
public GetSessionHistoryRequestBuilder sort(java.lang.String sort) {
public GetSessionHistoryRequestBuilder sort(String sort) {
Utils.checkNotNull(sort, "sort");
this.sort = Optional.of(sort);
return this;
}
public GetSessionHistoryRequestBuilder sort(java.util.Optional<java.lang.String> sort) {
public GetSessionHistoryRequestBuilder sort(Optional<String> sort) {
Utils.checkNotNull(sort, "sort");
this.sort = sort;
return this;
@@ -39,19 +39,19 @@ public class GetSessionHistoryRequestBuilder {
return this;
}
public GetSessionHistoryRequestBuilder accountId(java.util.Optional<java.lang.Long> accountId) {
public GetSessionHistoryRequestBuilder accountId(Optional<Long> accountId) {
Utils.checkNotNull(accountId, "accountId");
this.accountId = accountId;
return this;
}
public GetSessionHistoryRequestBuilder filter(dev.plexapi.sdk.models.operations.QueryParamFilter filter) {
public GetSessionHistoryRequestBuilder filter(QueryParamFilter filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.of(filter);
return this;
}
public GetSessionHistoryRequestBuilder filter(java.util.Optional<? extends dev.plexapi.sdk.models.operations.QueryParamFilter> filter) {
public GetSessionHistoryRequestBuilder filter(Optional<? extends QueryParamFilter> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
@@ -63,7 +63,7 @@ public class GetSessionHistoryRequestBuilder {
return this;
}
public GetSessionHistoryRequestBuilder librarySectionID(java.util.Optional<java.lang.Long> librarySectionID) {
public GetSessionHistoryRequestBuilder librarySectionID(Optional<Long> librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = librarySectionID;
return this;

View File

@@ -16,7 +16,7 @@ public class GetSourceConnectionInformationRequestBuilder {
this.sdk = sdk;
}
public GetSourceConnectionInformationRequestBuilder source(java.lang.String source) {
public GetSourceConnectionInformationRequestBuilder source(String source) {
Utils.checkNotNull(source, "source");
this.source = source;
return this;

View File

@@ -23,7 +23,7 @@ public class GetStatisticsRequestBuilder {
return this;
}
public GetStatisticsRequestBuilder timespan(java.util.Optional<java.lang.Long> timespan) {
public GetStatisticsRequestBuilder timespan(Optional<Long> timespan) {
Utils.checkNotNull(timespan, "timespan");
this.timespan = timespan;
return this;

View File

@@ -15,7 +15,7 @@ public class GetThumbImageRequestBuilder {
this.sdk = sdk;
}
public GetThumbImageRequestBuilder request(dev.plexapi.sdk.models.operations.GetThumbImageRequest request) {
public GetThumbImageRequestBuilder request(GetThumbImageRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -15,7 +15,7 @@ public class GetTimelineRequestBuilder {
this.sdk = sdk;
}
public GetTimelineRequestBuilder request(dev.plexapi.sdk.models.operations.GetTimelineRequest request) {
public GetTimelineRequestBuilder request(GetTimelineRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -13,20 +13,10 @@ import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetTokenByPinIdRequest {
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")
private Optional<String> clientID;
/**
* The PinID to retrieve an access token for
*/
@@ -35,29 +25,10 @@ public class GetTokenByPinIdRequest {
@JsonCreator
public GetTokenByPinIdRequest(
Optional<String> clientID,
long pinID) {
Utils.checkNotNull(clientID, "clientID");
Utils.checkNotNull(pinID, "pinID");
this.clientID = clientID;
this.pinID = pinID;
}
public GetTokenByPinIdRequest(
long pinID) {
this(Optional.empty(), pinID);
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@JsonIgnore
public Optional<String> clientID() {
return clientID;
}
/**
* The PinID to retrieve an access token for
@@ -71,30 +42,6 @@ public class GetTokenByPinIdRequest {
return new Builder();
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public GetTokenByPinIdRequest withClientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public GetTokenByPinIdRequest withClientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
/**
* The PinID to retrieve an access token for
*/
@@ -114,58 +61,29 @@ public class GetTokenByPinIdRequest {
}
GetTokenByPinIdRequest other = (GetTokenByPinIdRequest) o;
return
Objects.deepEquals(this.clientID, other.clientID) &&
Objects.deepEquals(this.pinID, other.pinID);
}
@Override
public int hashCode() {
return Objects.hash(
clientID,
pinID);
}
@Override
public String toString() {
return Utils.toString(GetTokenByPinIdRequest.class,
"clientID", clientID,
"pinID", pinID);
}
public final static class Builder {
private Optional<String> clientID = Optional.empty();
private Long pinID;
private Builder() {
// force use of static builder() method
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
/**
* The PinID to retrieve an access token for
*/
@@ -177,7 +95,6 @@ public class GetTokenByPinIdRequest {
public GetTokenByPinIdRequest build() {
return new GetTokenByPinIdRequest(
clientID,
pinID);
}
}

View File

@@ -11,7 +11,6 @@ import java.util.Optional;
public class GetTokenByPinIdRequestBuilder {
private Optional<String> clientID = Optional.empty();
private Long pinID;
private Optional<String> serverURL = Optional.empty();
private final SDKMethodInterfaces.MethodCallGetTokenByPinId sdk;
@@ -19,18 +18,6 @@ public class GetTokenByPinIdRequestBuilder {
public GetTokenByPinIdRequestBuilder(SDKMethodInterfaces.MethodCallGetTokenByPinId sdk) {
this.sdk = sdk;
}
public GetTokenByPinIdRequestBuilder clientID(java.lang.String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.of(clientID);
return this;
}
public GetTokenByPinIdRequestBuilder clientID(java.util.Optional<java.lang.String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
public GetTokenByPinIdRequestBuilder pinID(long pinID) {
Utils.checkNotNull(pinID, "pinID");
@@ -38,13 +25,13 @@ public class GetTokenByPinIdRequestBuilder {
return this;
}
public GetTokenByPinIdRequestBuilder serverURL(java.lang.String serverURL) {
public GetTokenByPinIdRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetTokenByPinIdRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetTokenByPinIdRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;
@@ -53,7 +40,6 @@ public class GetTokenByPinIdRequestBuilder {
public GetTokenByPinIdResponse call() throws Exception {
return sdk.getTokenByPinId(
clientID,
pinID,
serverURL);
}

View File

@@ -17,13 +17,13 @@ public class GetTokenDetailsRequestBuilder {
this.sdk = sdk;
}
public GetTokenDetailsRequestBuilder serverURL(java.lang.String serverURL) {
public GetTokenDetailsRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetTokenDetailsRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetTokenDetailsRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;

View File

@@ -159,7 +159,7 @@ public class GetTokenDetailsUserPlexAccount {
private int id;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonProperty("joinedAt")
private long joinedAt;
@@ -210,7 +210,7 @@ public class GetTokenDetailsUserPlexAccount {
private Optional<Boolean> protected_;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonProperty("rememberExpiresAt")
private long rememberExpiresAt;
@@ -586,7 +586,7 @@ public class GetTokenDetailsUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public long joinedAt() {
@@ -649,7 +649,7 @@ public class GetTokenDetailsUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public long rememberExpiresAt() {
@@ -1031,7 +1031,7 @@ public class GetTokenDetailsUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetTokenDetailsUserPlexAccount withJoinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
@@ -1140,7 +1140,7 @@ public class GetTokenDetailsUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetTokenDetailsUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
@@ -1795,7 +1795,7 @@ public class GetTokenDetailsUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder joinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
@@ -1904,7 +1904,7 @@ public class GetTokenDetailsUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder rememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");

View File

@@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonValue;
*
*/
public enum GetTopWatchedContentQueryParamType {
ONE(1L),
TWO(2L),
THREE(3L),
FOUR(4L);
Movie(1L),
Show(2L),
Season(3L),
Episode(4L);
@JsonValue
private final long value;

View File

@@ -18,7 +18,7 @@ public class GetTopWatchedContentRequestBuilder {
this.sdk = sdk;
}
public GetTopWatchedContentRequestBuilder type(dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType type) {
public GetTopWatchedContentRequestBuilder type(GetTopWatchedContentQueryParamType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
@@ -30,7 +30,7 @@ public class GetTopWatchedContentRequestBuilder {
return this;
}
public GetTopWatchedContentRequestBuilder includeGuids(java.util.Optional<java.lang.Long> includeGuids) {
public GetTopWatchedContentRequestBuilder includeGuids(Optional<Long> includeGuids) {
Utils.checkNotNull(includeGuids, "includeGuids");
this.includeGuids = includeGuids;
return this;

View File

@@ -16,13 +16,13 @@ public class GetTransientTokenRequestBuilder {
this.sdk = sdk;
}
public GetTransientTokenRequestBuilder type(dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType type) {
public GetTransientTokenRequestBuilder type(GetTransientTokenQueryParamType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetTransientTokenRequestBuilder scope(dev.plexapi.sdk.models.operations.Scope scope) {
public GetTransientTokenRequestBuilder scope(Scope scope) {
Utils.checkNotNull(scope, "scope");
this.scope = scope;
return this;

View File

@@ -17,13 +17,13 @@ public class GetUserFriendsRequestBuilder {
this.sdk = sdk;
}
public GetUserFriendsRequestBuilder serverURL(java.lang.String serverURL) {
public GetUserFriendsRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetUserFriendsRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetUserFriendsRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;

View File

@@ -18,19 +18,19 @@ public class GetWatchListRequestBuilder {
this.sdk = sdk;
}
public GetWatchListRequestBuilder request(dev.plexapi.sdk.models.operations.GetWatchListRequest request) {
public GetWatchListRequestBuilder request(GetWatchListRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;
}
public GetWatchListRequestBuilder serverURL(java.lang.String serverURL) {
public GetWatchListRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetWatchListRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public GetWatchListRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;

View File

@@ -11,17 +11,17 @@ import com.fasterxml.jackson.annotation.JsonValue;
*
*/
public enum IncludeGuids {
ZERO(0L),
ONE(1L);
Disable(0),
Enable(1);
@JsonValue
private final long value;
private final int value;
private IncludeGuids(long value) {
private IncludeGuids(int value) {
this.value = value;
}
public long value() {
public int value() {
return value;
}
}

View File

@@ -10,8 +10,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
* IncludeHttps - Include Https entries in the results
*/
public enum IncludeHttps {
ZERO(0),
ONE(1);
Disable(0),
Enable(1);
@JsonValue
private final int value;

View File

@@ -10,8 +10,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
* IncludeIPv6 - Include IPv6 entries in the results
*/
public enum IncludeIPv6 {
ZERO(0),
ONE(1);
Disable(0),
Enable(1);
@JsonValue
private final int value;

View File

@@ -11,17 +11,17 @@ import com.fasterxml.jackson.annotation.JsonValue;
*
*/
public enum IncludeMeta {
ZERO(0L),
ONE(1L);
Disable(0),
Enable(1);
@JsonValue
private final long value;
private final int value;
private IncludeMeta(long value) {
private IncludeMeta(int value) {
this.value = value;
}
public long value() {
public int value() {
return value;
}
}

View File

@@ -12,8 +12,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
*
*/
public enum IncludeRelay {
ZERO(0),
ONE(1);
Disable(0),
Enable(1);
@JsonValue
private final int value;

View File

@@ -13,6 +13,7 @@ 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.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
@@ -83,8 +84,8 @@ public class LibrarySectionID {
public _Deserializer() {
super(LibrarySectionID.class, false,
TypeReferenceWithShape.of(new TypeReference<java.lang.String>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<java.lang.Long>() {}, JsonShape.DEFAULT));
TypeReferenceWithShape.of(new TypeReference<String>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<Long>() {}, JsonShape.DEFAULT));
}
}

View File

@@ -7,48 +7,39 @@ 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 Location {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private Optional<Integer> id;
private int id;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("path")
private Optional<String> path;
private String path;
@JsonCreator
public Location(
@JsonProperty("id") Optional<Integer> id,
@JsonProperty("path") Optional<String> path) {
@JsonProperty("id") int id,
@JsonProperty("path") String path) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(path, "path");
this.id = id;
this.path = path;
}
public Location() {
this(Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> id() {
public int id() {
return id;
}
@JsonIgnore
public Optional<String> path() {
public String path() {
return path;
}
@@ -57,24 +48,12 @@ public class Location {
}
public Location withId(int id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public Location withId(Optional<Integer> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Location withPath(String path) {
Utils.checkNotNull(path, "path");
this.path = Optional.ofNullable(path);
return this;
}
public Location withPath(Optional<String> path) {
Utils.checkNotNull(path, "path");
this.path = path;
return this;
@@ -110,33 +89,21 @@ public class Location {
public final static class Builder {
private Optional<Integer> id = Optional.empty();
private Integer id;
private Optional<String> path = Optional.empty();
private String path;
private Builder() {
// force use of static builder() method
}
public Builder id(int id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
public Builder id(Optional<Integer> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
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;

View File

@@ -18,19 +18,19 @@ public class LogLineRequestBuilder {
this.sdk = sdk;
}
public LogLineRequestBuilder level(dev.plexapi.sdk.models.operations.Level level) {
public LogLineRequestBuilder level(Level level) {
Utils.checkNotNull(level, "level");
this.level = level;
return this;
}
public LogLineRequestBuilder message(java.lang.String message) {
public LogLineRequestBuilder message(String message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public LogLineRequestBuilder source(java.lang.String source) {
public LogLineRequestBuilder source(String source) {
Utils.checkNotNull(source, "source");
this.source = source;
return this;

View File

@@ -16,7 +16,7 @@ public class LogMultiLineRequestBuilder {
this.sdk = sdk;
}
public LogMultiLineRequestBuilder request(java.lang.String request) {
public LogMultiLineRequestBuilder request(String request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

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

View File

@@ -6,18 +6,21 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* MediaReviewsVisibility - Whether or not the account has media reviews visibility enabled
*/
public enum MediaReviewsVisibility {
ZERO(0L),
ONE(1L);
Disable(0),
Enable(1);
@JsonValue
private final long value;
private final int value;
private MediaReviewsVisibility(long value) {
private MediaReviewsVisibility(int value) {
this.value = value;
}
public long value() {
public int value() {
return value;
}
}

View File

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

View File

@@ -25,7 +25,7 @@ public class PerformSearchRequestBuilder {
this.sdk = sdk;
}
public PerformSearchRequestBuilder query(java.lang.String query) {
public PerformSearchRequestBuilder query(String query) {
Utils.checkNotNull(query, "query");
this.query = query;
return this;
@@ -37,7 +37,7 @@ public class PerformSearchRequestBuilder {
return this;
}
public PerformSearchRequestBuilder sectionId(java.util.Optional<java.lang.Double> sectionId) {
public PerformSearchRequestBuilder sectionId(Optional<Double> sectionId) {
Utils.checkNotNull(sectionId, "sectionId");
this.sectionId = sectionId;
return this;
@@ -49,7 +49,7 @@ public class PerformSearchRequestBuilder {
return this;
}
public PerformSearchRequestBuilder limit(java.util.Optional<java.lang.Double> limit) {
public PerformSearchRequestBuilder limit(Optional<Double> limit) {
Utils.checkNotNull(limit, "limit");
this.limit = limit;
return this;

View File

@@ -25,7 +25,7 @@ public class PerformVoiceSearchRequestBuilder {
this.sdk = sdk;
}
public PerformVoiceSearchRequestBuilder query(java.lang.String query) {
public PerformVoiceSearchRequestBuilder query(String query) {
Utils.checkNotNull(query, "query");
this.query = query;
return this;
@@ -37,7 +37,7 @@ public class PerformVoiceSearchRequestBuilder {
return this;
}
public PerformVoiceSearchRequestBuilder sectionId(java.util.Optional<java.lang.Double> sectionId) {
public PerformVoiceSearchRequestBuilder sectionId(Optional<Double> sectionId) {
Utils.checkNotNull(sectionId, "sectionId");
this.sectionId = sectionId;
return this;
@@ -49,7 +49,7 @@ public class PerformVoiceSearchRequestBuilder {
return this;
}
public PerformVoiceSearchRequestBuilder limit(java.util.Optional<java.lang.Double> limit) {
public PerformVoiceSearchRequestBuilder limit(Optional<Double> limit) {
Utils.checkNotNull(limit, "limit");
this.limit = limit;
return this;

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* PostUsersSignInDataAutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public enum PostUsersSignInDataAutoSelectSubtitle {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private PostUsersSignInDataAutoSelectSubtitle(String value) {
private PostUsersSignInDataAutoSelectSubtitle(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* PostUsersSignInDataDefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
* PostUsersSignInDataDefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
*/
public enum PostUsersSignInDataDefaultSubtitleAccessibility {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private PostUsersSignInDataDefaultSubtitleAccessibility(String value) {
private PostUsersSignInDataDefaultSubtitleAccessibility(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* PostUsersSignInDataDefaultSubtitleForced - The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public enum PostUsersSignInDataDefaultSubtitleForced {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private PostUsersSignInDataDefaultSubtitleForced(String value) {
private PostUsersSignInDataDefaultSubtitleForced(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -6,18 +6,21 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* PostUsersSignInDataMediaReviewsVisibility - Whether or not the account has media reviews visibility enabled
*/
public enum PostUsersSignInDataMediaReviewsVisibility {
ZERO(0L),
ONE(1L);
Disable(0),
Enable(1);
@JsonValue
private final long value;
private final int value;
private PostUsersSignInDataMediaReviewsVisibility(long value) {
private PostUsersSignInDataMediaReviewsVisibility(int value) {
this.value = value;
}
public long value() {
public int value() {
return value;
}
}

View File

@@ -1,203 +0,0 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import dev.plexapi.sdk.utils.SpeakeasyMetadata;
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;
public class PostUsersSignInDataRequest {
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")
private Optional<String> clientID;
/**
* Login credentials
*/
@SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")
private Optional<? extends PostUsersSignInDataRequestBody> requestBody;
@JsonCreator
public PostUsersSignInDataRequest(
Optional<String> clientID,
Optional<? extends PostUsersSignInDataRequestBody> requestBody) {
Utils.checkNotNull(clientID, "clientID");
Utils.checkNotNull(requestBody, "requestBody");
this.clientID = clientID;
this.requestBody = requestBody;
}
public PostUsersSignInDataRequest() {
this(Optional.empty(), Optional.empty());
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
@JsonIgnore
public Optional<String> clientID() {
return clientID;
}
/**
* Login credentials
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<PostUsersSignInDataRequestBody> requestBody() {
return (Optional<PostUsersSignInDataRequestBody>) requestBody;
}
public final static Builder builder() {
return new Builder();
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public PostUsersSignInDataRequest withClientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public PostUsersSignInDataRequest withClientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
/**
* Login credentials
*/
public PostUsersSignInDataRequest withRequestBody(PostUsersSignInDataRequestBody requestBody) {
Utils.checkNotNull(requestBody, "requestBody");
this.requestBody = Optional.ofNullable(requestBody);
return this;
}
/**
* Login credentials
*/
public PostUsersSignInDataRequest withRequestBody(Optional<? extends PostUsersSignInDataRequestBody> requestBody) {
Utils.checkNotNull(requestBody, "requestBody");
this.requestBody = requestBody;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PostUsersSignInDataRequest other = (PostUsersSignInDataRequest) o;
return
Objects.deepEquals(this.clientID, other.clientID) &&
Objects.deepEquals(this.requestBody, other.requestBody);
}
@Override
public int hashCode() {
return Objects.hash(
clientID,
requestBody);
}
@Override
public String toString() {
return Utils.toString(PostUsersSignInDataRequest.class,
"clientID", clientID,
"requestBody", requestBody);
}
public final static class Builder {
private Optional<String> clientID = Optional.empty();
private Optional<? extends PostUsersSignInDataRequestBody> requestBody = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.ofNullable(clientID);
return this;
}
/**
* The unique identifier for the client application
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
public Builder clientID(Optional<String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
return this;
}
/**
* Login credentials
*/
public Builder requestBody(PostUsersSignInDataRequestBody requestBody) {
Utils.checkNotNull(requestBody, "requestBody");
this.requestBody = Optional.ofNullable(requestBody);
return this;
}
/**
* Login credentials
*/
public Builder requestBody(Optional<? extends PostUsersSignInDataRequestBody> requestBody) {
Utils.checkNotNull(requestBody, "requestBody");
this.requestBody = requestBody;
return this;
}
public PostUsersSignInDataRequest build() {
return new PostUsersSignInDataRequest(
clientID,
requestBody);
}
}
}

View File

@@ -10,8 +10,7 @@ import java.util.Optional;
public class PostUsersSignInDataRequestBuilder {
private Optional<String> clientID = Optional.empty();
private Optional<? extends PostUsersSignInDataRequestBody> requestBody = Optional.empty();
private Optional<? extends PostUsersSignInDataRequestBody> request = Optional.empty();
private Optional<String> serverURL = Optional.empty();
private final SDKMethodInterfaces.MethodCallPostUsersSignInData sdk;
@@ -19,37 +18,25 @@ public class PostUsersSignInDataRequestBuilder {
this.sdk = sdk;
}
public PostUsersSignInDataRequestBuilder clientID(java.lang.String clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = Optional.of(clientID);
public PostUsersSignInDataRequestBuilder request(PostUsersSignInDataRequestBody request) {
Utils.checkNotNull(request, "request");
this.request = Optional.of(request);
return this;
}
public PostUsersSignInDataRequestBuilder clientID(java.util.Optional<java.lang.String> clientID) {
Utils.checkNotNull(clientID, "clientID");
this.clientID = clientID;
public PostUsersSignInDataRequestBuilder request(Optional<? extends PostUsersSignInDataRequestBody> request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;
}
public PostUsersSignInDataRequestBuilder requestBody(dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody requestBody) {
Utils.checkNotNull(requestBody, "requestBody");
this.requestBody = Optional.of(requestBody);
return this;
}
public PostUsersSignInDataRequestBuilder requestBody(java.util.Optional<? extends dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody> requestBody) {
Utils.checkNotNull(requestBody, "requestBody");
this.requestBody = requestBody;
return this;
}
public PostUsersSignInDataRequestBuilder serverURL(java.lang.String serverURL) {
public PostUsersSignInDataRequestBuilder serverURL(String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public PostUsersSignInDataRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
public PostUsersSignInDataRequestBuilder serverURL(Optional<String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;
@@ -58,8 +45,7 @@ public class PostUsersSignInDataRequestBuilder {
public PostUsersSignInDataResponse call() throws Exception {
return sdk.postUsersSignInData(
clientID,
requestBody,
request,
serverURL);
}
}

View File

@@ -159,7 +159,7 @@ public class PostUsersSignInDataUserPlexAccount {
private int id;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonProperty("joinedAt")
private long joinedAt;
@@ -210,7 +210,7 @@ public class PostUsersSignInDataUserPlexAccount {
private Optional<Boolean> protected_;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonProperty("rememberExpiresAt")
private long rememberExpiresAt;
@@ -600,7 +600,7 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public long joinedAt() {
@@ -663,7 +663,7 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public long rememberExpiresAt() {
@@ -1055,7 +1055,7 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public PostUsersSignInDataUserPlexAccount withJoinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
@@ -1164,7 +1164,7 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public PostUsersSignInDataUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
@@ -1841,7 +1841,7 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder joinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
@@ -1950,7 +1950,7 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder rememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");

View File

@@ -44,23 +44,14 @@ public class PostUsersSignInDataUserProfile {
@JsonProperty("defaultSubtitleLanguage")
private Optional<String> defaultSubtitleLanguage;
/**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("autoSelectSubtitle")
private Optional<? extends PostUsersSignInDataAutoSelectSubtitle> autoSelectSubtitle;
/**
* The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("defaultSubtitleAccessibility")
private Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility> defaultSubtitleAccessibility;
/**
* The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("defaultSubtitleForced")
private Optional<? extends PostUsersSignInDataDefaultSubtitleForced> defaultSubtitleForced;
@@ -129,27 +120,18 @@ public class PostUsersSignInDataUserProfile {
return defaultSubtitleLanguage;
}
/**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<PostUsersSignInDataAutoSelectSubtitle> autoSelectSubtitle() {
return (Optional<PostUsersSignInDataAutoSelectSubtitle>) autoSelectSubtitle;
}
/**
* The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<PostUsersSignInDataDefaultSubtitleAccessibility> defaultSubtitleAccessibility() {
return (Optional<PostUsersSignInDataDefaultSubtitleAccessibility>) defaultSubtitleAccessibility;
}
/**
* The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<PostUsersSignInDataDefaultSubtitleForced> defaultSubtitleForced() {
@@ -226,54 +208,36 @@ public class PostUsersSignInDataUserProfile {
return this;
}
/**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public PostUsersSignInDataUserProfile withAutoSelectSubtitle(PostUsersSignInDataAutoSelectSubtitle autoSelectSubtitle) {
Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle");
this.autoSelectSubtitle = Optional.ofNullable(autoSelectSubtitle);
return this;
}
/**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public PostUsersSignInDataUserProfile withAutoSelectSubtitle(Optional<? extends PostUsersSignInDataAutoSelectSubtitle> autoSelectSubtitle) {
Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle");
this.autoSelectSubtitle = autoSelectSubtitle;
return this;
}
/**
* The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
*/
public PostUsersSignInDataUserProfile withDefaultSubtitleAccessibility(PostUsersSignInDataDefaultSubtitleAccessibility defaultSubtitleAccessibility) {
Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility");
this.defaultSubtitleAccessibility = Optional.ofNullable(defaultSubtitleAccessibility);
return this;
}
/**
* The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
*/
public PostUsersSignInDataUserProfile withDefaultSubtitleAccessibility(Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility> defaultSubtitleAccessibility) {
Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility");
this.defaultSubtitleAccessibility = defaultSubtitleAccessibility;
return this;
}
/**
* The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public PostUsersSignInDataUserProfile withDefaultSubtitleForced(PostUsersSignInDataDefaultSubtitleForced defaultSubtitleForced) {
Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced");
this.defaultSubtitleForced = Optional.ofNullable(defaultSubtitleForced);
return this;
}
/**
* The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public PostUsersSignInDataUserProfile withDefaultSubtitleForced(Optional<? extends PostUsersSignInDataDefaultSubtitleForced> defaultSubtitleForced) {
Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced");
this.defaultSubtitleForced = defaultSubtitleForced;
@@ -358,15 +322,15 @@ public class PostUsersSignInDataUserProfile {
private Optional<String> defaultSubtitleLanguage = Optional.empty();
private Optional<? extends PostUsersSignInDataAutoSelectSubtitle> autoSelectSubtitle = Optional.empty();
private Optional<? extends PostUsersSignInDataAutoSelectSubtitle> autoSelectSubtitle;
private Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility> defaultSubtitleAccessibility = Optional.empty();
private Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility> defaultSubtitleAccessibility;
private Optional<? extends PostUsersSignInDataDefaultSubtitleForced> defaultSubtitleForced = Optional.empty();
private Optional<? extends PostUsersSignInDataDefaultSubtitleForced> defaultSubtitleForced;
private Optional<? extends PostUsersSignInDataWatchedIndicator> watchedIndicator = Optional.empty();
private Optional<? extends PostUsersSignInDataWatchedIndicator> watchedIndicator;
private Optional<? extends PostUsersSignInDataMediaReviewsVisibility> mediaReviewsVisibility = Optional.empty();
private Optional<? extends PostUsersSignInDataMediaReviewsVisibility> mediaReviewsVisibility;
private Builder() {
// force use of static builder() method
@@ -426,54 +390,36 @@ public class PostUsersSignInDataUserProfile {
return this;
}
/**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public Builder autoSelectSubtitle(PostUsersSignInDataAutoSelectSubtitle autoSelectSubtitle) {
Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle");
this.autoSelectSubtitle = Optional.ofNullable(autoSelectSubtitle);
return this;
}
/**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public Builder autoSelectSubtitle(Optional<? extends PostUsersSignInDataAutoSelectSubtitle> autoSelectSubtitle) {
Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle");
this.autoSelectSubtitle = autoSelectSubtitle;
return this;
}
/**
* The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
*/
public Builder defaultSubtitleAccessibility(PostUsersSignInDataDefaultSubtitleAccessibility defaultSubtitleAccessibility) {
Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility");
this.defaultSubtitleAccessibility = Optional.ofNullable(defaultSubtitleAccessibility);
return this;
}
/**
* The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
*/
public Builder defaultSubtitleAccessibility(Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility> defaultSubtitleAccessibility) {
Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility");
this.defaultSubtitleAccessibility = defaultSubtitleAccessibility;
return this;
}
/**
* The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public Builder defaultSubtitleForced(PostUsersSignInDataDefaultSubtitleForced defaultSubtitleForced) {
Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced");
this.defaultSubtitleForced = Optional.ofNullable(defaultSubtitleForced);
return this;
}
/**
* The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public Builder defaultSubtitleForced(Optional<? extends PostUsersSignInDataDefaultSubtitleForced> defaultSubtitleForced) {
Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced");
this.defaultSubtitleForced = defaultSubtitleForced;
@@ -507,6 +453,21 @@ public class PostUsersSignInDataUserProfile {
public PostUsersSignInDataUserProfile build() {
if (autoSelectAudio == null) {
autoSelectAudio = _SINGLETON_VALUE_AutoSelectAudio.value();
}
if (autoSelectSubtitle == null) {
autoSelectSubtitle = _SINGLETON_VALUE_AutoSelectSubtitle.value();
}
if (defaultSubtitleAccessibility == null) {
defaultSubtitleAccessibility = _SINGLETON_VALUE_DefaultSubtitleAccessibility.value();
}
if (defaultSubtitleForced == null) {
defaultSubtitleForced = _SINGLETON_VALUE_DefaultSubtitleForced.value();
}
if (watchedIndicator == null) {
watchedIndicator = _SINGLETON_VALUE_WatchedIndicator.value();
}
if (mediaReviewsVisibility == null) {
mediaReviewsVisibility = _SINGLETON_VALUE_MediaReviewsVisibility.value();
} return new PostUsersSignInDataUserProfile(
autoSelectAudio,
defaultAudioLanguage,
@@ -523,6 +484,36 @@ public class PostUsersSignInDataUserProfile {
"autoSelectAudio",
"true",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<? extends PostUsersSignInDataAutoSelectSubtitle>> _SINGLETON_VALUE_AutoSelectSubtitle =
new LazySingletonValue<>(
"autoSelectSubtitle",
"0",
new TypeReference<Optional<? extends PostUsersSignInDataAutoSelectSubtitle>>() {});
private static final LazySingletonValue<Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility>> _SINGLETON_VALUE_DefaultSubtitleAccessibility =
new LazySingletonValue<>(
"defaultSubtitleAccessibility",
"0",
new TypeReference<Optional<? extends PostUsersSignInDataDefaultSubtitleAccessibility>>() {});
private static final LazySingletonValue<Optional<? extends PostUsersSignInDataDefaultSubtitleForced>> _SINGLETON_VALUE_DefaultSubtitleForced =
new LazySingletonValue<>(
"defaultSubtitleForced",
"0",
new TypeReference<Optional<? extends PostUsersSignInDataDefaultSubtitleForced>>() {});
private static final LazySingletonValue<Optional<? extends PostUsersSignInDataWatchedIndicator>> _SINGLETON_VALUE_WatchedIndicator =
new LazySingletonValue<>(
"watchedIndicator",
"0",
new TypeReference<Optional<? extends PostUsersSignInDataWatchedIndicator>>() {});
private static final LazySingletonValue<Optional<? extends PostUsersSignInDataMediaReviewsVisibility>> _SINGLETON_VALUE_MediaReviewsVisibility =
new LazySingletonValue<>(
"mediaReviewsVisibility",
"0",
new TypeReference<Optional<? extends PostUsersSignInDataMediaReviewsVisibility>>() {});
}
}

View File

@@ -5,20 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* PostUsersSignInDataWatchedIndicator - Whether or not media watched indicators are enabled (little orange dot on media)
*/
public enum PostUsersSignInDataWatchedIndicator {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private PostUsersSignInDataWatchedIndicator(String value) {
private PostUsersSignInDataWatchedIndicator(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

Some files were not shown because too many files have changed in this diff Show More