mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 12:37:47 +00:00
Generating SDK locally, migrated action to v15
This commit is contained in:
188
src/main/java/lukehagar/plexapi/plexapi/Activities.java
Normal file
188
src/main/java/lukehagar/plexapi/plexapi/Activities.java
Normal file
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||
* Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
||||
* Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
|
||||
* - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
|
||||
* - They must contain an `type` which is used by clients to distinguish the specific activity.
|
||||
* - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
|
||||
* - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
|
||||
*
|
||||
*/
|
||||
public class Activities implements
|
||||
MethodCallGetServerActivities,
|
||||
MethodCallCancelServerActivities {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Activities(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesRequestBuilder getServerActivities() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server Activities
|
||||
* Get Server Activities
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse getServerActivitiesDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/activities");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesActivitiesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesActivitiesResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequestBuilder cancelServerActivities() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel Server Activities
|
||||
* Cancel Server Activities
|
||||
* @param activityUUID The UUID of the activity to cancel.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse cancelServerActivities(
|
||||
String activityUUID) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequest
|
||||
.builder()
|
||||
.activityUUID(activityUUID)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequest.class,
|
||||
baseUrl,
|
||||
"/activities/{activityUUID}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("DELETE");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
201
src/main/java/lukehagar/plexapi/plexapi/Authentication.java
Normal file
201
src/main/java/lukehagar/plexapi/plexapi/Authentication.java
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls regarding authentication for Plex Media Server
|
||||
*
|
||||
*/
|
||||
public class Authentication implements
|
||||
MethodCallGetTransientToken,
|
||||
MethodCallGetSourceConnectionInformation {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Authentication(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequestBuilder getTransientToken() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Transient Token.
|
||||
* This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
||||
*
|
||||
* @param type `delegation` - This is the only supported `type` parameter.
|
||||
* @param scope `all` - This is the only supported `scope` parameter.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse getTransientToken(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenQueryParamType type,
|
||||
lukehagar.plexapi.plexapi.models.operations.Scope scope) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequest
|
||||
.builder()
|
||||
.type(type)
|
||||
.scope(scope)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/security/token");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequestBuilder getSourceConnectionInformation() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Source Connection Information
|
||||
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
|
||||
* Note: requires Plex Media Server >= 1.15.4.
|
||||
*
|
||||
* @param source The source identifier with an included prefix.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse getSourceConnectionInformation(
|
||||
String source) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequest
|
||||
.builder()
|
||||
.source(source)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/security/resources");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
396
src/main/java/lukehagar/plexapi/plexapi/Butler.java
Normal file
396
src/main/java/lukehagar/plexapi/plexapi/Butler.java
Normal file
@@ -0,0 +1,396 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Butler is the task manager of the Plex Media Server Ecosystem.
|
||||
*
|
||||
*/
|
||||
public class Butler implements
|
||||
MethodCallGetButlerTasks,
|
||||
MethodCallStartAllTasks,
|
||||
MethodCallStopAllTasks,
|
||||
MethodCallStartTask,
|
||||
MethodCallStopTask {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Butler(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetButlerTasksRequestBuilder getButlerTasks() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetButlerTasksRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Butler tasks
|
||||
* Returns a list of butler tasks
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse getButlerTasksDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/butler");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetButlerTasksButlerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetButlerTasksButlerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.StartAllTasksRequestBuilder startAllTasks() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.StartAllTasksRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start all Butler tasks
|
||||
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
|
||||
* 1. Any tasks not scheduled to run on the current day will be skipped.
|
||||
* 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
|
||||
* 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
* 4. If we are outside the configured window, the task will start immediately.
|
||||
*
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse startAllTasksDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/butler");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.StopAllTasksRequestBuilder stopAllTasks() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.StopAllTasksRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop all Butler tasks
|
||||
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
||||
*
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse stopAllTasksDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/butler");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("DELETE");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.StartTaskRequestBuilder startTask() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.StartTaskRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a single Butler task
|
||||
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
|
||||
* 1. Any tasks not scheduled to run on the current day will be skipped.
|
||||
* 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
|
||||
* 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
* 4. If we are outside the configured window, the task will start immediately.
|
||||
*
|
||||
* @param taskName the name of the task to be started.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.StartTaskResponse startTask(
|
||||
lukehagar.plexapi.plexapi.models.operations.TaskName taskName) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskRequest
|
||||
.builder()
|
||||
.taskName(taskName)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskRequest.class,
|
||||
baseUrl,
|
||||
"/butler/{taskName}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 202 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.StartTaskResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.StartTaskResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.StopTaskRequestBuilder stopTask() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.StopTaskRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop a single Butler task
|
||||
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
||||
*
|
||||
* @param taskName The name of the task to be started.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.StopTaskResponse stopTask(
|
||||
lukehagar.plexapi.plexapi.models.operations.PathParamTaskName taskName) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskRequest
|
||||
.builder()
|
||||
.taskName(taskName)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskRequest.class,
|
||||
baseUrl,
|
||||
"/butler/{taskName}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("DELETE");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400 || httpRes.statusCode() == 404) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTaskResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.StopTaskResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
227
src/main/java/lukehagar/plexapi/plexapi/Hubs.java
Normal file
227
src/main/java/lukehagar/plexapi/plexapi/Hubs.java
Normal file
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
||||
*
|
||||
*/
|
||||
public class Hubs implements
|
||||
MethodCallGetGlobalHubs,
|
||||
MethodCallGetLibraryHubs {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Hubs(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequestBuilder getGlobalHubs() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Global Hubs
|
||||
* Get Global Hubs filtered by the parameters provided.
|
||||
* @param count The number of items to return with each hub.
|
||||
* @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse getGlobalHubs(
|
||||
Optional<? extends Double> count,
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.OnlyTransient> onlyTransient) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequest
|
||||
.builder()
|
||||
.count(count)
|
||||
.onlyTransient(onlyTransient)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/hubs");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsHubsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsHubsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequestBuilder getLibraryHubs() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get library specific hubs
|
||||
* This endpoint will return a list of library specific hubs
|
||||
*
|
||||
* @param sectionId the Id of the library to query
|
||||
* @param count The number of items to return with each hub.
|
||||
* @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse getLibraryHubs(
|
||||
double sectionId,
|
||||
Optional<? extends Double> count,
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.QueryParamOnlyTransient> onlyTransient) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest
|
||||
.builder()
|
||||
.sectionId(sectionId)
|
||||
.count(count)
|
||||
.onlyTransient(onlyTransient)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest.class,
|
||||
baseUrl,
|
||||
"/hubs/sections/{sectionId}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsHubsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsHubsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
1001
src/main/java/lukehagar/plexapi/plexapi/Library.java
Normal file
1001
src/main/java/lukehagar/plexapi/plexapi/Library.java
Normal file
File diff suppressed because it is too large
Load Diff
289
src/main/java/lukehagar/plexapi/plexapi/Log.java
Normal file
289
src/main/java/lukehagar/plexapi/plexapi/Log.java
Normal file
@@ -0,0 +1,289 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.SerializedBody;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Submit logs to the Log Handler for Plex Media Server
|
||||
*
|
||||
*/
|
||||
public class Log implements
|
||||
MethodCallLogLine,
|
||||
MethodCallLogMultiLine,
|
||||
MethodCallEnablePaperTrail {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Log(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.LogLineRequestBuilder logLine() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.LogLineRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logging a single line message.
|
||||
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
||||
*
|
||||
* @param level An integer log level to write to the PMS log with.
|
||||
0: Error
|
||||
1: Warning
|
||||
2: Info
|
||||
3: Debug
|
||||
4: Verbose
|
||||
|
||||
* @param message The text of the message to write to the log.
|
||||
* @param source a string indicating the source of the message.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.LogLineResponse logLine(
|
||||
lukehagar.plexapi.plexapi.models.operations.Level level,
|
||||
String message,
|
||||
String source) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineRequest
|
||||
.builder()
|
||||
.level(level)
|
||||
.message(message)
|
||||
.source(source)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/log");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.LogLineResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.LogLineResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.LogMultiLineRequestBuilder logMultiLine() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.LogMultiLineRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logging a multi-line message
|
||||
* This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
|
||||
* It accepts a text/plain request body, where each line represents a distinct log entry.
|
||||
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
|
||||
*
|
||||
* Log entries are separated by a newline character (`\n`).
|
||||
* Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
|
||||
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
|
||||
*
|
||||
* The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
||||
* - `0`: Error - Critical issues that require immediate attention.
|
||||
* - `1`: Warning - Important events that are not critical but may indicate potential issues.
|
||||
* - `2`: Info - General informational messages about system operation.
|
||||
* - `3`: Debug - Detailed information useful for debugging purposes.
|
||||
* - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis.
|
||||
*
|
||||
* The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
|
||||
*
|
||||
* Example of a single log entry format:
|
||||
* `level=4&message=Sample%20log%20entry&source=applicationName`
|
||||
*
|
||||
* Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
||||
*
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse logMultiLine(
|
||||
String request) throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/log");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT,
|
||||
new TypeReference<String>() {});
|
||||
SerializedBody serializedRequestBody = lukehagar.plexapi.plexapi.utils.Utils.serializeRequestBody(
|
||||
_convertedRequest, "request", "string", false);
|
||||
if (serializedRequestBody == null) {
|
||||
throw new Exception("Request body is required");
|
||||
}
|
||||
req.setBody(serializedRequestBody);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailRequestBuilder enablePaperTrail() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabling Papertrail
|
||||
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
||||
*
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse enablePaperTrailDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/log/networked");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400 || httpRes.statusCode() == 403) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
282
src/main/java/lukehagar/plexapi/plexapi/Media.java
Normal file
282
src/main/java/lukehagar/plexapi/plexapi/Media.java
Normal file
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Media
|
||||
*
|
||||
*/
|
||||
public class Media implements
|
||||
MethodCallMarkPlayed,
|
||||
MethodCallMarkUnplayed,
|
||||
MethodCallUpdatePlayProgress {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Media(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequestBuilder markPlayed() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark Media Played
|
||||
* This will mark the provided media key as Played.
|
||||
* @param key The media key to mark as played
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse markPlayed(
|
||||
double key) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequest
|
||||
.builder()
|
||||
.key(key)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/:/scrobble");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequestBuilder markUnplayed() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark Media Unplayed
|
||||
* This will mark the provided media key as Unplayed.
|
||||
* @param key The media key to mark as Unplayed
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse markUnplayed(
|
||||
double key) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequest
|
||||
.builder()
|
||||
.key(key)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/:/unscrobble");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequestBuilder updatePlayProgress() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Media Play Progress
|
||||
* This API command can be used to update the play progress of a media item.
|
||||
*
|
||||
* @param key the media key
|
||||
* @param time The time, in milliseconds, used to set the media playback progress.
|
||||
* @param state The playback state of the media item.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse updatePlayProgress(
|
||||
String key,
|
||||
double time,
|
||||
String state) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequest
|
||||
.builder()
|
||||
.key(key)
|
||||
.time(time)
|
||||
.state(state)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/:/progress");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
836
src/main/java/lukehagar/plexapi/plexapi/Playlists.java
Normal file
836
src/main/java/lukehagar/plexapi/plexapi/Playlists.java
Normal file
@@ -0,0 +1,836 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||
* They can be organized in (optionally nesting) folders.
|
||||
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||
* This may cause the duration and number of items to change.
|
||||
*
|
||||
*/
|
||||
public class Playlists implements
|
||||
MethodCallCreatePlaylist,
|
||||
MethodCallGetPlaylists,
|
||||
MethodCallGetPlaylist,
|
||||
MethodCallDeletePlaylist,
|
||||
MethodCallUpdatePlaylist,
|
||||
MethodCallGetPlaylistContents,
|
||||
MethodCallClearPlaylistContents,
|
||||
MethodCallAddPlaylistContents,
|
||||
MethodCallUploadPlaylist {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Playlists(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequestBuilder createPlaylist() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Playlist
|
||||
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
|
||||
* - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`).
|
||||
* - `playQueueID` - To create a playlist from an existing play queue.
|
||||
*
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse createPlaylist(
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequest request) throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/playlists");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.CreatePlaylistPlaylistsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.CreatePlaylistPlaylistsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequestBuilder getPlaylists() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get All Playlists
|
||||
* Get All Playlists given the specified filters.
|
||||
* @param playlistType limit to a type of playlist.
|
||||
* @param smart type of playlists to return (default is all).
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse getPlaylists(
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.PlaylistType> playlistType,
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.QueryParamSmart> smart) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequest
|
||||
.builder()
|
||||
.playlistType(playlistType)
|
||||
.smart(smart)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/playlists");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistsPlaylistsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPlaylistsPlaylistsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequestBuilder getPlaylist() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Playlist
|
||||
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
|
||||
* Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
||||
*
|
||||
* @param playlistID the ID of the playlist
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse getPlaylist(
|
||||
double playlistID) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequest
|
||||
.builder()
|
||||
.playlistID(playlistID)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequest.class,
|
||||
baseUrl,
|
||||
"/playlists/{playlistID}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistPlaylistsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPlaylistPlaylistsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequestBuilder deletePlaylist() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Playlist
|
||||
* This endpoint will delete a playlist
|
||||
*
|
||||
* @param playlistID the ID of the playlist
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse deletePlaylist(
|
||||
double playlistID) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequest
|
||||
.builder()
|
||||
.playlistID(playlistID)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequest.class,
|
||||
baseUrl,
|
||||
"/playlists/{playlistID}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("DELETE");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequestBuilder updatePlaylist() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Playlist
|
||||
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
|
||||
*
|
||||
* @param playlistID the ID of the playlist
|
||||
* @param title name of the playlist
|
||||
* @param summary summary description of the playlist
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse updatePlaylist(
|
||||
double playlistID,
|
||||
Optional<? extends String> title,
|
||||
Optional<? extends String> summary) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest
|
||||
.builder()
|
||||
.playlistID(playlistID)
|
||||
.title(title)
|
||||
.summary(summary)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest.class,
|
||||
baseUrl,
|
||||
"/playlists/{playlistID}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("PUT");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequestBuilder getPlaylistContents() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Playlist Contents
|
||||
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
|
||||
* By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter.
|
||||
* For example, you could use this to display a list of recently added albums vis a smart playlist.
|
||||
* Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
||||
*
|
||||
* @param playlistID the ID of the playlist
|
||||
* @param type the metadata type of the item to return
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse getPlaylistContents(
|
||||
double playlistID,
|
||||
double type) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest
|
||||
.builder()
|
||||
.playlistID(playlistID)
|
||||
.type(type)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest.class,
|
||||
baseUrl,
|
||||
"/playlists/{playlistID}/items",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsPlaylistsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsPlaylistsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequestBuilder clearPlaylistContents() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Playlist Contents
|
||||
* Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
*
|
||||
* @param playlistID the ID of the playlist
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse clearPlaylistContents(
|
||||
double playlistID) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequest
|
||||
.builder()
|
||||
.playlistID(playlistID)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequest.class,
|
||||
baseUrl,
|
||||
"/playlists/{playlistID}/items",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("DELETE");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequestBuilder addPlaylistContents() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding to a Playlist
|
||||
* Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
|
||||
* With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
||||
*
|
||||
* @param playlistID the ID of the playlist
|
||||
* @param uri the content URI for the playlist
|
||||
* @param playQueueID the play queue to add to a playlist
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse addPlaylistContents(
|
||||
double playlistID,
|
||||
String uri,
|
||||
Optional<? extends Double> playQueueID) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest
|
||||
.builder()
|
||||
.playlistID(playlistID)
|
||||
.uri(uri)
|
||||
.playQueueID(playQueueID)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest.class,
|
||||
baseUrl,
|
||||
"/playlists/{playlistID}/items",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("PUT");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsPlaylistsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsPlaylistsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequestBuilder uploadPlaylist() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Playlist
|
||||
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
||||
*
|
||||
* @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
|
||||
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
|
||||
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
|
||||
The GUID of each playlist is based on the filename.
|
||||
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
|
||||
The GUID of each playlist is based on the filename.
|
||||
|
||||
* @param force Force overwriting of duplicate playlists.
|
||||
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||
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.
|
||||
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse uploadPlaylist(
|
||||
String path,
|
||||
lukehagar.plexapi.plexapi.models.operations.Force force) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequest
|
||||
.builder()
|
||||
.path(path)
|
||||
.force(force)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/playlists/upload");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
250
src/main/java/lukehagar/plexapi/plexapi/Plex.java
Normal file
250
src/main/java/lukehagar/plexapi/plexapi/Plex.java
Normal file
@@ -0,0 +1,250 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations directly against https://Plex.tv
|
||||
*
|
||||
*/
|
||||
public class Plex implements
|
||||
MethodCallGetPin,
|
||||
MethodCallGetToken {
|
||||
|
||||
/**
|
||||
* GET_PIN_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_PIN_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
};
|
||||
|
||||
/**
|
||||
* GET_TOKEN_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_TOKEN_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
};
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Plex(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPinRequestBuilder getPin() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetPinRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Pin
|
||||
* Retrieve a Pin from Plex.tv for authentication flows
|
||||
* @param strong Determines the kind of code returned by the API call
|
||||
Strong codes are used for Pin authentication flows
|
||||
Non-Strong codes are used for `Plex.tv/link`
|
||||
|
||||
* @param xPlexClientIdentifier 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 serverURL Overrides the server URL.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetPinResponse getPin(
|
||||
Optional<? extends Boolean> strong,
|
||||
String xPlexClientIdentifier,
|
||||
java.util.Optional<String> serverURL) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinRequest
|
||||
.builder()
|
||||
.strong(strong)
|
||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
||||
.build();
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(GET_PIN_SERVERS[0], new java.util.HashMap<String, String>());
|
||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||
baseUrl = serverURL.get();
|
||||
}
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/pins");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("POST");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
java.util.Map<String, java.util.List<String>> headers = lukehagar.plexapi.plexapi.utils.Utils.getHeaders(request);
|
||||
if (headers != null) {
|
||||
for (java.util.Map.Entry<String, java.util.List<String>> header : headers.entrySet()) {
|
||||
for (String value : header.getValue()) {
|
||||
req.addHeader(header.getKey(), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = this.sdkConfiguration.defaultClient;
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPinResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetPinPlexResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetPinPlexResponseBody>() {});
|
||||
res.withFourHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTokenRequestBuilder getToken() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetTokenRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Access Token
|
||||
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
||||
* @param pinID The PinID to retrieve an access token for
|
||||
* @param xPlexClientIdentifier 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 serverURL Overrides the server URL.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTokenResponse getToken(
|
||||
String pinID,
|
||||
String xPlexClientIdentifier,
|
||||
java.util.Optional<String> serverURL) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenRequest
|
||||
.builder()
|
||||
.pinID(pinID)
|
||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
||||
.build();
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(GET_TOKEN_SERVERS[0], new java.util.HashMap<String, String>());
|
||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||
baseUrl = serverURL.get();
|
||||
}
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenRequest.class,
|
||||
baseUrl,
|
||||
"/pins/{pinID}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.Map<String, java.util.List<String>> headers = lukehagar.plexapi.plexapi.utils.Utils.getHeaders(request);
|
||||
if (headers != null) {
|
||||
for (java.util.Map.Entry<String, java.util.List<String>> header : headers.entrySet()) {
|
||||
for (String value : header.getValue()) {
|
||||
req.addHeader(header.getKey(), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = this.sdkConfiguration.defaultClient;
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTokenResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetTokenResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
534
src/main/java/lukehagar/plexapi/plexapi/PlexAPI.java
Normal file
534
src/main/java/lukehagar/plexapi/plexapi/PlexAPI.java
Normal file
@@ -0,0 +1,534 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.RetryConfig;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyHTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Plex-API: A Plex Media Server API Map
|
||||
* An Open API Spec for interacting with Plex.tv and Plex Servers
|
||||
*/
|
||||
public class PlexAPI {
|
||||
/**
|
||||
* SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] SERVERS = {
|
||||
/**
|
||||
* The full address of your Plex Server
|
||||
*/
|
||||
"{protocol}://{ip}:{port}",
|
||||
};
|
||||
|
||||
/**
|
||||
* Operations against the Plex Media Server System.
|
||||
*
|
||||
*/
|
||||
private final Server server;
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Media
|
||||
*
|
||||
*/
|
||||
private final Media media;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Videos
|
||||
*
|
||||
*/
|
||||
private final Video video;
|
||||
|
||||
/**
|
||||
* Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||
* Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
||||
* Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
|
||||
* - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
|
||||
* - They must contain an `type` which is used by clients to distinguish the specific activity.
|
||||
* - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
|
||||
* - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
|
||||
*
|
||||
*/
|
||||
private final Activities activities;
|
||||
|
||||
/**
|
||||
* Butler is the task manager of the Plex Media Server Ecosystem.
|
||||
*
|
||||
*/
|
||||
private final Butler butler;
|
||||
|
||||
/**
|
||||
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
||||
*
|
||||
*/
|
||||
private final Hubs hubs;
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server
|
||||
*
|
||||
*/
|
||||
private final Search search;
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Libraries
|
||||
*
|
||||
*/
|
||||
private final Library library;
|
||||
|
||||
/**
|
||||
* Submit logs to the Log Handler for Plex Media Server
|
||||
*
|
||||
*/
|
||||
private final Log log;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations directly against https://Plex.tv
|
||||
*
|
||||
*/
|
||||
private final Plex plex;
|
||||
|
||||
/**
|
||||
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||
* They can be organized in (optionally nesting) folders.
|
||||
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||
* This may cause the duration and number of items to change.
|
||||
*
|
||||
*/
|
||||
private final Playlists playlists;
|
||||
|
||||
/**
|
||||
* API Calls regarding authentication for Plex Media Server
|
||||
*
|
||||
*/
|
||||
private final Authentication authentication;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Statistics
|
||||
*
|
||||
*/
|
||||
private final Statistics statistics;
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server Sessions
|
||||
*
|
||||
*/
|
||||
private final Sessions sessions;
|
||||
|
||||
/**
|
||||
* This describes the API for searching and applying updates to the Plex Media Server.
|
||||
* Updates to the status can be observed via the Event API.
|
||||
*
|
||||
*/
|
||||
private final Updater updater;
|
||||
|
||||
/**
|
||||
* Operations against the Plex Media Server System.
|
||||
*
|
||||
*/
|
||||
public Server server() {
|
||||
return server;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Media
|
||||
*
|
||||
*/
|
||||
public Media media() {
|
||||
return media;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Videos
|
||||
*
|
||||
*/
|
||||
public Video video() {
|
||||
return video;
|
||||
}
|
||||
|
||||
/**
|
||||
* Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||
* Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
||||
* Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
|
||||
* - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
|
||||
* - They must contain an `type` which is used by clients to distinguish the specific activity.
|
||||
* - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
|
||||
* - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
|
||||
*
|
||||
*/
|
||||
public Activities activities() {
|
||||
return activities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Butler is the task manager of the Plex Media Server Ecosystem.
|
||||
*
|
||||
*/
|
||||
public Butler butler() {
|
||||
return butler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
||||
*
|
||||
*/
|
||||
public Hubs hubs() {
|
||||
return hubs;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server
|
||||
*
|
||||
*/
|
||||
public Search search() {
|
||||
return search;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Libraries
|
||||
*
|
||||
*/
|
||||
public Library library() {
|
||||
return library;
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit logs to the Log Handler for Plex Media Server
|
||||
*
|
||||
*/
|
||||
public Log log() {
|
||||
return log;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls that perform operations directly against https://Plex.tv
|
||||
*
|
||||
*/
|
||||
public Plex plex() {
|
||||
return plex;
|
||||
}
|
||||
|
||||
/**
|
||||
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||
* They can be organized in (optionally nesting) folders.
|
||||
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||
* This may cause the duration and number of items to change.
|
||||
*
|
||||
*/
|
||||
public Playlists playlists() {
|
||||
return playlists;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls regarding authentication for Plex Media Server
|
||||
*
|
||||
*/
|
||||
public Authentication authentication() {
|
||||
return authentication;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Statistics
|
||||
*
|
||||
*/
|
||||
public Statistics statistics() {
|
||||
return statistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server Sessions
|
||||
*
|
||||
*/
|
||||
public Sessions sessions() {
|
||||
return sessions;
|
||||
}
|
||||
|
||||
/**
|
||||
* This describes the API for searching and applying updates to the Plex Media Server.
|
||||
* Updates to the status can be observed via the Event API.
|
||||
*
|
||||
*/
|
||||
public Updater updater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
/**
|
||||
* The Builder class allows the configuration of a new instance of the SDK.
|
||||
*/
|
||||
public static class Builder {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration = new SDKConfiguration();
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the default HTTP client to be overridden with a custom implementation.
|
||||
*
|
||||
* @param client The HTTP client to use for all requests.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder client(HTTPClient client) {
|
||||
this.sdkConfiguration.defaultClient = client;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Configures the SDK security to use the provided secret.
|
||||
*
|
||||
* @param accessToken The secret to use for all requests.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder accessToken(String accessToken) {
|
||||
this.sdkConfiguration.securitySource = SecuritySource.of(lukehagar.plexapi.plexapi.models.shared.Security.builder()
|
||||
.accessToken(accessToken)
|
||||
.build());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the SDK to use a custom security source.
|
||||
* @param securitySource The security source to use for all requests.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder securitySource(SecuritySource securitySource) {
|
||||
this.sdkConfiguration.securitySource = securitySource;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the default server URL.
|
||||
*
|
||||
* @param serverUrl The server URL to use for all requests.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder serverURL(String serverUrl) {
|
||||
this.sdkConfiguration.serverUrl = serverUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the default server URL with a templated URL populated with the provided parameters.
|
||||
*
|
||||
* @param serverUrl The server URL to use for all requests.
|
||||
* @param params The parameters to use when templating the URL.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder serverURL(String serverUrl, java.util.Map<String, String> params) {
|
||||
this.sdkConfiguration.serverUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(serverUrl, params);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the default server by index.
|
||||
*
|
||||
* @param serverIdx The server to use for all requests.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder serverIndex(int serverIdx) {
|
||||
this.sdkConfiguration.serverIdx = serverIdx;
|
||||
this.sdkConfiguration.serverUrl = SERVERS[serverIdx];
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the default configuration for retries
|
||||
*
|
||||
* @param retryConfig The retry configuration to use for all requests.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder retryConfig(RetryConfig retryConfig) {
|
||||
this.sdkConfiguration.retryConfig = Optional.of(retryConfig);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* ServerProtocol - The protocol to use when connecting to your plex server.
|
||||
*/
|
||||
public enum ServerProtocol {
|
||||
HTTP("http"),
|
||||
HTTPS("https");
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
private ServerProtocol(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the protocol variable for url substitution.
|
||||
*
|
||||
* @param protocol The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder protocol(ServerProtocol protocol) {
|
||||
for (java.util.Map<String, String> server : this.sdkConfiguration.serverDefaults) {
|
||||
if (!server.containsKey("protocol")) {
|
||||
continue;
|
||||
}
|
||||
server.put("protocol", protocol.toString());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ip variable for url substitution.
|
||||
*
|
||||
* @param ip The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder ip(String ip) {
|
||||
for (java.util.Map<String, String> server : this.sdkConfiguration.serverDefaults) {
|
||||
if (!server.containsKey("ip")) {
|
||||
continue;
|
||||
}
|
||||
server.put("ip", ip.toString());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the port variable for url substitution.
|
||||
*
|
||||
* @param port The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder port(String port) {
|
||||
for (java.util.Map<String, String> server : this.sdkConfiguration.serverDefaults) {
|
||||
if (!server.containsKey("port")) {
|
||||
continue;
|
||||
}
|
||||
server.put("port", port.toString());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a new instance of the SDK.
|
||||
* @return The SDK instance.
|
||||
*/
|
||||
public PlexAPI build() {
|
||||
if (sdkConfiguration.defaultClient == null) {
|
||||
sdkConfiguration.defaultClient = new SpeakeasyHTTPClient();
|
||||
}
|
||||
if (sdkConfiguration.securitySource == null) {
|
||||
sdkConfiguration.securitySource = SecuritySource.of(null);
|
||||
}
|
||||
if (sdkConfiguration.serverUrl == null || sdkConfiguration.serverUrl.isBlank()) {
|
||||
sdkConfiguration.serverUrl = SERVERS[0];
|
||||
sdkConfiguration.serverIdx = 0;
|
||||
}
|
||||
if (sdkConfiguration.serverUrl.endsWith("/")) {
|
||||
sdkConfiguration.serverUrl = sdkConfiguration.serverUrl.substring(0, sdkConfiguration.serverUrl.length() - 1);
|
||||
}
|
||||
return new PlexAPI(sdkConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a new instance of the SDK builder to configure a new instance of the SDK.
|
||||
* @return The SDK builder instance.
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
private PlexAPI(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
this.server = new Server(sdkConfiguration);
|
||||
this.media = new Media(sdkConfiguration);
|
||||
this.video = new Video(sdkConfiguration);
|
||||
this.activities = new Activities(sdkConfiguration);
|
||||
this.butler = new Butler(sdkConfiguration);
|
||||
this.hubs = new Hubs(sdkConfiguration);
|
||||
this.search = new Search(sdkConfiguration);
|
||||
this.library = new Library(sdkConfiguration);
|
||||
this.log = new Log(sdkConfiguration);
|
||||
this.plex = new Plex(sdkConfiguration);
|
||||
this.playlists = new Playlists(sdkConfiguration);
|
||||
this.authentication = new Authentication(sdkConfiguration);
|
||||
this.statistics = new Statistics(sdkConfiguration);
|
||||
this.sessions = new Sessions(sdkConfiguration);
|
||||
this.updater = new Updater(sdkConfiguration);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.RetryConfig;
|
||||
import lukehagar.plexapi.plexapi.models.shared.Security;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
class SDKConfiguration {
|
||||
public SecuritySource securitySource;
|
||||
public HTTPClient defaultClient;
|
||||
public String serverUrl;
|
||||
public int serverIdx = 0;
|
||||
List<Map<String, String>> serverDefaults = new ArrayList<>(){{
|
||||
add(new HashMap<>(){{
|
||||
put("protocol", "http");
|
||||
put("ip", "10.10.10.47");
|
||||
put("port", "32400");
|
||||
}});
|
||||
}};
|
||||
public String language = "java";
|
||||
public String openapiDocVersion = "0.0.3";
|
||||
public String sdkVersion = "0.0.1";
|
||||
public String genVersion = "2.281.2";
|
||||
public String userAgent = "speakeasy-sdk/java 0.0.1 2.281.2 0.0.3 lukehagar.plexapi.plexapi";
|
||||
|
||||
|
||||
public Map<String, String> getServerVariableDefaults() {
|
||||
return serverDefaults.get(this.serverIdx);
|
||||
}
|
||||
public Optional<RetryConfig> retryConfig = Optional.empty();
|
||||
}
|
||||
313
src/main/java/lukehagar/plexapi/plexapi/Search.java
Normal file
313
src/main/java/lukehagar/plexapi/plexapi/Search.java
Normal file
@@ -0,0 +1,313 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server
|
||||
*
|
||||
*/
|
||||
public class Search implements
|
||||
MethodCallPerformSearch,
|
||||
MethodCallPerformVoiceSearch,
|
||||
MethodCallGetSearchResults {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Search(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.PerformSearchRequestBuilder performSearch() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.PerformSearchRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a search
|
||||
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
|
||||
*
|
||||
* In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
|
||||
*
|
||||
* - `reason`: The reason for the result, if not because of a direct search term match; can be either:
|
||||
* - `section`: There are multiple identical results from different sections.
|
||||
* - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).
|
||||
* - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor`
|
||||
* - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold").
|
||||
* - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID.
|
||||
*
|
||||
* This request is intended to be very fast, and called as the user types.
|
||||
*
|
||||
* @param query The query term
|
||||
* @param sectionId This gives context to the search, and can result in re-ordering of search result hubs
|
||||
* @param limit The number of items to return per hub
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse performSearch(
|
||||
String query,
|
||||
Optional<? extends Double> sectionId,
|
||||
Optional<? extends Double> limit) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchRequest
|
||||
.builder()
|
||||
.query(query)
|
||||
.sectionId(sectionId)
|
||||
.limit(limit)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/hubs/search");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformSearchResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.PerformSearchResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequestBuilder performVoiceSearch() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a voice search
|
||||
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
|
||||
* It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint.
|
||||
* Whenever possible, clients should limit the search to the appropriate type.
|
||||
* Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
|
||||
*
|
||||
* @param query The query term
|
||||
* @param sectionId This gives context to the search, and can result in re-ordering of search result hubs
|
||||
* @param limit The number of items to return per hub
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse performVoiceSearch(
|
||||
String query,
|
||||
Optional<? extends Double> sectionId,
|
||||
Optional<? extends Double> limit) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequest
|
||||
.builder()
|
||||
.query(query)
|
||||
.sectionId(sectionId)
|
||||
.limit(limit)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/hubs/search/voice");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequestBuilder getSearchResults() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Search Results
|
||||
* This will search the database for the string provided.
|
||||
* @param query The search query string to use
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse getSearchResults(
|
||||
String query) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequest
|
||||
.builder()
|
||||
.query(query)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/search");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSearchResultsSearchResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSearchResultsSearchResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
28
src/main/java/lukehagar/plexapi/plexapi/SecuritySource.java
Normal file
28
src/main/java/lukehagar/plexapi/plexapi/SecuritySource.java
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import lukehagar.plexapi.plexapi.models.shared.Security;
|
||||
|
||||
public interface SecuritySource {
|
||||
|
||||
Security getSecurity();
|
||||
|
||||
public static SecuritySource of(Security security) {
|
||||
return new DefaultSecuritySource(security);
|
||||
}
|
||||
|
||||
public static class DefaultSecuritySource implements SecuritySource {
|
||||
private Security security;
|
||||
|
||||
public DefaultSecuritySource(Security security) {
|
||||
this.security = security;
|
||||
}
|
||||
|
||||
public Security getSecurity() {
|
||||
return security;
|
||||
}
|
||||
}
|
||||
}
|
||||
628
src/main/java/lukehagar/plexapi/plexapi/Server.java
Normal file
628
src/main/java/lukehagar/plexapi/plexapi/Server.java
Normal file
@@ -0,0 +1,628 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* Operations against the Plex Media Server System.
|
||||
*
|
||||
*/
|
||||
public class Server implements
|
||||
MethodCallGetServerCapabilities,
|
||||
MethodCallGetServerPreferences,
|
||||
MethodCallGetAvailableClients,
|
||||
MethodCallGetDevices,
|
||||
MethodCallGetServerIdentity,
|
||||
MethodCallGetMyPlexAccount,
|
||||
MethodCallGetResizedPhoto,
|
||||
MethodCallGetServerList {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Server(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesRequestBuilder getServerCapabilities() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Server Capabilities
|
||||
* Server Capabilities
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse getServerCapabilitiesDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesRequestBuilder getServerPreferences() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server Preferences
|
||||
* Get Server Preferences
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse getServerPreferencesDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/:/prefs");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsRequestBuilder getAvailableClients() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Available Clients
|
||||
* Get Available Clients
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse getAvailableClientsDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/clients");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetDevicesRequestBuilder getDevices() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetDevicesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Devices
|
||||
* Get Devices
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse getDevicesDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/devices");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetDevicesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetDevicesResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetDevicesServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetDevicesServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerIdentityRequestBuilder getServerIdentity() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetServerIdentityRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server Identity
|
||||
* Get Server Identity
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse getServerIdentityDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/identity");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerIdentityServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerIdentityServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountRequestBuilder getMyPlexAccount() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get MyPlex Account
|
||||
* Returns MyPlex Account Information
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse getMyPlexAccountDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/myplex/account");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequestBuilder getResizedPhoto() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Resized Photo
|
||||
* Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
|
||||
*
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse getResizedPhoto(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequest request) throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/photo/:/transcode");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerListRequestBuilder getServerList() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetServerListRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server List
|
||||
* Get Server List
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetServerListResponse getServerListDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/servers");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerListResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerListResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerListResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerListResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerListResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetServerListServerResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetServerListServerResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
330
src/main/java/lukehagar/plexapi/plexapi/Sessions.java
Normal file
330
src/main/java/lukehagar/plexapi/plexapi/Sessions.java
Normal file
@@ -0,0 +1,330 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server Sessions
|
||||
*
|
||||
*/
|
||||
public class Sessions implements
|
||||
MethodCallGetSessions,
|
||||
MethodCallGetSessionHistory,
|
||||
MethodCallGetTranscodeSessions,
|
||||
MethodCallStopTranscodeSession {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Sessions(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSessionsRequestBuilder getSessions() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetSessionsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Active Sessions
|
||||
* This will retrieve the "Now Playing" Information of the PMS.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse getSessionsDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/status/sessions");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSessionsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionsSessionsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSessionsSessionsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryRequestBuilder getSessionHistory() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Session History
|
||||
* This will Retrieve a listing of all history views.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse getSessionHistoryDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/status/sessions/history/all");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetSessionHistorySessionsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetSessionHistorySessionsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsRequestBuilder getTranscodeSessions() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Transcode Sessions
|
||||
* Get Transcode Sessions
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse getTranscodeSessionsDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/transcode/sessions");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsSessionsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsSessionsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequestBuilder stopTranscodeSession() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop a Transcode Session
|
||||
* Stop a Transcode Session
|
||||
* @param sessionKey the Key of the transcode session to stop
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse stopTranscodeSession(
|
||||
String sessionKey) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequest
|
||||
.builder()
|
||||
.sessionKey(sessionKey)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequest.class,
|
||||
baseUrl,
|
||||
"/transcode/sessions/{sessionKey}",
|
||||
request, null);
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("DELETE");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 204 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
127
src/main/java/lukehagar/plexapi/plexapi/Statistics.java
Normal file
127
src/main/java/lukehagar/plexapi/plexapi/Statistics.java
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Statistics
|
||||
*
|
||||
*/
|
||||
public class Statistics implements
|
||||
MethodCallGetStatistics {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Statistics(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequestBuilder getStatistics() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Media Statistics
|
||||
* This will return the media statistics for the server
|
||||
* @param timespan The timespan to retrieve statistics for
|
||||
the exact meaning of this parameter is not known
|
||||
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse getStatistics(
|
||||
Optional<? extends Long> timespan) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequest
|
||||
.builder()
|
||||
.timespan(timespan)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/statistics/media");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetStatisticsStatisticsResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetStatisticsStatisticsResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
274
src/main/java/lukehagar/plexapi/plexapi/Updater.java
Normal file
274
src/main/java/lukehagar/plexapi/plexapi/Updater.java
Normal file
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* This describes the API for searching and applying updates to the Plex Media Server.
|
||||
* Updates to the status can be observed via the Event API.
|
||||
*
|
||||
*/
|
||||
public class Updater implements
|
||||
MethodCallGetUpdateStatus,
|
||||
MethodCallCheckForUpdates,
|
||||
MethodCallApplyUpdates {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Updater(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusRequestBuilder getUpdateStatus() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Querying status of updates
|
||||
* Querying status of updates
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse getUpdateStatusDirect() throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/updater/status");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponseBody>() {});
|
||||
res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
} else if (httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusUpdaterResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusUpdaterResponseBody>() {});
|
||||
res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequestBuilder checkForUpdates() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checking for updates
|
||||
* Checking for updates
|
||||
* @param download Indicate that you want to start download any updates found.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse checkForUpdates(
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.Download> download) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequest
|
||||
.builder()
|
||||
.download(download)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/updater/check");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("PUT");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequestBuilder applyUpdates() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Updates
|
||||
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
||||
*
|
||||
* @param tonight Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
* @param skip Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse applyUpdates(
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.Tonight> tonight,
|
||||
Optional<? extends lukehagar.plexapi.plexapi.models.operations.Skip> skip) throws Exception {
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequest request =
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequest
|
||||
.builder()
|
||||
.tonight(tonight)
|
||||
.skip(skip)
|
||||
.build();
|
||||
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/updater/apply");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("PUT");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400 || httpRes.statusCode() == 500) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
183
src/main/java/lukehagar/plexapi/plexapi/Video.java
Normal file
183
src/main/java/lukehagar/plexapi/plexapi/Video.java
Normal file
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPClient;
|
||||
import lukehagar.plexapi.plexapi.utils.HTTPRequest;
|
||||
import lukehagar.plexapi.plexapi.utils.JSON;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Videos
|
||||
*
|
||||
*/
|
||||
public class Video implements
|
||||
MethodCallGetTimeline,
|
||||
MethodCallStartUniversalTranscode {
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
|
||||
Video(SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
}
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTimelineRequestBuilder getTimeline() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.GetTimelineRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the timeline for a media item
|
||||
* Get the timeline for a media item
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse getTimeline(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTimelineRequest request) throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/:/timeline");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTimelineRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.GetTimelineResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.GetTimelineResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequestBuilder startUniversalTranscode() {
|
||||
return new lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start Universal Transcode
|
||||
* Begin a Universal Transcode Session
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @return The response from the API call.
|
||||
* @throws Exception if the API call fails.
|
||||
*/
|
||||
public lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse startUniversalTranscode(
|
||||
lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequest request) throws Exception {
|
||||
|
||||
String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(
|
||||
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||
|
||||
String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL(
|
||||
baseUrl,
|
||||
"/video/:/transcode/universal/start.mpd");
|
||||
|
||||
HTTPRequest req = new HTTPRequest();
|
||||
req.setMethod("GET");
|
||||
req.setURL(url);
|
||||
|
||||
req.addHeader("Accept", "application/json");
|
||||
req.addHeader("user-agent", this.sdkConfiguration.userAgent);
|
||||
|
||||
java.util.List<NameValuePair> queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams(
|
||||
lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequest.class, request, null);
|
||||
if (queryParams != null) {
|
||||
for (NameValuePair queryParam : queryParams) {
|
||||
req.addQueryParam(queryParam);
|
||||
}
|
||||
}
|
||||
|
||||
HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient(
|
||||
this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HttpResponse<InputStream> httpRes = client.send(req);
|
||||
|
||||
String contentType = httpRes
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse.Builder resBuilder =
|
||||
lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse
|
||||
.builder()
|
||||
.contentType(contentType)
|
||||
.statusCode(httpRes.statusCode())
|
||||
.rawResponse(httpRes);
|
||||
|
||||
lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse res = resBuilder.build();
|
||||
|
||||
res.withRawResponse(httpRes);
|
||||
|
||||
if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) {
|
||||
} else if (httpRes.statusCode() == 401) {
|
||||
if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) {
|
||||
ObjectMapper mapper = JSON.getMapper();
|
||||
lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponseBody out = mapper.readValue(
|
||||
Utils.toUtf8AndClose(httpRes.body()),
|
||||
new TypeReference<lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponseBody>() {});
|
||||
res.withObject(java.util.Optional.ofNullable(out));
|
||||
} else {
|
||||
throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body()));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.errors;
|
||||
|
||||
import java.net.http.HttpResponse;
|
||||
import java.io.InputStream;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* Thrown by a service call when an error response occurs. Contains details about the response.
|
||||
*/
|
||||
public class SDKError extends Exception {
|
||||
|
||||
private final HttpResponse<InputStream> rawResponse;
|
||||
private final int code;
|
||||
private final String message;
|
||||
private final byte[] body;
|
||||
|
||||
public SDKError(
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
int code,
|
||||
String message,
|
||||
byte[] body) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(body, "body");
|
||||
this.rawResponse = rawResponse;
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SDKError other = (SDKError) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.body, other.body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
rawResponse,
|
||||
code,
|
||||
message,
|
||||
body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(SDKError.class,
|
||||
"rawResponse", rawResponse,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"body", body);
|
||||
}
|
||||
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return this.rawResponse;
|
||||
}
|
||||
|
||||
public int code() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public String message() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public byte[] body() {
|
||||
return this.body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Account {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("id")
|
||||
private Optional<? extends Integer> id;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private Optional<? extends String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("name")
|
||||
private Optional<? extends String> name;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("defaultAudioLanguage")
|
||||
private Optional<? extends String> defaultAudioLanguage;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("autoSelectAudio")
|
||||
private Optional<? extends Boolean> autoSelectAudio;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("defaultSubtitleLanguage")
|
||||
private Optional<? extends String> defaultSubtitleLanguage;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("subtitleMode")
|
||||
private Optional<? extends Integer> subtitleMode;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("thumb")
|
||||
private Optional<? extends String> thumb;
|
||||
|
||||
public Account(
|
||||
@JsonProperty("id") Optional<? extends Integer> id,
|
||||
@JsonProperty("key") Optional<? extends String> key,
|
||||
@JsonProperty("name") Optional<? extends String> name,
|
||||
@JsonProperty("defaultAudioLanguage") Optional<? extends String> defaultAudioLanguage,
|
||||
@JsonProperty("autoSelectAudio") Optional<? extends Boolean> autoSelectAudio,
|
||||
@JsonProperty("defaultSubtitleLanguage") Optional<? extends String> defaultSubtitleLanguage,
|
||||
@JsonProperty("subtitleMode") Optional<? extends Integer> subtitleMode,
|
||||
@JsonProperty("thumb") Optional<? extends String> thumb) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(name, "name");
|
||||
Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage");
|
||||
Utils.checkNotNull(autoSelectAudio, "autoSelectAudio");
|
||||
Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage");
|
||||
Utils.checkNotNull(subtitleMode, "subtitleMode");
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.id = id;
|
||||
this.key = key;
|
||||
this.name = name;
|
||||
this.defaultAudioLanguage = defaultAudioLanguage;
|
||||
this.autoSelectAudio = autoSelectAudio;
|
||||
this.defaultSubtitleLanguage = defaultSubtitleLanguage;
|
||||
this.subtitleMode = subtitleMode;
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Optional<? extends String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public Optional<? extends String> name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Optional<? extends String> defaultAudioLanguage() {
|
||||
return defaultAudioLanguage;
|
||||
}
|
||||
|
||||
public Optional<? extends Boolean> autoSelectAudio() {
|
||||
return autoSelectAudio;
|
||||
}
|
||||
|
||||
public Optional<? extends String> defaultSubtitleLanguage() {
|
||||
return defaultSubtitleLanguage;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> subtitleMode() {
|
||||
return subtitleMode;
|
||||
}
|
||||
|
||||
public Optional<? extends String> thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Account withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = Optional.ofNullable(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withId(Optional<? extends Integer> id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withKey(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withName(String name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = Optional.ofNullable(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withName(Optional<? extends String> name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withDefaultAudioLanguage(String defaultAudioLanguage) {
|
||||
Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage");
|
||||
this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withDefaultAudioLanguage(Optional<? extends String> defaultAudioLanguage) {
|
||||
Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage");
|
||||
this.defaultAudioLanguage = defaultAudioLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withAutoSelectAudio(boolean autoSelectAudio) {
|
||||
Utils.checkNotNull(autoSelectAudio, "autoSelectAudio");
|
||||
this.autoSelectAudio = Optional.ofNullable(autoSelectAudio);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withAutoSelectAudio(Optional<? extends Boolean> autoSelectAudio) {
|
||||
Utils.checkNotNull(autoSelectAudio, "autoSelectAudio");
|
||||
this.autoSelectAudio = autoSelectAudio;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withDefaultSubtitleLanguage(String defaultSubtitleLanguage) {
|
||||
Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage");
|
||||
this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withDefaultSubtitleLanguage(Optional<? extends String> defaultSubtitleLanguage) {
|
||||
Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage");
|
||||
this.defaultSubtitleLanguage = defaultSubtitleLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withSubtitleMode(int subtitleMode) {
|
||||
Utils.checkNotNull(subtitleMode, "subtitleMode");
|
||||
this.subtitleMode = Optional.ofNullable(subtitleMode);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withSubtitleMode(Optional<? extends Integer> subtitleMode) {
|
||||
Utils.checkNotNull(subtitleMode, "subtitleMode");
|
||||
this.subtitleMode = subtitleMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account withThumb(Optional<? extends String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Account other = (Account) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.id, other.id) &&
|
||||
java.util.Objects.deepEquals(this.key, other.key) &&
|
||||
java.util.Objects.deepEquals(this.name, other.name) &&
|
||||
java.util.Objects.deepEquals(this.defaultAudioLanguage, other.defaultAudioLanguage) &&
|
||||
java.util.Objects.deepEquals(this.autoSelectAudio, other.autoSelectAudio) &&
|
||||
java.util.Objects.deepEquals(this.defaultSubtitleLanguage, other.defaultSubtitleLanguage) &&
|
||||
java.util.Objects.deepEquals(this.subtitleMode, other.subtitleMode) &&
|
||||
java.util.Objects.deepEquals(this.thumb, other.thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
id,
|
||||
key,
|
||||
name,
|
||||
defaultAudioLanguage,
|
||||
autoSelectAudio,
|
||||
defaultSubtitleLanguage,
|
||||
subtitleMode,
|
||||
thumb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Account.class,
|
||||
"id", id,
|
||||
"key", key,
|
||||
"name", name,
|
||||
"defaultAudioLanguage", defaultAudioLanguage,
|
||||
"autoSelectAudio", autoSelectAudio,
|
||||
"defaultSubtitleLanguage", defaultSubtitleLanguage,
|
||||
"subtitleMode", subtitleMode,
|
||||
"thumb", thumb);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Integer> id = Optional.empty();
|
||||
|
||||
private Optional<? extends String> key = Optional.empty();
|
||||
|
||||
private Optional<? extends String> name = Optional.empty();
|
||||
|
||||
private Optional<? extends String> defaultAudioLanguage = Optional.empty();
|
||||
|
||||
private Optional<? extends Boolean> autoSelectAudio = Optional.empty();
|
||||
|
||||
private Optional<? extends String> defaultSubtitleLanguage = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> subtitleMode = Optional.empty();
|
||||
|
||||
private Optional<? extends String> thumb = Optional.empty();
|
||||
|
||||
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<? extends Integer> id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder name(String name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = Optional.ofNullable(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder name(Optional<? extends String> name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder defaultAudioLanguage(String defaultAudioLanguage) {
|
||||
Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage");
|
||||
this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder defaultAudioLanguage(Optional<? extends String> defaultAudioLanguage) {
|
||||
Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage");
|
||||
this.defaultAudioLanguage = defaultAudioLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder autoSelectAudio(boolean autoSelectAudio) {
|
||||
Utils.checkNotNull(autoSelectAudio, "autoSelectAudio");
|
||||
this.autoSelectAudio = Optional.ofNullable(autoSelectAudio);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder autoSelectAudio(Optional<? extends Boolean> autoSelectAudio) {
|
||||
Utils.checkNotNull(autoSelectAudio, "autoSelectAudio");
|
||||
this.autoSelectAudio = autoSelectAudio;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder defaultSubtitleLanguage(String defaultSubtitleLanguage) {
|
||||
Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage");
|
||||
this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder defaultSubtitleLanguage(Optional<? extends String> defaultSubtitleLanguage) {
|
||||
Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage");
|
||||
this.defaultSubtitleLanguage = defaultSubtitleLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subtitleMode(int subtitleMode) {
|
||||
Utils.checkNotNull(subtitleMode, "subtitleMode");
|
||||
this.subtitleMode = Optional.ofNullable(subtitleMode);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subtitleMode(Optional<? extends Integer> subtitleMode) {
|
||||
Utils.checkNotNull(subtitleMode, "subtitleMode");
|
||||
this.subtitleMode = subtitleMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = Optional.ofNullable(thumb);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder thumb(Optional<? extends String> thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Account build() {
|
||||
return new Account(
|
||||
id,
|
||||
key,
|
||||
name,
|
||||
defaultAudioLanguage,
|
||||
autoSelectAudio,
|
||||
defaultSubtitleLanguage,
|
||||
subtitleMode,
|
||||
thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Activity {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("uuid")
|
||||
private Optional<? extends String> uuid;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("type")
|
||||
private Optional<? extends String> type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("cancellable")
|
||||
private Optional<? extends Boolean> cancellable;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("userID")
|
||||
private Optional<? extends Double> userID;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("subtitle")
|
||||
private Optional<? extends String> subtitle;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("progress")
|
||||
private Optional<? extends Double> progress;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Context")
|
||||
private Optional<? extends Context> context;
|
||||
|
||||
public Activity(
|
||||
@JsonProperty("uuid") Optional<? extends String> uuid,
|
||||
@JsonProperty("type") Optional<? extends String> type,
|
||||
@JsonProperty("cancellable") Optional<? extends Boolean> cancellable,
|
||||
@JsonProperty("userID") Optional<? extends Double> userID,
|
||||
@JsonProperty("title") Optional<? extends String> title,
|
||||
@JsonProperty("subtitle") Optional<? extends String> subtitle,
|
||||
@JsonProperty("progress") Optional<? extends Double> progress,
|
||||
@JsonProperty("Context") Optional<? extends Context> context) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(cancellable, "cancellable");
|
||||
Utils.checkNotNull(userID, "userID");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(subtitle, "subtitle");
|
||||
Utils.checkNotNull(progress, "progress");
|
||||
Utils.checkNotNull(context, "context");
|
||||
this.uuid = uuid;
|
||||
this.type = type;
|
||||
this.cancellable = cancellable;
|
||||
this.userID = userID;
|
||||
this.title = title;
|
||||
this.subtitle = subtitle;
|
||||
this.progress = progress;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public Optional<? extends String> uuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public Optional<? extends String> type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Optional<? extends Boolean> cancellable() {
|
||||
return cancellable;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> userID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Optional<? extends String> subtitle() {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> progress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public Optional<? extends Context> context() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Activity withUuid(String uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = Optional.ofNullable(uuid);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withUuid(Optional<? extends String> uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withType(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withCancellable(boolean cancellable) {
|
||||
Utils.checkNotNull(cancellable, "cancellable");
|
||||
this.cancellable = Optional.ofNullable(cancellable);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withCancellable(Optional<? extends Boolean> cancellable) {
|
||||
Utils.checkNotNull(cancellable, "cancellable");
|
||||
this.cancellable = cancellable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withUserID(double userID) {
|
||||
Utils.checkNotNull(userID, "userID");
|
||||
this.userID = Optional.ofNullable(userID);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withUserID(Optional<? extends Double> userID) {
|
||||
Utils.checkNotNull(userID, "userID");
|
||||
this.userID = userID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withTitle(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withSubtitle(String subtitle) {
|
||||
Utils.checkNotNull(subtitle, "subtitle");
|
||||
this.subtitle = Optional.ofNullable(subtitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withSubtitle(Optional<? extends String> subtitle) {
|
||||
Utils.checkNotNull(subtitle, "subtitle");
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withProgress(double progress) {
|
||||
Utils.checkNotNull(progress, "progress");
|
||||
this.progress = Optional.ofNullable(progress);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withProgress(Optional<? extends Double> progress) {
|
||||
Utils.checkNotNull(progress, "progress");
|
||||
this.progress = progress;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withContext(Context context) {
|
||||
Utils.checkNotNull(context, "context");
|
||||
this.context = Optional.ofNullable(context);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity withContext(Optional<? extends Context> context) {
|
||||
Utils.checkNotNull(context, "context");
|
||||
this.context = context;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Activity other = (Activity) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.uuid, other.uuid) &&
|
||||
java.util.Objects.deepEquals(this.type, other.type) &&
|
||||
java.util.Objects.deepEquals(this.cancellable, other.cancellable) &&
|
||||
java.util.Objects.deepEquals(this.userID, other.userID) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.subtitle, other.subtitle) &&
|
||||
java.util.Objects.deepEquals(this.progress, other.progress) &&
|
||||
java.util.Objects.deepEquals(this.context, other.context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
uuid,
|
||||
type,
|
||||
cancellable,
|
||||
userID,
|
||||
title,
|
||||
subtitle,
|
||||
progress,
|
||||
context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Activity.class,
|
||||
"uuid", uuid,
|
||||
"type", type,
|
||||
"cancellable", cancellable,
|
||||
"userID", userID,
|
||||
"title", title,
|
||||
"subtitle", subtitle,
|
||||
"progress", progress,
|
||||
"context", context);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> uuid = Optional.empty();
|
||||
|
||||
private Optional<? extends String> type = Optional.empty();
|
||||
|
||||
private Optional<? extends Boolean> cancellable = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> userID = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Optional<? extends String> subtitle = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> progress = Optional.empty();
|
||||
|
||||
private Optional<? extends Context> context = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder uuid(String uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = Optional.ofNullable(uuid);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder uuid(Optional<? extends String> uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder cancellable(boolean cancellable) {
|
||||
Utils.checkNotNull(cancellable, "cancellable");
|
||||
this.cancellable = Optional.ofNullable(cancellable);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder cancellable(Optional<? extends Boolean> cancellable) {
|
||||
Utils.checkNotNull(cancellable, "cancellable");
|
||||
this.cancellable = cancellable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder userID(double userID) {
|
||||
Utils.checkNotNull(userID, "userID");
|
||||
this.userID = Optional.ofNullable(userID);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder userID(Optional<? extends Double> userID) {
|
||||
Utils.checkNotNull(userID, "userID");
|
||||
this.userID = userID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subtitle(String subtitle) {
|
||||
Utils.checkNotNull(subtitle, "subtitle");
|
||||
this.subtitle = Optional.ofNullable(subtitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder subtitle(Optional<? extends String> subtitle) {
|
||||
Utils.checkNotNull(subtitle, "subtitle");
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder progress(double progress) {
|
||||
Utils.checkNotNull(progress, "progress");
|
||||
this.progress = Optional.ofNullable(progress);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder progress(Optional<? extends Double> progress) {
|
||||
Utils.checkNotNull(progress, "progress");
|
||||
this.progress = progress;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder context(Context context) {
|
||||
Utils.checkNotNull(context, "context");
|
||||
this.context = Optional.ofNullable(context);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder context(Optional<? extends Context> context) {
|
||||
Utils.checkNotNull(context, "context");
|
||||
this.context = context;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Activity build() {
|
||||
return new Activity(
|
||||
uuid,
|
||||
type,
|
||||
cancellable,
|
||||
userID,
|
||||
title,
|
||||
subtitle,
|
||||
progress,
|
||||
context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class AddPlaylistContentsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public AddPlaylistContentsErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsErrors other = (AddPlaylistContentsErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors build() {
|
||||
return new AddPlaylistContentsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class AddPlaylistContentsMediaContainer {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<? extends Integer> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("leafCountAdded")
|
||||
private Optional<? extends Integer> leafCountAdded;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("leafCountRequested")
|
||||
private Optional<? extends Integer> leafCountRequested;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Metadata")
|
||||
private Optional<? extends java.util.List<AddPlaylistContentsMetadata>> metadata;
|
||||
|
||||
public AddPlaylistContentsMediaContainer(
|
||||
@JsonProperty("size") Optional<? extends Integer> size,
|
||||
@JsonProperty("leafCountAdded") Optional<? extends Integer> leafCountAdded,
|
||||
@JsonProperty("leafCountRequested") Optional<? extends Integer> leafCountRequested,
|
||||
@JsonProperty("Metadata") Optional<? extends java.util.List<AddPlaylistContentsMetadata>> metadata) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(leafCountAdded, "leafCountAdded");
|
||||
Utils.checkNotNull(leafCountRequested, "leafCountRequested");
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.size = size;
|
||||
this.leafCountAdded = leafCountAdded;
|
||||
this.leafCountRequested = leafCountRequested;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> leafCountAdded() {
|
||||
return leafCountAdded;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> leafCountRequested() {
|
||||
return leafCountRequested;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<AddPlaylistContentsMetadata>> metadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withSize(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withSize(Optional<? extends Integer> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withLeafCountAdded(int leafCountAdded) {
|
||||
Utils.checkNotNull(leafCountAdded, "leafCountAdded");
|
||||
this.leafCountAdded = Optional.ofNullable(leafCountAdded);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withLeafCountAdded(Optional<? extends Integer> leafCountAdded) {
|
||||
Utils.checkNotNull(leafCountAdded, "leafCountAdded");
|
||||
this.leafCountAdded = leafCountAdded;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withLeafCountRequested(int leafCountRequested) {
|
||||
Utils.checkNotNull(leafCountRequested, "leafCountRequested");
|
||||
this.leafCountRequested = Optional.ofNullable(leafCountRequested);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withLeafCountRequested(Optional<? extends Integer> leafCountRequested) {
|
||||
Utils.checkNotNull(leafCountRequested, "leafCountRequested");
|
||||
this.leafCountRequested = leafCountRequested;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withMetadata(java.util.List<AddPlaylistContentsMetadata> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = Optional.ofNullable(metadata);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer withMetadata(Optional<? extends java.util.List<AddPlaylistContentsMetadata>> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsMediaContainer other = (AddPlaylistContentsMediaContainer) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.size, other.size) &&
|
||||
java.util.Objects.deepEquals(this.leafCountAdded, other.leafCountAdded) &&
|
||||
java.util.Objects.deepEquals(this.leafCountRequested, other.leafCountRequested) &&
|
||||
java.util.Objects.deepEquals(this.metadata, other.metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
size,
|
||||
leafCountAdded,
|
||||
leafCountRequested,
|
||||
metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsMediaContainer.class,
|
||||
"size", size,
|
||||
"leafCountAdded", leafCountAdded,
|
||||
"leafCountRequested", leafCountRequested,
|
||||
"metadata", metadata);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Integer> size = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> leafCountAdded = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> leafCountRequested = Optional.empty();
|
||||
|
||||
private Optional<? extends java.util.List<AddPlaylistContentsMetadata>> metadata = 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<? extends Integer> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCountAdded(int leafCountAdded) {
|
||||
Utils.checkNotNull(leafCountAdded, "leafCountAdded");
|
||||
this.leafCountAdded = Optional.ofNullable(leafCountAdded);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCountAdded(Optional<? extends Integer> leafCountAdded) {
|
||||
Utils.checkNotNull(leafCountAdded, "leafCountAdded");
|
||||
this.leafCountAdded = leafCountAdded;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCountRequested(int leafCountRequested) {
|
||||
Utils.checkNotNull(leafCountRequested, "leafCountRequested");
|
||||
this.leafCountRequested = Optional.ofNullable(leafCountRequested);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCountRequested(Optional<? extends Integer> leafCountRequested) {
|
||||
Utils.checkNotNull(leafCountRequested, "leafCountRequested");
|
||||
this.leafCountRequested = leafCountRequested;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metadata(java.util.List<AddPlaylistContentsMetadata> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = Optional.ofNullable(metadata);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metadata(Optional<? extends java.util.List<AddPlaylistContentsMetadata>> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMediaContainer build() {
|
||||
return new AddPlaylistContentsMediaContainer(
|
||||
size,
|
||||
leafCountAdded,
|
||||
leafCountRequested,
|
||||
metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,595 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class AddPlaylistContentsMetadata {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("ratingKey")
|
||||
private Optional<? extends String> ratingKey;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private Optional<? extends String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("guid")
|
||||
private Optional<? extends String> guid;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("type")
|
||||
private Optional<? extends String> type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("summary")
|
||||
private Optional<? extends String> summary;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("smart")
|
||||
private Optional<? extends Boolean> smart;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("playlistType")
|
||||
private Optional<? extends String> playlistType;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("composite")
|
||||
private Optional<? extends String> composite;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("duration")
|
||||
private Optional<? extends Integer> duration;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("leafCount")
|
||||
private Optional<? extends Integer> leafCount;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("addedAt")
|
||||
private Optional<? extends Integer> addedAt;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("updatedAt")
|
||||
private Optional<? extends Integer> updatedAt;
|
||||
|
||||
public AddPlaylistContentsMetadata(
|
||||
@JsonProperty("ratingKey") Optional<? extends String> ratingKey,
|
||||
@JsonProperty("key") Optional<? extends String> key,
|
||||
@JsonProperty("guid") Optional<? extends String> guid,
|
||||
@JsonProperty("type") Optional<? extends String> type,
|
||||
@JsonProperty("title") Optional<? extends String> title,
|
||||
@JsonProperty("summary") Optional<? extends String> summary,
|
||||
@JsonProperty("smart") Optional<? extends Boolean> smart,
|
||||
@JsonProperty("playlistType") Optional<? extends String> playlistType,
|
||||
@JsonProperty("composite") Optional<? extends String> composite,
|
||||
@JsonProperty("duration") Optional<? extends Integer> duration,
|
||||
@JsonProperty("leafCount") Optional<? extends Integer> leafCount,
|
||||
@JsonProperty("addedAt") Optional<? extends Integer> addedAt,
|
||||
@JsonProperty("updatedAt") Optional<? extends Integer> updatedAt) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.ratingKey = ratingKey;
|
||||
this.key = key;
|
||||
this.guid = guid;
|
||||
this.type = type;
|
||||
this.title = title;
|
||||
this.summary = summary;
|
||||
this.smart = smart;
|
||||
this.playlistType = playlistType;
|
||||
this.composite = composite;
|
||||
this.duration = duration;
|
||||
this.leafCount = leafCount;
|
||||
this.addedAt = addedAt;
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Optional<? extends String> ratingKey() {
|
||||
return ratingKey;
|
||||
}
|
||||
|
||||
public Optional<? extends String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public Optional<? extends String> guid() {
|
||||
return guid;
|
||||
}
|
||||
|
||||
public Optional<? extends String> type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Optional<? extends String> summary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public Optional<? extends Boolean> smart() {
|
||||
return smart;
|
||||
}
|
||||
|
||||
public Optional<? extends String> playlistType() {
|
||||
return playlistType;
|
||||
}
|
||||
|
||||
public Optional<? extends String> composite() {
|
||||
return composite;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> duration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> leafCount() {
|
||||
return leafCount;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> addedAt() {
|
||||
return addedAt;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> updatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withRatingKey(String ratingKey) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
this.ratingKey = Optional.ofNullable(ratingKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withRatingKey(Optional<? extends String> ratingKey) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
this.ratingKey = ratingKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withKey(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withGuid(String guid) {
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
this.guid = Optional.ofNullable(guid);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withGuid(Optional<? extends String> guid) {
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
this.guid = guid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withType(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withTitle(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withSummary(String summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = Optional.ofNullable(summary);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withSummary(Optional<? extends String> summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = summary;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withSmart(boolean smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = Optional.ofNullable(smart);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withSmart(Optional<? extends Boolean> smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = smart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withPlaylistType(String playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = Optional.ofNullable(playlistType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withPlaylistType(Optional<? extends String> playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = playlistType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withComposite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = Optional.ofNullable(composite);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withComposite(Optional<? extends String> composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withDuration(int duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = Optional.ofNullable(duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withDuration(Optional<? extends Integer> duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withLeafCount(int leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = Optional.ofNullable(leafCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withLeafCount(Optional<? extends Integer> leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = leafCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withAddedAt(int addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = Optional.ofNullable(addedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withAddedAt(Optional<? extends Integer> addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = addedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withUpdatedAt(int updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = Optional.ofNullable(updatedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata withUpdatedAt(Optional<? extends Integer> updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = updatedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsMetadata other = (AddPlaylistContentsMetadata) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) &&
|
||||
java.util.Objects.deepEquals(this.key, other.key) &&
|
||||
java.util.Objects.deepEquals(this.guid, other.guid) &&
|
||||
java.util.Objects.deepEquals(this.type, other.type) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.summary, other.summary) &&
|
||||
java.util.Objects.deepEquals(this.smart, other.smart) &&
|
||||
java.util.Objects.deepEquals(this.playlistType, other.playlistType) &&
|
||||
java.util.Objects.deepEquals(this.composite, other.composite) &&
|
||||
java.util.Objects.deepEquals(this.duration, other.duration) &&
|
||||
java.util.Objects.deepEquals(this.leafCount, other.leafCount) &&
|
||||
java.util.Objects.deepEquals(this.addedAt, other.addedAt) &&
|
||||
java.util.Objects.deepEquals(this.updatedAt, other.updatedAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
ratingKey,
|
||||
key,
|
||||
guid,
|
||||
type,
|
||||
title,
|
||||
summary,
|
||||
smart,
|
||||
playlistType,
|
||||
composite,
|
||||
duration,
|
||||
leafCount,
|
||||
addedAt,
|
||||
updatedAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsMetadata.class,
|
||||
"ratingKey", ratingKey,
|
||||
"key", key,
|
||||
"guid", guid,
|
||||
"type", type,
|
||||
"title", title,
|
||||
"summary", summary,
|
||||
"smart", smart,
|
||||
"playlistType", playlistType,
|
||||
"composite", composite,
|
||||
"duration", duration,
|
||||
"leafCount", leafCount,
|
||||
"addedAt", addedAt,
|
||||
"updatedAt", updatedAt);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> ratingKey = Optional.empty();
|
||||
|
||||
private Optional<? extends String> key = Optional.empty();
|
||||
|
||||
private Optional<? extends String> guid = Optional.empty();
|
||||
|
||||
private Optional<? extends String> type = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Optional<? extends String> summary = Optional.empty();
|
||||
|
||||
private Optional<? extends Boolean> smart = Optional.empty();
|
||||
|
||||
private Optional<? extends String> playlistType = Optional.empty();
|
||||
|
||||
private Optional<? extends String> composite = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> duration = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> leafCount = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> addedAt = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> updatedAt = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder ratingKey(String ratingKey) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
this.ratingKey = Optional.ofNullable(ratingKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder ratingKey(Optional<? extends 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<? extends 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<? extends String> guid) {
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
this.guid = guid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends 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<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder summary(String summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = Optional.ofNullable(summary);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder summary(Optional<? extends String> summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = summary;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder smart(boolean smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = Optional.ofNullable(smart);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder smart(Optional<? extends Boolean> smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = smart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder playlistType(String playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = Optional.ofNullable(playlistType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder playlistType(Optional<? extends String> playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = playlistType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder composite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = Optional.ofNullable(composite);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder composite(Optional<? extends String> composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder duration(int duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = Optional.ofNullable(duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder duration(Optional<? extends Integer> duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCount(int leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = Optional.ofNullable(leafCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCount(Optional<? extends Integer> leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = leafCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addedAt(int addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = Optional.ofNullable(addedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addedAt(Optional<? extends Integer> addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = addedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder updatedAt(int updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = Optional.ofNullable(updatedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder updatedAt(Optional<? extends Integer> updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = updatedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsMetadata build() {
|
||||
return new AddPlaylistContentsMetadata(
|
||||
ratingKey,
|
||||
key,
|
||||
guid,
|
||||
type,
|
||||
title,
|
||||
summary,
|
||||
smart,
|
||||
playlistType,
|
||||
composite,
|
||||
duration,
|
||||
leafCount,
|
||||
addedAt,
|
||||
updatedAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* AddPlaylistContentsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class AddPlaylistContentsPlaylistsResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<AddPlaylistContentsErrors>> errors;
|
||||
|
||||
public AddPlaylistContentsPlaylistsResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<AddPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<AddPlaylistContentsErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsResponseBody withErrors(java.util.List<AddPlaylistContentsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsResponseBody withErrors(Optional<? extends java.util.List<AddPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsPlaylistsResponseBody other = (AddPlaylistContentsPlaylistsResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsPlaylistsResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<AddPlaylistContentsErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<AddPlaylistContentsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<AddPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsResponseBody build() {
|
||||
return new AddPlaylistContentsPlaylistsResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class AddPlaylistContentsRequest {
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID")
|
||||
private double playlistID;
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* the play queue to add to a playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID")
|
||||
private Optional<? extends Double> playQueueID;
|
||||
|
||||
public AddPlaylistContentsRequest(
|
||||
double playlistID,
|
||||
String uri,
|
||||
Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playlistID = playlistID;
|
||||
this.uri = uri;
|
||||
this.playQueueID = playQueueID;
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public double playlistID() {
|
||||
return playlistID;
|
||||
}
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
public String uri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to add to a playlist
|
||||
*/
|
||||
public Optional<? extends Double> playQueueID() {
|
||||
return playQueueID;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public AddPlaylistContentsRequest withPlaylistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
public AddPlaylistContentsRequest withUri(String uri) {
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
this.uri = uri;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to add to a playlist
|
||||
*/
|
||||
public AddPlaylistContentsRequest withPlayQueueID(double playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = Optional.ofNullable(playQueueID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to add to a playlist
|
||||
*/
|
||||
public AddPlaylistContentsRequest withPlayQueueID(Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = playQueueID;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsRequest other = (AddPlaylistContentsRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.playlistID, other.playlistID) &&
|
||||
java.util.Objects.deepEquals(this.uri, other.uri) &&
|
||||
java.util.Objects.deepEquals(this.playQueueID, other.playQueueID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
playlistID,
|
||||
uri,
|
||||
playQueueID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsRequest.class,
|
||||
"playlistID", playlistID,
|
||||
"uri", uri,
|
||||
"playQueueID", playQueueID);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Double playlistID;
|
||||
|
||||
private String uri;
|
||||
|
||||
private Optional<? extends Double> playQueueID = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public Builder playlistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
public Builder uri(String uri) {
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
this.uri = uri;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to add to a playlist
|
||||
*/
|
||||
public Builder playQueueID(double playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = Optional.ofNullable(playQueueID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to add to a playlist
|
||||
*/
|
||||
public Builder playQueueID(Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = playQueueID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequest build() {
|
||||
return new AddPlaylistContentsRequest(
|
||||
playlistID,
|
||||
uri,
|
||||
playQueueID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class AddPlaylistContentsRequestBuilder {
|
||||
|
||||
private Double playlistID;
|
||||
private String uri;
|
||||
private Optional<? extends Double> playQueueID = Optional.empty();
|
||||
private final SDKMethodInterfaces.MethodCallAddPlaylistContents sdk;
|
||||
|
||||
public AddPlaylistContentsRequestBuilder(SDKMethodInterfaces.MethodCallAddPlaylistContents sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequestBuilder playlistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequestBuilder uri(String uri) {
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
this.uri = uri;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequestBuilder playQueueID(double playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = Optional.of(playQueueID);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequestBuilder playQueueID(Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = playQueueID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponse call() throws Exception {
|
||||
|
||||
return sdk.addPlaylistContents(
|
||||
playlistID,
|
||||
uri,
|
||||
playQueueID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class AddPlaylistContentsResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Playlist Updated
|
||||
*/
|
||||
private Optional<? extends AddPlaylistContentsResponseBody> twoHundredApplicationJsonObject;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends AddPlaylistContentsPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject;
|
||||
|
||||
public AddPlaylistContentsResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends AddPlaylistContentsResponseBody> twoHundredApplicationJsonObject,
|
||||
Optional<? extends AddPlaylistContentsPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Playlist Updated
|
||||
*/
|
||||
public Optional<? extends AddPlaylistContentsResponseBody> twoHundredApplicationJsonObject() {
|
||||
return twoHundredApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends AddPlaylistContentsPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject() {
|
||||
return fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public AddPlaylistContentsResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public AddPlaylistContentsResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public AddPlaylistContentsResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Playlist Updated
|
||||
*/
|
||||
public AddPlaylistContentsResponse withTwoHundredApplicationJsonObject(AddPlaylistContentsResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Playlist Updated
|
||||
*/
|
||||
public AddPlaylistContentsResponse withTwoHundredApplicationJsonObject(Optional<? extends AddPlaylistContentsResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public AddPlaylistContentsResponse withFourHundredAndOneApplicationJsonObject(AddPlaylistContentsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public AddPlaylistContentsResponse withFourHundredAndOneApplicationJsonObject(Optional<? extends AddPlaylistContentsPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsResponse other = (AddPlaylistContentsResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) &&
|
||||
java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"twoHundredApplicationJsonObject", twoHundredApplicationJsonObject,
|
||||
"fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends AddPlaylistContentsResponseBody> twoHundredApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Optional<? extends AddPlaylistContentsPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Playlist Updated
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(AddPlaylistContentsResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Playlist Updated
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(Optional<? extends AddPlaylistContentsResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(AddPlaylistContentsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(Optional<? extends AddPlaylistContentsPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponse build() {
|
||||
return new AddPlaylistContentsResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* AddPlaylistContentsResponseBody - Playlist Updated
|
||||
*/
|
||||
|
||||
public class AddPlaylistContentsResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("MediaContainer")
|
||||
private Optional<? extends AddPlaylistContentsMediaContainer> mediaContainer;
|
||||
|
||||
public AddPlaylistContentsResponseBody(
|
||||
@JsonProperty("MediaContainer") Optional<? extends AddPlaylistContentsMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
}
|
||||
|
||||
public Optional<? extends AddPlaylistContentsMediaContainer> mediaContainer() {
|
||||
return mediaContainer;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody withMediaContainer(AddPlaylistContentsMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody withMediaContainer(Optional<? extends AddPlaylistContentsMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsResponseBody other = (AddPlaylistContentsResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
mediaContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsResponseBody.class,
|
||||
"mediaContainer", mediaContainer);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends AddPlaylistContentsMediaContainer> mediaContainer = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder mediaContainer(AddPlaylistContentsMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder mediaContainer(Optional<? extends AddPlaylistContentsMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody build() {
|
||||
return new AddPlaylistContentsResponseBody(
|
||||
mediaContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ApplyUpdatesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public ApplyUpdatesErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesErrors other = (ApplyUpdatesErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors build() {
|
||||
return new ApplyUpdatesErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ApplyUpdatesRequest {
|
||||
|
||||
/**
|
||||
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=tonight")
|
||||
private Optional<? extends Tonight> tonight;
|
||||
|
||||
/**
|
||||
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=skip")
|
||||
private Optional<? extends Skip> skip;
|
||||
|
||||
public ApplyUpdatesRequest(
|
||||
Optional<? extends Tonight> tonight,
|
||||
Optional<? extends Skip> skip) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.tonight = tonight;
|
||||
this.skip = skip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
*/
|
||||
public Optional<? extends Tonight> tonight() {
|
||||
return tonight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
*/
|
||||
public Optional<? extends Skip> skip() {
|
||||
return skip;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
*/
|
||||
public ApplyUpdatesRequest withTonight(Tonight tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = Optional.ofNullable(tonight);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
*/
|
||||
public ApplyUpdatesRequest withTonight(Optional<? extends Tonight> tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = tonight;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
*/
|
||||
public ApplyUpdatesRequest withSkip(Skip skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = Optional.ofNullable(skip);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
*/
|
||||
public ApplyUpdatesRequest withSkip(Optional<? extends Skip> skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = skip;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesRequest other = (ApplyUpdatesRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.tonight, other.tonight) &&
|
||||
java.util.Objects.deepEquals(this.skip, other.skip);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
tonight,
|
||||
skip);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesRequest.class,
|
||||
"tonight", tonight,
|
||||
"skip", skip);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Tonight> tonight = Optional.empty();
|
||||
|
||||
private Optional<? extends Skip> skip = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
*/
|
||||
public Builder tonight(Tonight tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = Optional.ofNullable(tonight);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
*/
|
||||
public Builder tonight(Optional<? extends Tonight> tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = tonight;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
*/
|
||||
public Builder skip(Skip skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = Optional.ofNullable(skip);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
*/
|
||||
public Builder skip(Optional<? extends Skip> skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = skip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequest build() {
|
||||
return new ApplyUpdatesRequest(
|
||||
tonight,
|
||||
skip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class ApplyUpdatesRequestBuilder {
|
||||
|
||||
private Optional<? extends Tonight> tonight = Optional.empty();
|
||||
private Optional<? extends Skip> skip = Optional.empty();
|
||||
private final SDKMethodInterfaces.MethodCallApplyUpdates sdk;
|
||||
|
||||
public ApplyUpdatesRequestBuilder(SDKMethodInterfaces.MethodCallApplyUpdates sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder tonight(Tonight tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = Optional.of(tonight);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder tonight(Optional<? extends Tonight> tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = tonight;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder skip(Skip skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = Optional.of(skip);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder skip(Optional<? extends Skip> skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = skip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponse call() throws Exception {
|
||||
|
||||
return sdk.applyUpdates(
|
||||
tonight,
|
||||
skip);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ApplyUpdatesResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends ApplyUpdatesResponseBody> object;
|
||||
|
||||
public ApplyUpdatesResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends ApplyUpdatesResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends ApplyUpdatesResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public ApplyUpdatesResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public ApplyUpdatesResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ApplyUpdatesResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public ApplyUpdatesResponse withObject(ApplyUpdatesResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public ApplyUpdatesResponse withObject(Optional<? extends ApplyUpdatesResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesResponse other = (ApplyUpdatesResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends ApplyUpdatesResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(ApplyUpdatesResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends ApplyUpdatesResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponse build() {
|
||||
return new ApplyUpdatesResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* ApplyUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class ApplyUpdatesResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<ApplyUpdatesErrors>> errors;
|
||||
|
||||
public ApplyUpdatesResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<ApplyUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<ApplyUpdatesErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody withErrors(java.util.List<ApplyUpdatesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody withErrors(Optional<? extends java.util.List<ApplyUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesResponseBody other = (ApplyUpdatesResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<ApplyUpdatesErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<ApplyUpdatesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<ApplyUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody build() {
|
||||
return new ApplyUpdatesResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ButlerTask {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("name")
|
||||
private Optional<? extends String> name;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("interval")
|
||||
private Optional<? extends Double> interval;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("scheduleRandomized")
|
||||
private Optional<? extends Boolean> scheduleRandomized;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("enabled")
|
||||
private Optional<? extends Boolean> enabled;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("description")
|
||||
private Optional<? extends String> description;
|
||||
|
||||
public ButlerTask(
|
||||
@JsonProperty("name") Optional<? extends String> name,
|
||||
@JsonProperty("interval") Optional<? extends Double> interval,
|
||||
@JsonProperty("scheduleRandomized") Optional<? extends Boolean> scheduleRandomized,
|
||||
@JsonProperty("enabled") Optional<? extends Boolean> enabled,
|
||||
@JsonProperty("title") Optional<? extends String> title,
|
||||
@JsonProperty("description") Optional<? extends String> description) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
Utils.checkNotNull(interval, "interval");
|
||||
Utils.checkNotNull(scheduleRandomized, "scheduleRandomized");
|
||||
Utils.checkNotNull(enabled, "enabled");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(description, "description");
|
||||
this.name = name;
|
||||
this.interval = interval;
|
||||
this.scheduleRandomized = scheduleRandomized;
|
||||
this.enabled = enabled;
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Optional<? extends String> name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> interval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
public Optional<? extends Boolean> scheduleRandomized() {
|
||||
return scheduleRandomized;
|
||||
}
|
||||
|
||||
public Optional<? extends Boolean> enabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Optional<? extends String> description() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ButlerTask withName(String name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = Optional.ofNullable(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withName(Optional<? extends String> name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withInterval(double interval) {
|
||||
Utils.checkNotNull(interval, "interval");
|
||||
this.interval = Optional.ofNullable(interval);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withInterval(Optional<? extends Double> interval) {
|
||||
Utils.checkNotNull(interval, "interval");
|
||||
this.interval = interval;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withScheduleRandomized(boolean scheduleRandomized) {
|
||||
Utils.checkNotNull(scheduleRandomized, "scheduleRandomized");
|
||||
this.scheduleRandomized = Optional.ofNullable(scheduleRandomized);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withScheduleRandomized(Optional<? extends Boolean> scheduleRandomized) {
|
||||
Utils.checkNotNull(scheduleRandomized, "scheduleRandomized");
|
||||
this.scheduleRandomized = scheduleRandomized;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withEnabled(boolean enabled) {
|
||||
Utils.checkNotNull(enabled, "enabled");
|
||||
this.enabled = Optional.ofNullable(enabled);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withEnabled(Optional<? extends Boolean> enabled) {
|
||||
Utils.checkNotNull(enabled, "enabled");
|
||||
this.enabled = enabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withTitle(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withDescription(String description) {
|
||||
Utils.checkNotNull(description, "description");
|
||||
this.description = Optional.ofNullable(description);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask withDescription(Optional<? extends String> description) {
|
||||
Utils.checkNotNull(description, "description");
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ButlerTask other = (ButlerTask) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.name, other.name) &&
|
||||
java.util.Objects.deepEquals(this.interval, other.interval) &&
|
||||
java.util.Objects.deepEquals(this.scheduleRandomized, other.scheduleRandomized) &&
|
||||
java.util.Objects.deepEquals(this.enabled, other.enabled) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.description, other.description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
name,
|
||||
interval,
|
||||
scheduleRandomized,
|
||||
enabled,
|
||||
title,
|
||||
description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ButlerTask.class,
|
||||
"name", name,
|
||||
"interval", interval,
|
||||
"scheduleRandomized", scheduleRandomized,
|
||||
"enabled", enabled,
|
||||
"title", title,
|
||||
"description", description);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> name = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> interval = Optional.empty();
|
||||
|
||||
private Optional<? extends Boolean> scheduleRandomized = Optional.empty();
|
||||
|
||||
private Optional<? extends Boolean> enabled = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Optional<? extends String> description = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder name(String name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = Optional.ofNullable(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder name(Optional<? extends String> name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder interval(double interval) {
|
||||
Utils.checkNotNull(interval, "interval");
|
||||
this.interval = Optional.ofNullable(interval);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder interval(Optional<? extends Double> interval) {
|
||||
Utils.checkNotNull(interval, "interval");
|
||||
this.interval = interval;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder scheduleRandomized(boolean scheduleRandomized) {
|
||||
Utils.checkNotNull(scheduleRandomized, "scheduleRandomized");
|
||||
this.scheduleRandomized = Optional.ofNullable(scheduleRandomized);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder scheduleRandomized(Optional<? extends Boolean> scheduleRandomized) {
|
||||
Utils.checkNotNull(scheduleRandomized, "scheduleRandomized");
|
||||
this.scheduleRandomized = scheduleRandomized;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder enabled(boolean enabled) {
|
||||
Utils.checkNotNull(enabled, "enabled");
|
||||
this.enabled = Optional.ofNullable(enabled);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder enabled(Optional<? extends Boolean> enabled) {
|
||||
Utils.checkNotNull(enabled, "enabled");
|
||||
this.enabled = enabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder description(String description) {
|
||||
Utils.checkNotNull(description, "description");
|
||||
this.description = Optional.ofNullable(description);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder description(Optional<? extends String> description) {
|
||||
Utils.checkNotNull(description, "description");
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTask build() {
|
||||
return new ButlerTask(
|
||||
name,
|
||||
interval,
|
||||
scheduleRandomized,
|
||||
enabled,
|
||||
title,
|
||||
description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ButlerTasks {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("ButlerTask")
|
||||
private Optional<? extends java.util.List<ButlerTask>> butlerTask;
|
||||
|
||||
public ButlerTasks(
|
||||
@JsonProperty("ButlerTask") Optional<? extends java.util.List<ButlerTask>> butlerTask) {
|
||||
Utils.checkNotNull(butlerTask, "butlerTask");
|
||||
this.butlerTask = butlerTask;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<ButlerTask>> butlerTask() {
|
||||
return butlerTask;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ButlerTasks withButlerTask(java.util.List<ButlerTask> butlerTask) {
|
||||
Utils.checkNotNull(butlerTask, "butlerTask");
|
||||
this.butlerTask = Optional.ofNullable(butlerTask);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTasks withButlerTask(Optional<? extends java.util.List<ButlerTask>> butlerTask) {
|
||||
Utils.checkNotNull(butlerTask, "butlerTask");
|
||||
this.butlerTask = butlerTask;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ButlerTasks other = (ButlerTasks) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.butlerTask, other.butlerTask);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
butlerTask);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ButlerTasks.class,
|
||||
"butlerTask", butlerTask);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<ButlerTask>> butlerTask = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder butlerTask(java.util.List<ButlerTask> butlerTask) {
|
||||
Utils.checkNotNull(butlerTask, "butlerTask");
|
||||
this.butlerTask = Optional.ofNullable(butlerTask);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder butlerTask(Optional<? extends java.util.List<ButlerTask>> butlerTask) {
|
||||
Utils.checkNotNull(butlerTask, "butlerTask");
|
||||
this.butlerTask = butlerTask;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ButlerTasks build() {
|
||||
return new ButlerTasks(
|
||||
butlerTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CancelServerActivitiesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public CancelServerActivitiesErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesErrors other = (CancelServerActivitiesErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors build() {
|
||||
return new CancelServerActivitiesErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CancelServerActivitiesRequest {
|
||||
|
||||
/**
|
||||
* The UUID of the activity to cancel.
|
||||
*/
|
||||
@SpeakeasyMetadata("pathParam:style=simple,explode=false,name=activityUUID")
|
||||
private String activityUUID;
|
||||
|
||||
public CancelServerActivitiesRequest(
|
||||
String activityUUID) {
|
||||
Utils.checkNotNull(activityUUID, "activityUUID");
|
||||
this.activityUUID = activityUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* The UUID of the activity to cancel.
|
||||
*/
|
||||
public String activityUUID() {
|
||||
return activityUUID;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The UUID of the activity to cancel.
|
||||
*/
|
||||
public CancelServerActivitiesRequest withActivityUUID(String activityUUID) {
|
||||
Utils.checkNotNull(activityUUID, "activityUUID");
|
||||
this.activityUUID = activityUUID;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesRequest other = (CancelServerActivitiesRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.activityUUID, other.activityUUID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
activityUUID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesRequest.class,
|
||||
"activityUUID", activityUUID);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String activityUUID;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The UUID of the activity to cancel.
|
||||
*/
|
||||
public Builder activityUUID(String activityUUID) {
|
||||
Utils.checkNotNull(activityUUID, "activityUUID");
|
||||
this.activityUUID = activityUUID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesRequest build() {
|
||||
return new CancelServerActivitiesRequest(
|
||||
activityUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class CancelServerActivitiesRequestBuilder {
|
||||
|
||||
private String activityUUID;
|
||||
private final SDKMethodInterfaces.MethodCallCancelServerActivities sdk;
|
||||
|
||||
public CancelServerActivitiesRequestBuilder(SDKMethodInterfaces.MethodCallCancelServerActivities sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) {
|
||||
Utils.checkNotNull(activityUUID, "activityUUID");
|
||||
this.activityUUID = activityUUID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponse call() throws Exception {
|
||||
|
||||
return sdk.cancelServerActivities(
|
||||
activityUUID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CancelServerActivitiesResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends CancelServerActivitiesResponseBody> object;
|
||||
|
||||
public CancelServerActivitiesResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends CancelServerActivitiesResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends CancelServerActivitiesResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public CancelServerActivitiesResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public CancelServerActivitiesResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CancelServerActivitiesResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public CancelServerActivitiesResponse withObject(CancelServerActivitiesResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public CancelServerActivitiesResponse withObject(Optional<? extends CancelServerActivitiesResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesResponse other = (CancelServerActivitiesResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends CancelServerActivitiesResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(CancelServerActivitiesResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends CancelServerActivitiesResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponse build() {
|
||||
return new CancelServerActivitiesResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* CancelServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class CancelServerActivitiesResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<CancelServerActivitiesErrors>> errors;
|
||||
|
||||
public CancelServerActivitiesResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<CancelServerActivitiesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<CancelServerActivitiesErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody withErrors(java.util.List<CancelServerActivitiesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody withErrors(Optional<? extends java.util.List<CancelServerActivitiesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesResponseBody other = (CancelServerActivitiesResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<CancelServerActivitiesErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<CancelServerActivitiesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<CancelServerActivitiesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody build() {
|
||||
return new CancelServerActivitiesResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CheckForUpdatesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public CheckForUpdatesErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesErrors other = (CheckForUpdatesErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors build() {
|
||||
return new CheckForUpdatesErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CheckForUpdatesRequest {
|
||||
|
||||
/**
|
||||
* Indicate that you want to start download any updates found.
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=download")
|
||||
private Optional<? extends Download> download;
|
||||
|
||||
public CheckForUpdatesRequest(
|
||||
Optional<? extends Download> download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = download;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want to start download any updates found.
|
||||
*/
|
||||
public Optional<? extends Download> download() {
|
||||
return download;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want to start download any updates found.
|
||||
*/
|
||||
public CheckForUpdatesRequest withDownload(Download download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = Optional.ofNullable(download);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want to start download any updates found.
|
||||
*/
|
||||
public CheckForUpdatesRequest withDownload(Optional<? extends Download> download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = download;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesRequest other = (CheckForUpdatesRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.download, other.download);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
download);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesRequest.class,
|
||||
"download", download);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Download> download = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want to start download any updates found.
|
||||
*/
|
||||
public Builder download(Download download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = Optional.ofNullable(download);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that you want to start download any updates found.
|
||||
*/
|
||||
public Builder download(Optional<? extends Download> download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = download;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesRequest build() {
|
||||
return new CheckForUpdatesRequest(
|
||||
download);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class CheckForUpdatesRequestBuilder {
|
||||
|
||||
private Optional<? extends Download> download = Optional.empty();
|
||||
private final SDKMethodInterfaces.MethodCallCheckForUpdates sdk;
|
||||
|
||||
public CheckForUpdatesRequestBuilder(SDKMethodInterfaces.MethodCallCheckForUpdates sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public CheckForUpdatesRequestBuilder download(Download download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = Optional.of(download);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesRequestBuilder download(Optional<? extends Download> download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = download;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponse call() throws Exception {
|
||||
|
||||
return sdk.checkForUpdates(
|
||||
download);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CheckForUpdatesResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends CheckForUpdatesResponseBody> object;
|
||||
|
||||
public CheckForUpdatesResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends CheckForUpdatesResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends CheckForUpdatesResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public CheckForUpdatesResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public CheckForUpdatesResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CheckForUpdatesResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public CheckForUpdatesResponse withObject(CheckForUpdatesResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public CheckForUpdatesResponse withObject(Optional<? extends CheckForUpdatesResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesResponse other = (CheckForUpdatesResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends CheckForUpdatesResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(CheckForUpdatesResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends CheckForUpdatesResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponse build() {
|
||||
return new CheckForUpdatesResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* CheckForUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class CheckForUpdatesResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<CheckForUpdatesErrors>> errors;
|
||||
|
||||
public CheckForUpdatesResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<CheckForUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<CheckForUpdatesErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody withErrors(java.util.List<CheckForUpdatesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody withErrors(Optional<? extends java.util.List<CheckForUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesResponseBody other = (CheckForUpdatesResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<CheckForUpdatesErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<CheckForUpdatesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<CheckForUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody build() {
|
||||
return new CheckForUpdatesResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ClearPlaylistContentsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public ClearPlaylistContentsErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsErrors other = (ClearPlaylistContentsErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors build() {
|
||||
return new ClearPlaylistContentsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ClearPlaylistContentsRequest {
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID")
|
||||
private double playlistID;
|
||||
|
||||
public ClearPlaylistContentsRequest(
|
||||
double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public double playlistID() {
|
||||
return playlistID;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public ClearPlaylistContentsRequest withPlaylistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsRequest other = (ClearPlaylistContentsRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.playlistID, other.playlistID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
playlistID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsRequest.class,
|
||||
"playlistID", playlistID);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Double playlistID;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public Builder playlistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsRequest build() {
|
||||
return new ClearPlaylistContentsRequest(
|
||||
playlistID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class ClearPlaylistContentsRequestBuilder {
|
||||
|
||||
private Double playlistID;
|
||||
private final SDKMethodInterfaces.MethodCallClearPlaylistContents sdk;
|
||||
|
||||
public ClearPlaylistContentsRequestBuilder(SDKMethodInterfaces.MethodCallClearPlaylistContents sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsRequestBuilder playlistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponse call() throws Exception {
|
||||
|
||||
return sdk.clearPlaylistContents(
|
||||
playlistID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class ClearPlaylistContentsResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends ClearPlaylistContentsResponseBody> object;
|
||||
|
||||
public ClearPlaylistContentsResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends ClearPlaylistContentsResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends ClearPlaylistContentsResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public ClearPlaylistContentsResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public ClearPlaylistContentsResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ClearPlaylistContentsResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public ClearPlaylistContentsResponse withObject(ClearPlaylistContentsResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public ClearPlaylistContentsResponse withObject(Optional<? extends ClearPlaylistContentsResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsResponse other = (ClearPlaylistContentsResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends ClearPlaylistContentsResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(ClearPlaylistContentsResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends ClearPlaylistContentsResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponse build() {
|
||||
return new ClearPlaylistContentsResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* ClearPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class ClearPlaylistContentsResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<ClearPlaylistContentsErrors>> errors;
|
||||
|
||||
public ClearPlaylistContentsResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<ClearPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<ClearPlaylistContentsErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody withErrors(java.util.List<ClearPlaylistContentsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody withErrors(Optional<? extends java.util.List<ClearPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsResponseBody other = (ClearPlaylistContentsResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<ClearPlaylistContentsErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<ClearPlaylistContentsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<ClearPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody build() {
|
||||
return new ClearPlaylistContentsResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Context {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("librarySectionID")
|
||||
private Optional<? extends String> librarySectionID;
|
||||
|
||||
public Context(
|
||||
@JsonProperty("librarySectionID") Optional<? extends String> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
}
|
||||
|
||||
public Optional<? extends String> librarySectionID() {
|
||||
return librarySectionID;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Context withLibrarySectionID(String librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Context withLibrarySectionID(Optional<? extends String> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Context other = (Context) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
librarySectionID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Context.class,
|
||||
"librarySectionID", librarySectionID);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> librarySectionID = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder librarySectionID(String librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = Optional.ofNullable(librarySectionID);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder librarySectionID(Optional<? extends String> librarySectionID) {
|
||||
Utils.checkNotNull(librarySectionID, "librarySectionID");
|
||||
this.librarySectionID = librarySectionID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Context build() {
|
||||
return new Context(
|
||||
librarySectionID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Country {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("tag")
|
||||
private Optional<? extends String> tag;
|
||||
|
||||
public Country(
|
||||
@JsonProperty("tag") Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public Optional<? extends String> tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Country withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Country withTag(Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Country other = (Country) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Country.class,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> tag = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Country build() {
|
||||
return new Country(
|
||||
tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CreatePlaylistErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public CreatePlaylistErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistErrors other = (CreatePlaylistErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors build() {
|
||||
return new CreatePlaylistErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CreatePlaylistMediaContainer {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<? extends Integer> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Metadata")
|
||||
private Optional<? extends java.util.List<CreatePlaylistMetadata>> metadata;
|
||||
|
||||
public CreatePlaylistMediaContainer(
|
||||
@JsonProperty("size") Optional<? extends Integer> size,
|
||||
@JsonProperty("Metadata") Optional<? extends java.util.List<CreatePlaylistMetadata>> metadata) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.size = size;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<CreatePlaylistMetadata>> metadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistMediaContainer withSize(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMediaContainer withSize(Optional<? extends Integer> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMediaContainer withMetadata(java.util.List<CreatePlaylistMetadata> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = Optional.ofNullable(metadata);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMediaContainer withMetadata(Optional<? extends java.util.List<CreatePlaylistMetadata>> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistMediaContainer other = (CreatePlaylistMediaContainer) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.size, other.size) &&
|
||||
java.util.Objects.deepEquals(this.metadata, other.metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
size,
|
||||
metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistMediaContainer.class,
|
||||
"size", size,
|
||||
"metadata", metadata);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Integer> size = Optional.empty();
|
||||
|
||||
private Optional<? extends java.util.List<CreatePlaylistMetadata>> metadata = 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<? extends Integer> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metadata(java.util.List<CreatePlaylistMetadata> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = Optional.ofNullable(metadata);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metadata(Optional<? extends java.util.List<CreatePlaylistMetadata>> metadata) {
|
||||
Utils.checkNotNull(metadata, "metadata");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMediaContainer build() {
|
||||
return new CreatePlaylistMediaContainer(
|
||||
size,
|
||||
metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,718 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CreatePlaylistMetadata {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("ratingKey")
|
||||
private Optional<? extends String> ratingKey;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private Optional<? extends String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("guid")
|
||||
private Optional<? extends String> guid;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("type")
|
||||
private Optional<? extends String> type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("summary")
|
||||
private Optional<? extends String> summary;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("smart")
|
||||
private Optional<? extends Boolean> smart;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("playlistType")
|
||||
private Optional<? extends String> playlistType;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("icon")
|
||||
private Optional<? extends String> icon;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("viewCount")
|
||||
private Optional<? extends Integer> viewCount;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("lastViewedAt")
|
||||
private Optional<? extends Integer> lastViewedAt;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("leafCount")
|
||||
private Optional<? extends Integer> leafCount;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("addedAt")
|
||||
private Optional<? extends Integer> addedAt;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("updatedAt")
|
||||
private Optional<? extends Integer> updatedAt;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("composite")
|
||||
private Optional<? extends String> composite;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("duration")
|
||||
private Optional<? extends Integer> duration;
|
||||
|
||||
public CreatePlaylistMetadata(
|
||||
@JsonProperty("ratingKey") Optional<? extends String> ratingKey,
|
||||
@JsonProperty("key") Optional<? extends String> key,
|
||||
@JsonProperty("guid") Optional<? extends String> guid,
|
||||
@JsonProperty("type") Optional<? extends String> type,
|
||||
@JsonProperty("title") Optional<? extends String> title,
|
||||
@JsonProperty("summary") Optional<? extends String> summary,
|
||||
@JsonProperty("smart") Optional<? extends Boolean> smart,
|
||||
@JsonProperty("playlistType") Optional<? extends String> playlistType,
|
||||
@JsonProperty("icon") Optional<? extends String> icon,
|
||||
@JsonProperty("viewCount") Optional<? extends Integer> viewCount,
|
||||
@JsonProperty("lastViewedAt") Optional<? extends Integer> lastViewedAt,
|
||||
@JsonProperty("leafCount") Optional<? extends Integer> leafCount,
|
||||
@JsonProperty("addedAt") Optional<? extends Integer> addedAt,
|
||||
@JsonProperty("updatedAt") Optional<? extends Integer> updatedAt,
|
||||
@JsonProperty("composite") Optional<? extends String> composite,
|
||||
@JsonProperty("duration") Optional<? extends Integer> duration) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
Utils.checkNotNull(icon, "icon");
|
||||
Utils.checkNotNull(viewCount, "viewCount");
|
||||
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.ratingKey = ratingKey;
|
||||
this.key = key;
|
||||
this.guid = guid;
|
||||
this.type = type;
|
||||
this.title = title;
|
||||
this.summary = summary;
|
||||
this.smart = smart;
|
||||
this.playlistType = playlistType;
|
||||
this.icon = icon;
|
||||
this.viewCount = viewCount;
|
||||
this.lastViewedAt = lastViewedAt;
|
||||
this.leafCount = leafCount;
|
||||
this.addedAt = addedAt;
|
||||
this.updatedAt = updatedAt;
|
||||
this.composite = composite;
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public Optional<? extends String> ratingKey() {
|
||||
return ratingKey;
|
||||
}
|
||||
|
||||
public Optional<? extends String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public Optional<? extends String> guid() {
|
||||
return guid;
|
||||
}
|
||||
|
||||
public Optional<? extends String> type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Optional<? extends String> summary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public Optional<? extends Boolean> smart() {
|
||||
return smart;
|
||||
}
|
||||
|
||||
public Optional<? extends String> playlistType() {
|
||||
return playlistType;
|
||||
}
|
||||
|
||||
public Optional<? extends String> icon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> viewCount() {
|
||||
return viewCount;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> lastViewedAt() {
|
||||
return lastViewedAt;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> leafCount() {
|
||||
return leafCount;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> addedAt() {
|
||||
return addedAt;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> updatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public Optional<? extends String> composite() {
|
||||
return composite;
|
||||
}
|
||||
|
||||
public Optional<? extends Integer> duration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withRatingKey(String ratingKey) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
this.ratingKey = Optional.ofNullable(ratingKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withRatingKey(Optional<? extends String> ratingKey) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
this.ratingKey = ratingKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withKey(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withGuid(String guid) {
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
this.guid = Optional.ofNullable(guid);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withGuid(Optional<? extends String> guid) {
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
this.guid = guid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withType(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withTitle(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withSummary(String summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = Optional.ofNullable(summary);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withSummary(Optional<? extends String> summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = summary;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withSmart(boolean smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = Optional.ofNullable(smart);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withSmart(Optional<? extends Boolean> smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = smart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withPlaylistType(String playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = Optional.ofNullable(playlistType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withPlaylistType(Optional<? extends String> playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = playlistType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withIcon(String icon) {
|
||||
Utils.checkNotNull(icon, "icon");
|
||||
this.icon = Optional.ofNullable(icon);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withIcon(Optional<? extends String> icon) {
|
||||
Utils.checkNotNull(icon, "icon");
|
||||
this.icon = icon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withViewCount(int viewCount) {
|
||||
Utils.checkNotNull(viewCount, "viewCount");
|
||||
this.viewCount = Optional.ofNullable(viewCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withViewCount(Optional<? extends Integer> viewCount) {
|
||||
Utils.checkNotNull(viewCount, "viewCount");
|
||||
this.viewCount = viewCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withLastViewedAt(int lastViewedAt) {
|
||||
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
|
||||
this.lastViewedAt = Optional.ofNullable(lastViewedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withLastViewedAt(Optional<? extends Integer> lastViewedAt) {
|
||||
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
|
||||
this.lastViewedAt = lastViewedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withLeafCount(int leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = Optional.ofNullable(leafCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withLeafCount(Optional<? extends Integer> leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = leafCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withAddedAt(int addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = Optional.ofNullable(addedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withAddedAt(Optional<? extends Integer> addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = addedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withUpdatedAt(int updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = Optional.ofNullable(updatedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withUpdatedAt(Optional<? extends Integer> updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = updatedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withComposite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = Optional.ofNullable(composite);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withComposite(Optional<? extends String> composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withDuration(int duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = Optional.ofNullable(duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata withDuration(Optional<? extends Integer> duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistMetadata other = (CreatePlaylistMetadata) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) &&
|
||||
java.util.Objects.deepEquals(this.key, other.key) &&
|
||||
java.util.Objects.deepEquals(this.guid, other.guid) &&
|
||||
java.util.Objects.deepEquals(this.type, other.type) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.summary, other.summary) &&
|
||||
java.util.Objects.deepEquals(this.smart, other.smart) &&
|
||||
java.util.Objects.deepEquals(this.playlistType, other.playlistType) &&
|
||||
java.util.Objects.deepEquals(this.icon, other.icon) &&
|
||||
java.util.Objects.deepEquals(this.viewCount, other.viewCount) &&
|
||||
java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
|
||||
java.util.Objects.deepEquals(this.leafCount, other.leafCount) &&
|
||||
java.util.Objects.deepEquals(this.addedAt, other.addedAt) &&
|
||||
java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) &&
|
||||
java.util.Objects.deepEquals(this.composite, other.composite) &&
|
||||
java.util.Objects.deepEquals(this.duration, other.duration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
ratingKey,
|
||||
key,
|
||||
guid,
|
||||
type,
|
||||
title,
|
||||
summary,
|
||||
smart,
|
||||
playlistType,
|
||||
icon,
|
||||
viewCount,
|
||||
lastViewedAt,
|
||||
leafCount,
|
||||
addedAt,
|
||||
updatedAt,
|
||||
composite,
|
||||
duration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistMetadata.class,
|
||||
"ratingKey", ratingKey,
|
||||
"key", key,
|
||||
"guid", guid,
|
||||
"type", type,
|
||||
"title", title,
|
||||
"summary", summary,
|
||||
"smart", smart,
|
||||
"playlistType", playlistType,
|
||||
"icon", icon,
|
||||
"viewCount", viewCount,
|
||||
"lastViewedAt", lastViewedAt,
|
||||
"leafCount", leafCount,
|
||||
"addedAt", addedAt,
|
||||
"updatedAt", updatedAt,
|
||||
"composite", composite,
|
||||
"duration", duration);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> ratingKey = Optional.empty();
|
||||
|
||||
private Optional<? extends String> key = Optional.empty();
|
||||
|
||||
private Optional<? extends String> guid = Optional.empty();
|
||||
|
||||
private Optional<? extends String> type = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Optional<? extends String> summary = Optional.empty();
|
||||
|
||||
private Optional<? extends Boolean> smart = Optional.empty();
|
||||
|
||||
private Optional<? extends String> playlistType = Optional.empty();
|
||||
|
||||
private Optional<? extends String> icon = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> viewCount = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> lastViewedAt = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> leafCount = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> addedAt = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> updatedAt = Optional.empty();
|
||||
|
||||
private Optional<? extends String> composite = Optional.empty();
|
||||
|
||||
private Optional<? extends Integer> duration = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder ratingKey(String ratingKey) {
|
||||
Utils.checkNotNull(ratingKey, "ratingKey");
|
||||
this.ratingKey = Optional.ofNullable(ratingKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder ratingKey(Optional<? extends 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<? extends 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<? extends String> guid) {
|
||||
Utils.checkNotNull(guid, "guid");
|
||||
this.guid = guid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends 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<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder summary(String summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = Optional.ofNullable(summary);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder summary(Optional<? extends String> summary) {
|
||||
Utils.checkNotNull(summary, "summary");
|
||||
this.summary = summary;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder smart(boolean smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = Optional.ofNullable(smart);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder smart(Optional<? extends Boolean> smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = smart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder playlistType(String playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = Optional.ofNullable(playlistType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder playlistType(Optional<? extends String> playlistType) {
|
||||
Utils.checkNotNull(playlistType, "playlistType");
|
||||
this.playlistType = playlistType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder icon(String icon) {
|
||||
Utils.checkNotNull(icon, "icon");
|
||||
this.icon = Optional.ofNullable(icon);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder icon(Optional<? extends String> icon) {
|
||||
Utils.checkNotNull(icon, "icon");
|
||||
this.icon = icon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder viewCount(int viewCount) {
|
||||
Utils.checkNotNull(viewCount, "viewCount");
|
||||
this.viewCount = Optional.ofNullable(viewCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder viewCount(Optional<? extends Integer> viewCount) {
|
||||
Utils.checkNotNull(viewCount, "viewCount");
|
||||
this.viewCount = viewCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder lastViewedAt(int lastViewedAt) {
|
||||
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
|
||||
this.lastViewedAt = Optional.ofNullable(lastViewedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder lastViewedAt(Optional<? extends Integer> lastViewedAt) {
|
||||
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
|
||||
this.lastViewedAt = lastViewedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCount(int leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = Optional.ofNullable(leafCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder leafCount(Optional<? extends Integer> leafCount) {
|
||||
Utils.checkNotNull(leafCount, "leafCount");
|
||||
this.leafCount = leafCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addedAt(int addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = Optional.ofNullable(addedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addedAt(Optional<? extends Integer> addedAt) {
|
||||
Utils.checkNotNull(addedAt, "addedAt");
|
||||
this.addedAt = addedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder updatedAt(int updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = Optional.ofNullable(updatedAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder updatedAt(Optional<? extends Integer> updatedAt) {
|
||||
Utils.checkNotNull(updatedAt, "updatedAt");
|
||||
this.updatedAt = updatedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder composite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = Optional.ofNullable(composite);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder composite(Optional<? extends String> composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder duration(int duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = Optional.ofNullable(duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder duration(Optional<? extends Integer> duration) {
|
||||
Utils.checkNotNull(duration, "duration");
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistMetadata build() {
|
||||
return new CreatePlaylistMetadata(
|
||||
ratingKey,
|
||||
key,
|
||||
guid,
|
||||
type,
|
||||
title,
|
||||
summary,
|
||||
smart,
|
||||
playlistType,
|
||||
icon,
|
||||
viewCount,
|
||||
lastViewedAt,
|
||||
leafCount,
|
||||
addedAt,
|
||||
updatedAt,
|
||||
composite,
|
||||
duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* CreatePlaylistPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class CreatePlaylistPlaylistsResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<CreatePlaylistErrors>> errors;
|
||||
|
||||
public CreatePlaylistPlaylistsResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<CreatePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<CreatePlaylistErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsResponseBody withErrors(java.util.List<CreatePlaylistErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsResponseBody withErrors(Optional<? extends java.util.List<CreatePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistPlaylistsResponseBody other = (CreatePlaylistPlaylistsResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistPlaylistsResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<CreatePlaylistErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<CreatePlaylistErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<CreatePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsResponseBody build() {
|
||||
return new CreatePlaylistPlaylistsResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CreatePlaylistRequest {
|
||||
|
||||
/**
|
||||
* name of the playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* type of playlist to create
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")
|
||||
private QueryParamType type;
|
||||
|
||||
/**
|
||||
* whether the playlist is smart or not
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart")
|
||||
private Smart smart;
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* the play queue to copy to a playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID")
|
||||
private Optional<? extends Double> playQueueID;
|
||||
|
||||
public CreatePlaylistRequest(
|
||||
String title,
|
||||
QueryParamType type,
|
||||
Smart smart,
|
||||
String uri,
|
||||
Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.title = title;
|
||||
this.type = type;
|
||||
this.smart = smart;
|
||||
this.uri = uri;
|
||||
this.playQueueID = playQueueID;
|
||||
}
|
||||
|
||||
/**
|
||||
* name of the playlist
|
||||
*/
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* type of playlist to create
|
||||
*/
|
||||
public QueryParamType type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether the playlist is smart or not
|
||||
*/
|
||||
public Smart smart() {
|
||||
return smart;
|
||||
}
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
public String uri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to copy to a playlist
|
||||
*/
|
||||
public Optional<? extends Double> playQueueID() {
|
||||
return playQueueID;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* name of the playlist
|
||||
*/
|
||||
public CreatePlaylistRequest withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* type of playlist to create
|
||||
*/
|
||||
public CreatePlaylistRequest withType(QueryParamType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether the playlist is smart or not
|
||||
*/
|
||||
public CreatePlaylistRequest withSmart(Smart smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = smart;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
public CreatePlaylistRequest withUri(String uri) {
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
this.uri = uri;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to copy to a playlist
|
||||
*/
|
||||
public CreatePlaylistRequest withPlayQueueID(double playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = Optional.ofNullable(playQueueID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to copy to a playlist
|
||||
*/
|
||||
public CreatePlaylistRequest withPlayQueueID(Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = playQueueID;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistRequest other = (CreatePlaylistRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.type, other.type) &&
|
||||
java.util.Objects.deepEquals(this.smart, other.smart) &&
|
||||
java.util.Objects.deepEquals(this.uri, other.uri) &&
|
||||
java.util.Objects.deepEquals(this.playQueueID, other.playQueueID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
title,
|
||||
type,
|
||||
smart,
|
||||
uri,
|
||||
playQueueID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistRequest.class,
|
||||
"title", title,
|
||||
"type", type,
|
||||
"smart", smart,
|
||||
"uri", uri,
|
||||
"playQueueID", playQueueID);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String title;
|
||||
|
||||
private QueryParamType type;
|
||||
|
||||
private Smart smart;
|
||||
|
||||
private String uri;
|
||||
|
||||
private Optional<? extends Double> playQueueID = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* name of the playlist
|
||||
*/
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* type of playlist to create
|
||||
*/
|
||||
public Builder type(QueryParamType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether the playlist is smart or not
|
||||
*/
|
||||
public Builder smart(Smart smart) {
|
||||
Utils.checkNotNull(smart, "smart");
|
||||
this.smart = smart;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the content URI for the playlist
|
||||
*/
|
||||
public Builder uri(String uri) {
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
this.uri = uri;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to copy to a playlist
|
||||
*/
|
||||
public Builder playQueueID(double playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = Optional.ofNullable(playQueueID);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* the play queue to copy to a playlist
|
||||
*/
|
||||
public Builder playQueueID(Optional<? extends Double> playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = playQueueID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistRequest build() {
|
||||
return new CreatePlaylistRequest(
|
||||
title,
|
||||
type,
|
||||
smart,
|
||||
uri,
|
||||
playQueueID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class CreatePlaylistRequestBuilder {
|
||||
|
||||
private CreatePlaylistRequest request;
|
||||
private final SDKMethodInterfaces.MethodCallCreatePlaylist sdk;
|
||||
|
||||
public CreatePlaylistRequestBuilder(SDKMethodInterfaces.MethodCallCreatePlaylist sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public CreatePlaylistRequestBuilder request(CreatePlaylistRequest request) {
|
||||
Utils.checkNotNull(request, "request");
|
||||
this.request = request;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponse call() throws Exception {
|
||||
|
||||
return sdk.createPlaylist(
|
||||
request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class CreatePlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* returns all playlists
|
||||
*/
|
||||
private Optional<? extends CreatePlaylistResponseBody> twoHundredApplicationJsonObject;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends CreatePlaylistPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject;
|
||||
|
||||
public CreatePlaylistResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends CreatePlaylistResponseBody> twoHundredApplicationJsonObject,
|
||||
Optional<? extends CreatePlaylistPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all playlists
|
||||
*/
|
||||
public Optional<? extends CreatePlaylistResponseBody> twoHundredApplicationJsonObject() {
|
||||
return twoHundredApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends CreatePlaylistPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject() {
|
||||
return fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public CreatePlaylistResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public CreatePlaylistResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CreatePlaylistResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all playlists
|
||||
*/
|
||||
public CreatePlaylistResponse withTwoHundredApplicationJsonObject(CreatePlaylistResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all playlists
|
||||
*/
|
||||
public CreatePlaylistResponse withTwoHundredApplicationJsonObject(Optional<? extends CreatePlaylistResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public CreatePlaylistResponse withFourHundredAndOneApplicationJsonObject(CreatePlaylistPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public CreatePlaylistResponse withFourHundredAndOneApplicationJsonObject(Optional<? extends CreatePlaylistPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistResponse other = (CreatePlaylistResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) &&
|
||||
java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"twoHundredApplicationJsonObject", twoHundredApplicationJsonObject,
|
||||
"fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends CreatePlaylistResponseBody> twoHundredApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Optional<? extends CreatePlaylistPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all playlists
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(CreatePlaylistResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all playlists
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(Optional<? extends CreatePlaylistResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(CreatePlaylistPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(Optional<? extends CreatePlaylistPlaylistsResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponse build() {
|
||||
return new CreatePlaylistResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* CreatePlaylistResponseBody - returns all playlists
|
||||
*/
|
||||
|
||||
public class CreatePlaylistResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("MediaContainer")
|
||||
private Optional<? extends CreatePlaylistMediaContainer> mediaContainer;
|
||||
|
||||
public CreatePlaylistResponseBody(
|
||||
@JsonProperty("MediaContainer") Optional<? extends CreatePlaylistMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
}
|
||||
|
||||
public Optional<? extends CreatePlaylistMediaContainer> mediaContainer() {
|
||||
return mediaContainer;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody withMediaContainer(CreatePlaylistMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody withMediaContainer(Optional<? extends CreatePlaylistMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistResponseBody other = (CreatePlaylistResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
mediaContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistResponseBody.class,
|
||||
"mediaContainer", mediaContainer);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends CreatePlaylistMediaContainer> mediaContainer = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder mediaContainer(CreatePlaylistMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder mediaContainer(Optional<? extends CreatePlaylistMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody build() {
|
||||
return new CreatePlaylistResponseBody(
|
||||
mediaContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class DeleteLibraryErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public DeleteLibraryErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryErrors other = (DeleteLibraryErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors build() {
|
||||
return new DeleteLibraryErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class DeleteLibraryRequest {
|
||||
|
||||
/**
|
||||
* the Id of the library to query
|
||||
*/
|
||||
@SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")
|
||||
private double sectionId;
|
||||
|
||||
public DeleteLibraryRequest(
|
||||
double sectionId) {
|
||||
Utils.checkNotNull(sectionId, "sectionId");
|
||||
this.sectionId = sectionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* the Id of the library to query
|
||||
*/
|
||||
public double sectionId() {
|
||||
return sectionId;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* the Id of the library to query
|
||||
*/
|
||||
public DeleteLibraryRequest withSectionId(double sectionId) {
|
||||
Utils.checkNotNull(sectionId, "sectionId");
|
||||
this.sectionId = sectionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryRequest other = (DeleteLibraryRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.sectionId, other.sectionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
sectionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryRequest.class,
|
||||
"sectionId", sectionId);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Double sectionId;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* the Id of the library to query
|
||||
*/
|
||||
public Builder sectionId(double sectionId) {
|
||||
Utils.checkNotNull(sectionId, "sectionId");
|
||||
this.sectionId = sectionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryRequest build() {
|
||||
return new DeleteLibraryRequest(
|
||||
sectionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class DeleteLibraryRequestBuilder {
|
||||
|
||||
private Double sectionId;
|
||||
private final SDKMethodInterfaces.MethodCallDeleteLibrary sdk;
|
||||
|
||||
public DeleteLibraryRequestBuilder(SDKMethodInterfaces.MethodCallDeleteLibrary sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public DeleteLibraryRequestBuilder sectionId(double sectionId) {
|
||||
Utils.checkNotNull(sectionId, "sectionId");
|
||||
this.sectionId = sectionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponse call() throws Exception {
|
||||
|
||||
return sdk.deleteLibrary(
|
||||
sectionId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class DeleteLibraryResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends DeleteLibraryResponseBody> object;
|
||||
|
||||
public DeleteLibraryResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends DeleteLibraryResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends DeleteLibraryResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public DeleteLibraryResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public DeleteLibraryResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeleteLibraryResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public DeleteLibraryResponse withObject(DeleteLibraryResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public DeleteLibraryResponse withObject(Optional<? extends DeleteLibraryResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryResponse other = (DeleteLibraryResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends DeleteLibraryResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(DeleteLibraryResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends DeleteLibraryResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponse build() {
|
||||
return new DeleteLibraryResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* DeleteLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class DeleteLibraryResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<DeleteLibraryErrors>> errors;
|
||||
|
||||
public DeleteLibraryResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<DeleteLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<DeleteLibraryErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody withErrors(java.util.List<DeleteLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody withErrors(Optional<? extends java.util.List<DeleteLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryResponseBody other = (DeleteLibraryResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<DeleteLibraryErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<DeleteLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<DeleteLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody build() {
|
||||
return new DeleteLibraryResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class DeletePlaylistErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public DeletePlaylistErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistErrors other = (DeletePlaylistErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors build() {
|
||||
return new DeletePlaylistErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class DeletePlaylistRequest {
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
@SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID")
|
||||
private double playlistID;
|
||||
|
||||
public DeletePlaylistRequest(
|
||||
double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public double playlistID() {
|
||||
return playlistID;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public DeletePlaylistRequest withPlaylistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistRequest other = (DeletePlaylistRequest) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.playlistID, other.playlistID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
playlistID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistRequest.class,
|
||||
"playlistID", playlistID);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Double playlistID;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* the ID of the playlist
|
||||
*/
|
||||
public Builder playlistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistRequest build() {
|
||||
return new DeletePlaylistRequest(
|
||||
playlistID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class DeletePlaylistRequestBuilder {
|
||||
|
||||
private Double playlistID;
|
||||
private final SDKMethodInterfaces.MethodCallDeletePlaylist sdk;
|
||||
|
||||
public DeletePlaylistRequestBuilder(SDKMethodInterfaces.MethodCallDeletePlaylist sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public DeletePlaylistRequestBuilder playlistID(double playlistID) {
|
||||
Utils.checkNotNull(playlistID, "playlistID");
|
||||
this.playlistID = playlistID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponse call() throws Exception {
|
||||
|
||||
return sdk.deletePlaylist(
|
||||
playlistID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class DeletePlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends DeletePlaylistResponseBody> object;
|
||||
|
||||
public DeletePlaylistResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends DeletePlaylistResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends DeletePlaylistResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public DeletePlaylistResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public DeletePlaylistResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeletePlaylistResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public DeletePlaylistResponse withObject(DeletePlaylistResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public DeletePlaylistResponse withObject(Optional<? extends DeletePlaylistResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistResponse other = (DeletePlaylistResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends DeletePlaylistResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(DeletePlaylistResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends DeletePlaylistResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponse build() {
|
||||
return new DeletePlaylistResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* DeletePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class DeletePlaylistResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<DeletePlaylistErrors>> errors;
|
||||
|
||||
public DeletePlaylistResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<DeletePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<DeletePlaylistErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody withErrors(java.util.List<DeletePlaylistErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody withErrors(Optional<? extends java.util.List<DeletePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistResponseBody other = (DeletePlaylistResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<DeletePlaylistErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<DeletePlaylistErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<DeletePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody build() {
|
||||
return new DeletePlaylistResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Device {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("id")
|
||||
private Optional<? extends Double> id;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("name")
|
||||
private Optional<? extends String> name;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("platform")
|
||||
private Optional<? extends String> platform;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("clientIdentifier")
|
||||
private Optional<? extends String> clientIdentifier;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("createdAt")
|
||||
private Optional<? extends Double> createdAt;
|
||||
|
||||
public Device(
|
||||
@JsonProperty("id") Optional<? extends Double> id,
|
||||
@JsonProperty("name") Optional<? extends String> name,
|
||||
@JsonProperty("platform") Optional<? extends String> platform,
|
||||
@JsonProperty("clientIdentifier") Optional<? extends String> clientIdentifier,
|
||||
@JsonProperty("createdAt") Optional<? extends Double> createdAt) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
Utils.checkNotNull(name, "name");
|
||||
Utils.checkNotNull(platform, "platform");
|
||||
Utils.checkNotNull(clientIdentifier, "clientIdentifier");
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.platform = platform;
|
||||
this.clientIdentifier = clientIdentifier;
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Optional<? extends String> name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Optional<? extends String> platform() {
|
||||
return platform;
|
||||
}
|
||||
|
||||
public Optional<? extends String> clientIdentifier() {
|
||||
return clientIdentifier;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> createdAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Device withId(double id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = Optional.ofNullable(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withId(Optional<? extends Double> id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withName(String name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = Optional.ofNullable(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withName(Optional<? extends String> name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withPlatform(String platform) {
|
||||
Utils.checkNotNull(platform, "platform");
|
||||
this.platform = Optional.ofNullable(platform);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withPlatform(Optional<? extends String> platform) {
|
||||
Utils.checkNotNull(platform, "platform");
|
||||
this.platform = platform;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withClientIdentifier(String clientIdentifier) {
|
||||
Utils.checkNotNull(clientIdentifier, "clientIdentifier");
|
||||
this.clientIdentifier = Optional.ofNullable(clientIdentifier);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withClientIdentifier(Optional<? extends String> clientIdentifier) {
|
||||
Utils.checkNotNull(clientIdentifier, "clientIdentifier");
|
||||
this.clientIdentifier = clientIdentifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withCreatedAt(double createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = Optional.ofNullable(createdAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device withCreatedAt(Optional<? extends Double> createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Device other = (Device) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.id, other.id) &&
|
||||
java.util.Objects.deepEquals(this.name, other.name) &&
|
||||
java.util.Objects.deepEquals(this.platform, other.platform) &&
|
||||
java.util.Objects.deepEquals(this.clientIdentifier, other.clientIdentifier) &&
|
||||
java.util.Objects.deepEquals(this.createdAt, other.createdAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
id,
|
||||
name,
|
||||
platform,
|
||||
clientIdentifier,
|
||||
createdAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Device.class,
|
||||
"id", id,
|
||||
"name", name,
|
||||
"platform", platform,
|
||||
"clientIdentifier", clientIdentifier,
|
||||
"createdAt", createdAt);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> id = Optional.empty();
|
||||
|
||||
private Optional<? extends String> name = Optional.empty();
|
||||
|
||||
private Optional<? extends String> platform = Optional.empty();
|
||||
|
||||
private Optional<? extends String> clientIdentifier = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> createdAt = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder id(double id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = Optional.ofNullable(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder id(Optional<? extends Double> id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder name(String name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = Optional.ofNullable(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder name(Optional<? extends String> name) {
|
||||
Utils.checkNotNull(name, "name");
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder platform(String platform) {
|
||||
Utils.checkNotNull(platform, "platform");
|
||||
this.platform = Optional.ofNullable(platform);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder platform(Optional<? extends String> platform) {
|
||||
Utils.checkNotNull(platform, "platform");
|
||||
this.platform = platform;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clientIdentifier(String clientIdentifier) {
|
||||
Utils.checkNotNull(clientIdentifier, "clientIdentifier");
|
||||
this.clientIdentifier = Optional.ofNullable(clientIdentifier);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clientIdentifier(Optional<? extends String> clientIdentifier) {
|
||||
Utils.checkNotNull(clientIdentifier, "clientIdentifier");
|
||||
this.clientIdentifier = clientIdentifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder createdAt(double createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = Optional.ofNullable(createdAt);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder createdAt(Optional<? extends Double> createdAt) {
|
||||
Utils.checkNotNull(createdAt, "createdAt");
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Device build() {
|
||||
return new Device(
|
||||
id,
|
||||
name,
|
||||
platform,
|
||||
clientIdentifier,
|
||||
createdAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Director {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("tag")
|
||||
private Optional<? extends String> tag;
|
||||
|
||||
public Director(
|
||||
@JsonProperty("tag") Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public Optional<? extends String> tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Director withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Director withTag(Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Director other = (Director) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Director.class,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> tag = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Director build() {
|
||||
return new Director(
|
||||
tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Directory {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("count")
|
||||
private Optional<? extends Double> count;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private Optional<? extends String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
public Directory(
|
||||
@JsonProperty("count") Optional<? extends Double> count,
|
||||
@JsonProperty("key") Optional<? extends String> key,
|
||||
@JsonProperty("title") Optional<? extends String> title) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
Utils.checkNotNull(key, "key");
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.count = count;
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> count() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public Optional<? extends String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Directory withCount(double count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = Optional.ofNullable(count);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Directory withCount(Optional<? extends Double> count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Directory withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Directory withKey(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Directory withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Directory withTitle(Optional<? extends 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;
|
||||
}
|
||||
Directory other = (Directory) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.count, other.count) &&
|
||||
java.util.Objects.deepEquals(this.key, other.key) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
count,
|
||||
key,
|
||||
title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Directory.class,
|
||||
"count", count,
|
||||
"key", key,
|
||||
"title", title);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> count = Optional.empty();
|
||||
|
||||
private Optional<? extends String> key = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder count(double count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = Optional.ofNullable(count);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder count(Optional<? extends Double> count) {
|
||||
Utils.checkNotNull(count, "count");
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Directory build() {
|
||||
return new Directory(
|
||||
count,
|
||||
key,
|
||||
title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* Download - Indicate that you want to start download any updates found.
|
||||
*/
|
||||
public enum Download {
|
||||
ZERO(0L),
|
||||
ONE(1L);
|
||||
|
||||
@JsonValue
|
||||
private final long value;
|
||||
|
||||
private Download(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public long value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class EnablePaperTrailErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public EnablePaperTrailErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnablePaperTrailErrors other = (EnablePaperTrailErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(EnablePaperTrailErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors build() {
|
||||
return new EnablePaperTrailErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class EnablePaperTrailRequestBuilder {
|
||||
|
||||
private final SDKMethodInterfaces.MethodCallEnablePaperTrail sdk;
|
||||
|
||||
public EnablePaperTrailRequestBuilder(SDKMethodInterfaces.MethodCallEnablePaperTrail sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponse call() throws Exception {
|
||||
|
||||
return sdk.enablePaperTrailDirect();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class EnablePaperTrailResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends EnablePaperTrailResponseBody> object;
|
||||
|
||||
public EnablePaperTrailResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends EnablePaperTrailResponseBody> object) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends EnablePaperTrailResponseBody> object() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public EnablePaperTrailResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public EnablePaperTrailResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public EnablePaperTrailResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public EnablePaperTrailResponse withObject(EnablePaperTrailResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public EnablePaperTrailResponse withObject(Optional<? extends EnablePaperTrailResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnablePaperTrailResponse other = (EnablePaperTrailResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.object, other.object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(EnablePaperTrailResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"object", object);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends EnablePaperTrailResponseBody> object = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(EnablePaperTrailResponseBody object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = Optional.ofNullable(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder object(Optional<? extends EnablePaperTrailResponseBody> object) {
|
||||
Utils.checkNotNull(object, "object");
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponse build() {
|
||||
return new EnablePaperTrailResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* EnablePaperTrailResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class EnablePaperTrailResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<EnablePaperTrailErrors>> errors;
|
||||
|
||||
public EnablePaperTrailResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<EnablePaperTrailErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<EnablePaperTrailErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody withErrors(java.util.List<EnablePaperTrailErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody withErrors(Optional<? extends java.util.List<EnablePaperTrailErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnablePaperTrailResponseBody other = (EnablePaperTrailResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(EnablePaperTrailResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<EnablePaperTrailErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<EnablePaperTrailErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<EnablePaperTrailErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody build() {
|
||||
return new EnablePaperTrailResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Errors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public Errors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Errors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Errors other = (Errors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Errors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors build() {
|
||||
return new Errors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Field {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private Optional<? extends String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("type")
|
||||
private Optional<? extends String> type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("subType")
|
||||
private Optional<? extends String> subType;
|
||||
|
||||
public Field(
|
||||
@JsonProperty("key") Optional<? extends String> key,
|
||||
@JsonProperty("title") Optional<? extends String> title,
|
||||
@JsonProperty("type") Optional<? extends String> type,
|
||||
@JsonProperty("subType") Optional<? extends 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 Optional<? extends String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Optional<? extends String> type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Optional<? extends String> subType() {
|
||||
return subType;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Field withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withKey(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withTitle(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withType(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withSubType(String subType) {
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.subType = Optional.ofNullable(subType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field withSubType(Optional<? extends 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;
|
||||
}
|
||||
Field other = (Field) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.key, other.key) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.type, other.type) &&
|
||||
java.util.Objects.deepEquals(this.subType, other.subType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
key,
|
||||
title,
|
||||
type,
|
||||
subType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Field.class,
|
||||
"key", key,
|
||||
"title", title,
|
||||
"type", type,
|
||||
"subType", subType);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> key = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Optional<? extends String> type = Optional.empty();
|
||||
|
||||
private Optional<? extends String> subType = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends 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<? extends String> subType) {
|
||||
Utils.checkNotNull(subType, "subType");
|
||||
this.subType = subType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Field build() {
|
||||
return new Field(
|
||||
key,
|
||||
title,
|
||||
type,
|
||||
subType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class FieldType {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("type")
|
||||
private Optional<? extends String> type;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Operator")
|
||||
private Optional<? extends java.util.List<Operator>> operator;
|
||||
|
||||
public FieldType(
|
||||
@JsonProperty("type") Optional<? extends String> type,
|
||||
@JsonProperty("Operator") Optional<? extends java.util.List<Operator>> operator) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.type = type;
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public Optional<? extends String> type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<Operator>> operator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public FieldType withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FieldType withType(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FieldType withOperator(java.util.List<Operator> operator) {
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.operator = Optional.ofNullable(operator);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FieldType withOperator(Optional<? extends java.util.List<Operator>> 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;
|
||||
}
|
||||
FieldType other = (FieldType) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.type, other.type) &&
|
||||
java.util.Objects.deepEquals(this.operator, other.operator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
type,
|
||||
operator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(FieldType.class,
|
||||
"type", type,
|
||||
"operator", operator);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> type = Optional.empty();
|
||||
|
||||
private Optional<? extends java.util.List<Operator>> operator = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder operator(java.util.List<Operator> operator) {
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.operator = Optional.ofNullable(operator);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder operator(Optional<? extends java.util.List<Operator>> operator) {
|
||||
Utils.checkNotNull(operator, "operator");
|
||||
this.operator = operator;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FieldType build() {
|
||||
return new FieldType(
|
||||
type,
|
||||
operator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Filter {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("filter")
|
||||
private Optional<? extends String> filter;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("filterType")
|
||||
private Optional<? extends String> filterType;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("key")
|
||||
private Optional<? extends String> key;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("title")
|
||||
private Optional<? extends String> title;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("type")
|
||||
private Optional<? extends String> type;
|
||||
|
||||
public Filter(
|
||||
@JsonProperty("filter") Optional<? extends String> filter,
|
||||
@JsonProperty("filterType") Optional<? extends String> filterType,
|
||||
@JsonProperty("key") Optional<? extends String> key,
|
||||
@JsonProperty("title") Optional<? extends String> title,
|
||||
@JsonProperty("type") Optional<? extends 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;
|
||||
}
|
||||
|
||||
public Optional<? extends String> filter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
public Optional<? extends String> filterType() {
|
||||
return filterType;
|
||||
}
|
||||
|
||||
public Optional<? extends String> key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public Optional<? extends String> title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Optional<? extends String> type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Filter withFilter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withFilter(Optional<? extends String> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withFilterType(String filterType) {
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
this.filterType = Optional.ofNullable(filterType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withFilterType(Optional<? extends String> filterType) {
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
this.filterType = filterType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withKey(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withTitle(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withType(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter withType(Optional<? extends 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;
|
||||
}
|
||||
Filter other = (Filter) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.filter, other.filter) &&
|
||||
java.util.Objects.deepEquals(this.filterType, other.filterType) &&
|
||||
java.util.Objects.deepEquals(this.key, other.key) &&
|
||||
java.util.Objects.deepEquals(this.title, other.title) &&
|
||||
java.util.Objects.deepEquals(this.type, other.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
filter,
|
||||
filterType,
|
||||
key,
|
||||
title,
|
||||
type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Filter.class,
|
||||
"filter", filter,
|
||||
"filterType", filterType,
|
||||
"key", key,
|
||||
"title", title,
|
||||
"type", type);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> filter = Optional.empty();
|
||||
|
||||
private Optional<? extends String> filterType = Optional.empty();
|
||||
|
||||
private Optional<? extends String> key = Optional.empty();
|
||||
|
||||
private Optional<? extends String> title = Optional.empty();
|
||||
|
||||
private Optional<? extends String> type = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder filter(String filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = Optional.ofNullable(filter);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filter(Optional<? extends String> filter) {
|
||||
Utils.checkNotNull(filter, "filter");
|
||||
this.filter = filter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filterType(String filterType) {
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
this.filterType = Optional.ofNullable(filterType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder filterType(Optional<? extends String> filterType) {
|
||||
Utils.checkNotNull(filterType, "filterType");
|
||||
this.filterType = filterType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = Optional.ofNullable(key);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder key(Optional<? extends String> key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = Optional.ofNullable(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder title(Optional<? extends String> title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = Optional.ofNullable(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(Optional<? extends String> type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Filter build() {
|
||||
return new Filter(
|
||||
filter,
|
||||
filterType,
|
||||
key,
|
||||
title,
|
||||
type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* Force - Force overwriting of duplicate playlists.
|
||||
* By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
public enum Force {
|
||||
ZERO(0L),
|
||||
ONE(1L);
|
||||
|
||||
@JsonValue
|
||||
private final long value;
|
||||
|
||||
private Force(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public long value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class Genre {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("tag")
|
||||
private Optional<? extends String> tag;
|
||||
|
||||
public Genre(
|
||||
@JsonProperty("tag") Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public Optional<? extends String> tag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Genre withTag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Genre withTag(Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Genre other = (Genre) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.tag, other.tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(Genre.class,
|
||||
"tag", tag);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends String> tag = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder tag(String tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = Optional.ofNullable(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder tag(Optional<? extends String> tag) {
|
||||
Utils.checkNotNull(tag, "tag");
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Genre build() {
|
||||
return new Genre(
|
||||
tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetAvailableClientsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public GetAvailableClientsErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsErrors other = (GetAvailableClientsErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors build() {
|
||||
return new GetAvailableClientsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetAvailableClientsMediaContainer {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<? extends Double> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Server")
|
||||
private Optional<? extends java.util.List<Server>> server;
|
||||
|
||||
public GetAvailableClientsMediaContainer(
|
||||
@JsonProperty("size") Optional<? extends Double> size,
|
||||
@JsonProperty("Server") Optional<? extends java.util.List<Server>> server) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(server, "server");
|
||||
this.size = size;
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<Server>> server() {
|
||||
return server;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsMediaContainer withSize(double size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsMediaContainer withSize(Optional<? extends Double> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsMediaContainer withServer(java.util.List<Server> server) {
|
||||
Utils.checkNotNull(server, "server");
|
||||
this.server = Optional.ofNullable(server);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsMediaContainer withServer(Optional<? extends java.util.List<Server>> server) {
|
||||
Utils.checkNotNull(server, "server");
|
||||
this.server = server;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsMediaContainer other = (GetAvailableClientsMediaContainer) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.size, other.size) &&
|
||||
java.util.Objects.deepEquals(this.server, other.server);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
size,
|
||||
server);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsMediaContainer.class,
|
||||
"size", size,
|
||||
"server", server);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> size = Optional.empty();
|
||||
|
||||
private Optional<? extends java.util.List<Server>> server = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder size(double size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder size(Optional<? extends Double> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder server(java.util.List<Server> server) {
|
||||
Utils.checkNotNull(server, "server");
|
||||
this.server = Optional.ofNullable(server);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder server(Optional<? extends java.util.List<Server>> server) {
|
||||
Utils.checkNotNull(server, "server");
|
||||
this.server = server;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsMediaContainer build() {
|
||||
return new GetAvailableClientsMediaContainer(
|
||||
size,
|
||||
server);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class GetAvailableClientsRequestBuilder {
|
||||
|
||||
private final SDKMethodInterfaces.MethodCallGetAvailableClients sdk;
|
||||
|
||||
public GetAvailableClientsRequestBuilder(SDKMethodInterfaces.MethodCallGetAvailableClients sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponse call() throws Exception {
|
||||
|
||||
return sdk.getAvailableClientsDirect();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetAvailableClientsResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Available Clients
|
||||
*/
|
||||
private Optional<? extends GetAvailableClientsResponseBody> twoHundredApplicationJsonObject;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends GetAvailableClientsServerResponseBody> fourHundredAndOneApplicationJsonObject;
|
||||
|
||||
public GetAvailableClientsResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends GetAvailableClientsResponseBody> twoHundredApplicationJsonObject,
|
||||
Optional<? extends GetAvailableClientsServerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Available Clients
|
||||
*/
|
||||
public Optional<? extends GetAvailableClientsResponseBody> twoHundredApplicationJsonObject() {
|
||||
return twoHundredApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends GetAvailableClientsServerResponseBody> fourHundredAndOneApplicationJsonObject() {
|
||||
return fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public GetAvailableClientsResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public GetAvailableClientsResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAvailableClientsResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Available Clients
|
||||
*/
|
||||
public GetAvailableClientsResponse withTwoHundredApplicationJsonObject(GetAvailableClientsResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Available Clients
|
||||
*/
|
||||
public GetAvailableClientsResponse withTwoHundredApplicationJsonObject(Optional<? extends GetAvailableClientsResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public GetAvailableClientsResponse withFourHundredAndOneApplicationJsonObject(GetAvailableClientsServerResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public GetAvailableClientsResponse withFourHundredAndOneApplicationJsonObject(Optional<? extends GetAvailableClientsServerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsResponse other = (GetAvailableClientsResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) &&
|
||||
java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"twoHundredApplicationJsonObject", twoHundredApplicationJsonObject,
|
||||
"fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends GetAvailableClientsResponseBody> twoHundredApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Optional<? extends GetAvailableClientsServerResponseBody> fourHundredAndOneApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Available Clients
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(GetAvailableClientsResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Available Clients
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(Optional<? extends GetAvailableClientsResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(GetAvailableClientsServerResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(Optional<? extends GetAvailableClientsServerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponse build() {
|
||||
return new GetAvailableClientsResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* GetAvailableClientsResponseBody - Available Clients
|
||||
*/
|
||||
|
||||
public class GetAvailableClientsResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("MediaContainer")
|
||||
private Optional<? extends GetAvailableClientsMediaContainer> mediaContainer;
|
||||
|
||||
public GetAvailableClientsResponseBody(
|
||||
@JsonProperty("MediaContainer") Optional<? extends GetAvailableClientsMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
}
|
||||
|
||||
public Optional<? extends GetAvailableClientsMediaContainer> mediaContainer() {
|
||||
return mediaContainer;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody withMediaContainer(GetAvailableClientsMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody withMediaContainer(Optional<? extends GetAvailableClientsMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsResponseBody other = (GetAvailableClientsResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
mediaContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsResponseBody.class,
|
||||
"mediaContainer", mediaContainer);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends GetAvailableClientsMediaContainer> mediaContainer = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder mediaContainer(GetAvailableClientsMediaContainer mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder mediaContainer(Optional<? extends GetAvailableClientsMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody build() {
|
||||
return new GetAvailableClientsResponseBody(
|
||||
mediaContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* GetAvailableClientsServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class GetAvailableClientsServerResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<GetAvailableClientsErrors>> errors;
|
||||
|
||||
public GetAvailableClientsServerResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<GetAvailableClientsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<GetAvailableClientsErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerResponseBody withErrors(java.util.List<GetAvailableClientsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerResponseBody withErrors(Optional<? extends java.util.List<GetAvailableClientsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsServerResponseBody other = (GetAvailableClientsServerResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsServerResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<GetAvailableClientsErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<GetAvailableClientsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<GetAvailableClientsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerResponseBody build() {
|
||||
return new GetAvailableClientsServerResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* GetButlerTasksButlerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
|
||||
public class GetButlerTasksButlerResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends java.util.List<GetButlerTasksErrors>> errors;
|
||||
|
||||
public GetButlerTasksButlerResponseBody(
|
||||
@JsonProperty("errors") Optional<? extends java.util.List<GetButlerTasksErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<GetButlerTasksErrors>> errors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerResponseBody withErrors(java.util.List<GetButlerTasksErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerResponseBody withErrors(Optional<? extends java.util.List<GetButlerTasksErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksButlerResponseBody other = (GetButlerTasksButlerResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.errors, other.errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksButlerResponseBody.class,
|
||||
"errors", errors);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends java.util.List<GetButlerTasksErrors>> errors = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(java.util.List<GetButlerTasksErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends java.util.List<GetButlerTasksErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerResponseBody build() {
|
||||
return new GetButlerTasksButlerResponseBody(
|
||||
errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetButlerTasksErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public GetButlerTasksErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksErrors other = (GetButlerTasksErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors build() {
|
||||
return new GetButlerTasksErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class GetButlerTasksRequestBuilder {
|
||||
|
||||
private final SDKMethodInterfaces.MethodCallGetButlerTasks sdk;
|
||||
|
||||
public GetButlerTasksRequestBuilder(SDKMethodInterfaces.MethodCallGetButlerTasks sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponse call() throws Exception {
|
||||
|
||||
return sdk.getButlerTasksDirect();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetButlerTasksResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* All butler tasks
|
||||
*/
|
||||
private Optional<? extends GetButlerTasksResponseBody> twoHundredApplicationJsonObject;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends GetButlerTasksButlerResponseBody> fourHundredAndOneApplicationJsonObject;
|
||||
|
||||
public GetButlerTasksResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends GetButlerTasksResponseBody> twoHundredApplicationJsonObject,
|
||||
Optional<? extends GetButlerTasksButlerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* All butler tasks
|
||||
*/
|
||||
public Optional<? extends GetButlerTasksResponseBody> twoHundredApplicationJsonObject() {
|
||||
return twoHundredApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends GetButlerTasksButlerResponseBody> fourHundredAndOneApplicationJsonObject() {
|
||||
return fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public GetButlerTasksResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public GetButlerTasksResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetButlerTasksResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* All butler tasks
|
||||
*/
|
||||
public GetButlerTasksResponse withTwoHundredApplicationJsonObject(GetButlerTasksResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* All butler tasks
|
||||
*/
|
||||
public GetButlerTasksResponse withTwoHundredApplicationJsonObject(Optional<? extends GetButlerTasksResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public GetButlerTasksResponse withFourHundredAndOneApplicationJsonObject(GetButlerTasksButlerResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public GetButlerTasksResponse withFourHundredAndOneApplicationJsonObject(Optional<? extends GetButlerTasksButlerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksResponse other = (GetButlerTasksResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) &&
|
||||
java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"twoHundredApplicationJsonObject", twoHundredApplicationJsonObject,
|
||||
"fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends GetButlerTasksResponseBody> twoHundredApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Optional<? extends GetButlerTasksButlerResponseBody> fourHundredAndOneApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* All butler tasks
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(GetButlerTasksResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* All butler tasks
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(Optional<? extends GetButlerTasksResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(GetButlerTasksButlerResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(Optional<? extends GetButlerTasksButlerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponse build() {
|
||||
return new GetButlerTasksResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
/**
|
||||
* GetButlerTasksResponseBody - All butler tasks
|
||||
*/
|
||||
|
||||
public class GetButlerTasksResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("ButlerTasks")
|
||||
private Optional<? extends ButlerTasks> butlerTasks;
|
||||
|
||||
public GetButlerTasksResponseBody(
|
||||
@JsonProperty("ButlerTasks") Optional<? extends ButlerTasks> butlerTasks) {
|
||||
Utils.checkNotNull(butlerTasks, "butlerTasks");
|
||||
this.butlerTasks = butlerTasks;
|
||||
}
|
||||
|
||||
public Optional<? extends ButlerTasks> butlerTasks() {
|
||||
return butlerTasks;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody withButlerTasks(ButlerTasks butlerTasks) {
|
||||
Utils.checkNotNull(butlerTasks, "butlerTasks");
|
||||
this.butlerTasks = Optional.ofNullable(butlerTasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody withButlerTasks(Optional<? extends ButlerTasks> butlerTasks) {
|
||||
Utils.checkNotNull(butlerTasks, "butlerTasks");
|
||||
this.butlerTasks = butlerTasks;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksResponseBody other = (GetButlerTasksResponseBody) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.butlerTasks, other.butlerTasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
butlerTasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksResponseBody.class,
|
||||
"butlerTasks", butlerTasks);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends ButlerTasks> butlerTasks = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder butlerTasks(ButlerTasks butlerTasks) {
|
||||
Utils.checkNotNull(butlerTasks, "butlerTasks");
|
||||
this.butlerTasks = Optional.ofNullable(butlerTasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder butlerTasks(Optional<? extends ButlerTasks> butlerTasks) {
|
||||
Utils.checkNotNull(butlerTasks, "butlerTasks");
|
||||
this.butlerTasks = butlerTasks;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody build() {
|
||||
return new GetButlerTasksResponseBody(
|
||||
butlerTasks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetDevicesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<? extends Double> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<? extends String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<? extends Double> status;
|
||||
|
||||
public GetDevicesErrors(
|
||||
@JsonProperty("code") Optional<? extends Double> code,
|
||||
@JsonProperty("message") Optional<? extends String> message,
|
||||
@JsonProperty("status") Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Optional<? extends String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetDevicesErrors withCode(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withCode(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withMessage(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withStatus(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withStatus(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetDevicesErrors other = (GetDevicesErrors) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.code, other.code) &&
|
||||
java.util.Objects.deepEquals(this.message, other.message) &&
|
||||
java.util.Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetDevicesErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> code = Optional.empty();
|
||||
|
||||
private Optional<? extends String> message = Optional.empty();
|
||||
|
||||
private Optional<? extends Double> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<? extends Double> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<? extends String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<? extends Double> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors build() {
|
||||
return new GetDevicesErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetDevicesMediaContainer {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("size")
|
||||
private Optional<? extends Double> size;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("identifier")
|
||||
private Optional<? extends String> identifier;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Device")
|
||||
private Optional<? extends java.util.List<Device>> device;
|
||||
|
||||
public GetDevicesMediaContainer(
|
||||
@JsonProperty("size") Optional<? extends Double> size,
|
||||
@JsonProperty("identifier") Optional<? extends String> identifier,
|
||||
@JsonProperty("Device") Optional<? extends java.util.List<Device>> device) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
Utils.checkNotNull(device, "device");
|
||||
this.size = size;
|
||||
this.identifier = identifier;
|
||||
this.device = device;
|
||||
}
|
||||
|
||||
public Optional<? extends Double> size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public Optional<? extends String> identifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public Optional<? extends java.util.List<Device>> device() {
|
||||
return device;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer withSize(double size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer withSize(Optional<? extends Double> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer withIdentifier(String identifier) {
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
this.identifier = Optional.ofNullable(identifier);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer withIdentifier(Optional<? extends String> identifier) {
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer withDevice(java.util.List<Device> device) {
|
||||
Utils.checkNotNull(device, "device");
|
||||
this.device = Optional.ofNullable(device);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer withDevice(Optional<? extends java.util.List<Device>> device) {
|
||||
Utils.checkNotNull(device, "device");
|
||||
this.device = device;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetDevicesMediaContainer other = (GetDevicesMediaContainer) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.size, other.size) &&
|
||||
java.util.Objects.deepEquals(this.identifier, other.identifier) &&
|
||||
java.util.Objects.deepEquals(this.device, other.device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
size,
|
||||
identifier,
|
||||
device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetDevicesMediaContainer.class,
|
||||
"size", size,
|
||||
"identifier", identifier,
|
||||
"device", device);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends Double> size = Optional.empty();
|
||||
|
||||
private Optional<? extends String> identifier = Optional.empty();
|
||||
|
||||
private Optional<? extends java.util.List<Device>> device = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder size(double size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = Optional.ofNullable(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder size(Optional<? extends Double> size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder identifier(String identifier) {
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
this.identifier = Optional.ofNullable(identifier);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder identifier(Optional<? extends String> identifier) {
|
||||
Utils.checkNotNull(identifier, "identifier");
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder device(java.util.List<Device> device) {
|
||||
Utils.checkNotNull(device, "device");
|
||||
this.device = Optional.ofNullable(device);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder device(Optional<? extends java.util.List<Device>> device) {
|
||||
Utils.checkNotNull(device, "device");
|
||||
this.device = device;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesMediaContainer build() {
|
||||
return new GetDevicesMediaContainer(
|
||||
size,
|
||||
identifier,
|
||||
device);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import lukehagar.plexapi.plexapi.models.errors.SDKError;
|
||||
import lukehagar.plexapi.plexapi.utils.LazySingletonValue;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
||||
public class GetDevicesRequestBuilder {
|
||||
|
||||
private final SDKMethodInterfaces.MethodCallGetDevices sdk;
|
||||
|
||||
public GetDevicesRequestBuilder(SDKMethodInterfaces.MethodCallGetDevices sdk) {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public GetDevicesResponse call() throws Exception {
|
||||
|
||||
return sdk.getDevicesDirect();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package lukehagar.plexapi.plexapi.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Deprecated;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.utils.Utils;
|
||||
|
||||
|
||||
public class GetDevicesResponse implements lukehagar.plexapi.plexapi.utils.Response {
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
private String contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
private int statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
/**
|
||||
* Devices
|
||||
*/
|
||||
private Optional<? extends GetDevicesResponseBody> twoHundredApplicationJsonObject;
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
private Optional<? extends GetDevicesServerResponseBody> fourHundredAndOneApplicationJsonObject;
|
||||
|
||||
public GetDevicesResponse(
|
||||
String contentType,
|
||||
int statusCode,
|
||||
HttpResponse<InputStream> rawResponse,
|
||||
Optional<? extends GetDevicesResponseBody> twoHundredApplicationJsonObject,
|
||||
Optional<? extends GetDevicesServerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.contentType = contentType;
|
||||
this.statusCode = statusCode;
|
||||
this.rawResponse = rawResponse;
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public String contentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public int statusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public HttpResponse<InputStream> rawResponse() {
|
||||
return rawResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devices
|
||||
*/
|
||||
public Optional<? extends GetDevicesResponseBody> twoHundredApplicationJsonObject() {
|
||||
return twoHundredApplicationJsonObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Optional<? extends GetDevicesServerResponseBody> fourHundredAndOneApplicationJsonObject() {
|
||||
return fourHundredAndOneApplicationJsonObject;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public GetDevicesResponse withContentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public GetDevicesResponse withStatusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetDevicesResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devices
|
||||
*/
|
||||
public GetDevicesResponse withTwoHundredApplicationJsonObject(GetDevicesResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devices
|
||||
*/
|
||||
public GetDevicesResponse withTwoHundredApplicationJsonObject(Optional<? extends GetDevicesResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public GetDevicesResponse withFourHundredAndOneApplicationJsonObject(GetDevicesServerResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public GetDevicesResponse withFourHundredAndOneApplicationJsonObject(Optional<? extends GetDevicesServerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetDevicesResponse other = (GetDevicesResponse) o;
|
||||
return
|
||||
java.util.Objects.deepEquals(this.contentType, other.contentType) &&
|
||||
java.util.Objects.deepEquals(this.statusCode, other.statusCode) &&
|
||||
java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) &&
|
||||
java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) &&
|
||||
java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetDevicesResponse.class,
|
||||
"contentType", contentType,
|
||||
"statusCode", statusCode,
|
||||
"rawResponse", rawResponse,
|
||||
"twoHundredApplicationJsonObject", twoHundredApplicationJsonObject,
|
||||
"fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private String contentType;
|
||||
|
||||
private Integer statusCode;
|
||||
|
||||
private HttpResponse<InputStream> rawResponse;
|
||||
|
||||
private Optional<? extends GetDevicesResponseBody> twoHundredApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Optional<? extends GetDevicesServerResponseBody> fourHundredAndOneApplicationJsonObject = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
public Builder contentType(String contentType) {
|
||||
Utils.checkNotNull(contentType, "contentType");
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
public Builder statusCode(int statusCode) {
|
||||
Utils.checkNotNull(statusCode, "statusCode");
|
||||
this.statusCode = statusCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devices
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(GetDevicesResponseBody twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devices
|
||||
*/
|
||||
public Builder twoHundredApplicationJsonObject(Optional<? extends GetDevicesResponseBody> twoHundredApplicationJsonObject) {
|
||||
Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject");
|
||||
this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(GetDevicesServerResponseBody fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public Builder fourHundredAndOneApplicationJsonObject(Optional<? extends GetDevicesServerResponseBody> fourHundredAndOneApplicationJsonObject) {
|
||||
Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject");
|
||||
this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesResponse build() {
|
||||
return new GetDevicesResponse(
|
||||
contentType,
|
||||
statusCode,
|
||||
rawResponse,
|
||||
twoHundredApplicationJsonObject,
|
||||
fourHundredAndOneApplicationJsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user