ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6

This commit is contained in:
speakeasybot
2024-09-13 00:25:35 +00:00
parent f83d7949e1
commit 5585a18ab9
652 changed files with 34020 additions and 4554 deletions

View File

@@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
@@ -80,21 +81,21 @@ public class GetAllLibrariesDirectory {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("updatedAt")
private Optional<Integer> updatedAt;
private Optional<Long> updatedAt;
/**
* Unix epoch datetime
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("createdAt")
private Optional<Integer> createdAt;
private Optional<Long> createdAt;
/**
* Unix epoch datetime
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("scannedAt")
private Optional<Integer> scannedAt;
private Optional<Long> scannedAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("content")
@@ -131,9 +132,9 @@ public class GetAllLibrariesDirectory {
@JsonProperty("scanner") Optional<String> scanner,
@JsonProperty("language") Optional<String> language,
@JsonProperty("uuid") Optional<String> uuid,
@JsonProperty("updatedAt") Optional<Integer> updatedAt,
@JsonProperty("createdAt") Optional<Integer> createdAt,
@JsonProperty("scannedAt") Optional<Integer> scannedAt,
@JsonProperty("updatedAt") Optional<Long> updatedAt,
@JsonProperty("createdAt") Optional<Long> createdAt,
@JsonProperty("scannedAt") Optional<Long> scannedAt,
@JsonProperty("content") Optional<Boolean> content,
@JsonProperty("directory") Optional<Boolean> directory,
@JsonProperty("contentChangedAt") Optional<Integer> contentChangedAt,
@@ -256,7 +257,7 @@ public class GetAllLibrariesDirectory {
* Unix epoch datetime
*/
@JsonIgnore
public Optional<Integer> updatedAt() {
public Optional<Long> updatedAt() {
return updatedAt;
}
@@ -264,7 +265,7 @@ public class GetAllLibrariesDirectory {
* Unix epoch datetime
*/
@JsonIgnore
public Optional<Integer> createdAt() {
public Optional<Long> createdAt() {
return createdAt;
}
@@ -272,7 +273,7 @@ public class GetAllLibrariesDirectory {
* Unix epoch datetime
*/
@JsonIgnore
public Optional<Integer> scannedAt() {
public Optional<Long> scannedAt() {
return scannedAt;
}
@@ -465,7 +466,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withUpdatedAt(int updatedAt) {
public GetAllLibrariesDirectory withUpdatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = Optional.ofNullable(updatedAt);
return this;
@@ -474,7 +475,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withUpdatedAt(Optional<Integer> updatedAt) {
public GetAllLibrariesDirectory withUpdatedAt(Optional<Long> updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
return this;
@@ -483,7 +484,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withCreatedAt(int createdAt) {
public GetAllLibrariesDirectory withCreatedAt(long createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = Optional.ofNullable(createdAt);
return this;
@@ -492,7 +493,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withCreatedAt(Optional<Integer> createdAt) {
public GetAllLibrariesDirectory withCreatedAt(Optional<Long> createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = createdAt;
return this;
@@ -501,7 +502,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withScannedAt(int scannedAt) {
public GetAllLibrariesDirectory withScannedAt(long scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = Optional.ofNullable(scannedAt);
return this;
@@ -510,7 +511,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withScannedAt(Optional<Integer> scannedAt) {
public GetAllLibrariesDirectory withScannedAt(Optional<Long> scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = scannedAt;
return this;
@@ -689,11 +690,11 @@ public class GetAllLibrariesDirectory {
private Optional<String> uuid = Optional.empty();
private Optional<Integer> updatedAt = Optional.empty();
private Optional<Long> updatedAt = Optional.empty();
private Optional<Integer> createdAt = Optional.empty();
private Optional<Long> createdAt = Optional.empty();
private Optional<Integer> scannedAt = Optional.empty();
private Optional<Long> scannedAt = Optional.empty();
private Optional<Boolean> content = Optional.empty();
@@ -868,7 +869,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public Builder updatedAt(int updatedAt) {
public Builder updatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = Optional.ofNullable(updatedAt);
return this;
@@ -877,7 +878,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public Builder updatedAt(Optional<Integer> updatedAt) {
public Builder updatedAt(Optional<Long> updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
return this;
@@ -886,7 +887,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public Builder createdAt(int createdAt) {
public Builder createdAt(long createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = Optional.ofNullable(createdAt);
return this;
@@ -895,7 +896,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public Builder createdAt(Optional<Integer> createdAt) {
public Builder createdAt(Optional<Long> createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = createdAt;
return this;
@@ -904,7 +905,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public Builder scannedAt(int scannedAt) {
public Builder scannedAt(long scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = Optional.ofNullable(scannedAt);
return this;
@@ -913,7 +914,7 @@ public class GetAllLibrariesDirectory {
/**
* Unix epoch datetime
*/
public Builder scannedAt(Optional<Integer> scannedAt) {
public Builder scannedAt(Optional<Long> scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = scannedAt;
return this;

View File

@@ -29,12 +29,6 @@ public class GetServerResourcesRequest {
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")
private Optional<String> xPlexClientIdentifier;
/**
* Plex Authentication Token
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")
private String xPlexToken;
/**
* Include Https entries in the results
*/
@@ -58,25 +52,21 @@ public class GetServerResourcesRequest {
@JsonCreator
public GetServerResourcesRequest(
Optional<String> xPlexClientIdentifier,
String xPlexToken,
Optional<? extends IncludeHttps> includeHttps,
Optional<? extends IncludeRelay> includeRelay,
Optional<? extends IncludeIPv6> includeIPv6) {
Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier");
Utils.checkNotNull(xPlexToken, "xPlexToken");
Utils.checkNotNull(includeHttps, "includeHttps");
Utils.checkNotNull(includeRelay, "includeRelay");
Utils.checkNotNull(includeIPv6, "includeIPv6");
this.xPlexClientIdentifier = xPlexClientIdentifier;
this.xPlexToken = xPlexToken;
this.includeHttps = includeHttps;
this.includeRelay = includeRelay;
this.includeIPv6 = includeIPv6;
}
public GetServerResourcesRequest(
String xPlexToken) {
this(Optional.empty(), xPlexToken, Optional.empty(), Optional.empty(), Optional.empty());
public GetServerResourcesRequest() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -90,14 +80,6 @@ public class GetServerResourcesRequest {
return xPlexClientIdentifier;
}
/**
* Plex Authentication Token
*/
@JsonIgnore
public String xPlexToken() {
return xPlexToken;
}
/**
* Include Https entries in the results
*/
@@ -155,15 +137,6 @@ public class GetServerResourcesRequest {
return this;
}
/**
* Plex Authentication Token
*/
public GetServerResourcesRequest withXPlexToken(String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
return this;
}
/**
* Include Https entries in the results
*/
@@ -233,7 +206,6 @@ public class GetServerResourcesRequest {
GetServerResourcesRequest other = (GetServerResourcesRequest) o;
return
Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier) &&
Objects.deepEquals(this.xPlexToken, other.xPlexToken) &&
Objects.deepEquals(this.includeHttps, other.includeHttps) &&
Objects.deepEquals(this.includeRelay, other.includeRelay) &&
Objects.deepEquals(this.includeIPv6, other.includeIPv6);
@@ -243,7 +215,6 @@ public class GetServerResourcesRequest {
public int hashCode() {
return Objects.hash(
xPlexClientIdentifier,
xPlexToken,
includeHttps,
includeRelay,
includeIPv6);
@@ -253,7 +224,6 @@ public class GetServerResourcesRequest {
public String toString() {
return Utils.toString(GetServerResourcesRequest.class,
"xPlexClientIdentifier", xPlexClientIdentifier,
"xPlexToken", xPlexToken,
"includeHttps", includeHttps,
"includeRelay", includeRelay,
"includeIPv6", includeIPv6);
@@ -263,8 +233,6 @@ public class GetServerResourcesRequest {
private Optional<String> xPlexClientIdentifier = Optional.empty();
private String xPlexToken;
private Optional<? extends IncludeHttps> includeHttps;
private Optional<? extends IncludeRelay> includeRelay;
@@ -299,15 +267,6 @@ public class GetServerResourcesRequest {
return this;
}
/**
* Plex Authentication Token
*/
public Builder xPlexToken(String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
return this;
}
/**
* Include Https entries in the results
*/
@@ -377,7 +336,6 @@ public class GetServerResourcesRequest {
includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value();
} return new GetServerResourcesRequest(
xPlexClientIdentifier,
xPlexToken,
includeHttps,
includeRelay,
includeIPv6);

View File

@@ -4,23 +4,79 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.Utils;
import java.lang.String;
import java.util.Optional;
public class GetServerResourcesRequestBuilder {
private GetServerResourcesRequest request;
private Optional<String> xPlexClientIdentifier = Optional.empty();
private Optional<? extends IncludeHttps> includeHttps = Utils.readDefaultOrConstValue(
"includeHttps",
"0",
new TypeReference<Optional<? extends IncludeHttps>>() {});
private Optional<? extends IncludeRelay> includeRelay = Utils.readDefaultOrConstValue(
"includeRelay",
"0",
new TypeReference<Optional<? extends IncludeRelay>>() {});
private Optional<? extends IncludeIPv6> includeIPv6 = Utils.readDefaultOrConstValue(
"includeIPv6",
"0",
new TypeReference<Optional<? extends IncludeIPv6>>() {});
private Optional<String> serverURL = Optional.empty();
private final SDKMethodInterfaces.MethodCallGetServerResources sdk;
public GetServerResourcesRequestBuilder(SDKMethodInterfaces.MethodCallGetServerResources sdk) {
this.sdk = sdk;
}
public GetServerResourcesRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) {
Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier");
this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier);
return this;
}
public GetServerResourcesRequestBuilder request(dev.plexapi.sdk.models.operations.GetServerResourcesRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
public GetServerResourcesRequestBuilder xPlexClientIdentifier(java.util.Optional<java.lang.String> xPlexClientIdentifier) {
Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier");
this.xPlexClientIdentifier = xPlexClientIdentifier;
return this;
}
public GetServerResourcesRequestBuilder includeHttps(dev.plexapi.sdk.models.operations.IncludeHttps includeHttps) {
Utils.checkNotNull(includeHttps, "includeHttps");
this.includeHttps = Optional.of(includeHttps);
return this;
}
public GetServerResourcesRequestBuilder includeHttps(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeHttps> includeHttps) {
Utils.checkNotNull(includeHttps, "includeHttps");
this.includeHttps = includeHttps;
return this;
}
public GetServerResourcesRequestBuilder includeRelay(dev.plexapi.sdk.models.operations.IncludeRelay includeRelay) {
Utils.checkNotNull(includeRelay, "includeRelay");
this.includeRelay = Optional.of(includeRelay);
return this;
}
public GetServerResourcesRequestBuilder includeRelay(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeRelay> includeRelay) {
Utils.checkNotNull(includeRelay, "includeRelay");
this.includeRelay = includeRelay;
return this;
}
public GetServerResourcesRequestBuilder includeIPv6(dev.plexapi.sdk.models.operations.IncludeIPv6 includeIPv6) {
Utils.checkNotNull(includeIPv6, "includeIPv6");
this.includeIPv6 = Optional.of(includeIPv6);
return this;
}
public GetServerResourcesRequestBuilder includeIPv6(java.util.Optional<? extends dev.plexapi.sdk.models.operations.IncludeIPv6> includeIPv6) {
Utils.checkNotNull(includeIPv6, "includeIPv6");
this.includeIPv6 = includeIPv6;
return this;
}
@@ -37,9 +93,38 @@ public class GetServerResourcesRequestBuilder {
}
public GetServerResourcesResponse call() throws Exception {
if (includeHttps == null) {
includeHttps = _SINGLETON_VALUE_IncludeHttps.value();
}
if (includeRelay == null) {
includeRelay = _SINGLETON_VALUE_IncludeRelay.value();
}
if (includeIPv6 == null) {
includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value();
}
return sdk.getServerResources(
request,
xPlexClientIdentifier,
includeHttps,
includeRelay,
includeIPv6,
serverURL);
}
private static final LazySingletonValue<Optional<? extends IncludeHttps>> _SINGLETON_VALUE_IncludeHttps =
new LazySingletonValue<>(
"includeHttps",
"0",
new TypeReference<Optional<? extends IncludeHttps>>() {});
private static final LazySingletonValue<Optional<? extends IncludeRelay>> _SINGLETON_VALUE_IncludeRelay =
new LazySingletonValue<>(
"includeRelay",
"0",
new TypeReference<Optional<? extends IncludeRelay>>() {});
private static final LazySingletonValue<Optional<? extends IncludeIPv6>> _SINGLETON_VALUE_IncludeIPv6 =
new LazySingletonValue<>(
"includeIPv6",
"0",
new TypeReference<Optional<? extends IncludeIPv6>>() {});
}

View File

@@ -8,16 +8,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* GetUserDetailsAuthenticationResponseStatus - String representation of subscriptionActive
* GetTokenDetailsAuthenticationResponseStatus - String representation of subscriptionActive
*/
public enum GetUserDetailsAuthenticationResponseStatus {
public enum GetTokenDetailsAuthenticationResponseStatus {
INACTIVE("Inactive"),
ACTIVE("Active");
@JsonValue
private final String value;
private GetUserDetailsAuthenticationResponseStatus(String value) {
private GetTokenDetailsAuthenticationResponseStatus(String value) {
this.value = value;
}

View File

@@ -8,16 +8,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* GetUserDetailsAuthenticationStatus - String representation of subscriptionActive
* GetTokenDetailsAuthenticationStatus - String representation of subscriptionActive
*/
public enum GetUserDetailsAuthenticationStatus {
public enum GetTokenDetailsAuthenticationStatus {
INACTIVE("Inactive"),
ACTIVE("Active");
@JsonValue
private final String value;
private GetUserDetailsAuthenticationStatus(String value) {
private GetTokenDetailsAuthenticationStatus(String value) {
this.value = value;
}

View File

@@ -7,7 +7,7 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
public enum GetUserDetailsFeatures {
public enum GetTokenDetailsFeatures {
ANDROID_DOLBY_VISION("Android - Dolby Vision"),
ANDROID_PI_P("Android - PiP"),
CU_SUNSET("CU Sunset"),
@@ -71,7 +71,7 @@ public enum GetUserDetailsFeatures {
@JsonValue
private final String value;
private GetUserDetailsFeatures(String value) {
private GetTokenDetailsFeatures(String value) {
this.value = value;
}

View File

@@ -0,0 +1,37 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import dev.plexapi.sdk.utils.Utils;
import java.lang.String;
import java.util.Optional;
public class GetTokenDetailsRequestBuilder {
private Optional<String> serverURL = Optional.empty();
private final SDKMethodInterfaces.MethodCallGetTokenDetails sdk;
public GetTokenDetailsRequestBuilder(SDKMethodInterfaces.MethodCallGetTokenDetails sdk) {
this.sdk = sdk;
}
public GetTokenDetailsRequestBuilder serverURL(java.lang.String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetTokenDetailsRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;
}
public GetTokenDetailsResponse call() throws Exception {
return sdk.getTokenDetails(
serverURL);
}
}

View File

@@ -19,7 +19,7 @@ import java.util.Objects;
import java.util.Optional;
public class GetUserDetailsResponse implements Response {
public class GetTokenDetailsResponse implements Response {
/**
* HTTP response content type for this operation
@@ -39,14 +39,14 @@ public class GetUserDetailsResponse implements Response {
/**
* Logged in user details
*/
private Optional<? extends GetUserDetailsUserPlexAccount> userPlexAccount;
private Optional<? extends GetTokenDetailsUserPlexAccount> userPlexAccount;
@JsonCreator
public GetUserDetailsResponse(
public GetTokenDetailsResponse(
String contentType,
int statusCode,
HttpResponse<InputStream> rawResponse,
Optional<? extends GetUserDetailsUserPlexAccount> userPlexAccount) {
Optional<? extends GetTokenDetailsUserPlexAccount> userPlexAccount) {
Utils.checkNotNull(contentType, "contentType");
Utils.checkNotNull(statusCode, "statusCode");
Utils.checkNotNull(rawResponse, "rawResponse");
@@ -57,7 +57,7 @@ public class GetUserDetailsResponse implements Response {
this.userPlexAccount = userPlexAccount;
}
public GetUserDetailsResponse(
public GetTokenDetailsResponse(
String contentType,
int statusCode,
HttpResponse<InputStream> rawResponse) {
@@ -93,8 +93,8 @@ public class GetUserDetailsResponse implements Response {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetUserDetailsUserPlexAccount> userPlexAccount() {
return (Optional<GetUserDetailsUserPlexAccount>) userPlexAccount;
public Optional<GetTokenDetailsUserPlexAccount> userPlexAccount() {
return (Optional<GetTokenDetailsUserPlexAccount>) userPlexAccount;
}
public final static Builder builder() {
@@ -104,7 +104,7 @@ public class GetUserDetailsResponse implements Response {
/**
* HTTP response content type for this operation
*/
public GetUserDetailsResponse withContentType(String contentType) {
public GetTokenDetailsResponse withContentType(String contentType) {
Utils.checkNotNull(contentType, "contentType");
this.contentType = contentType;
return this;
@@ -113,7 +113,7 @@ public class GetUserDetailsResponse implements Response {
/**
* HTTP response status code for this operation
*/
public GetUserDetailsResponse withStatusCode(int statusCode) {
public GetTokenDetailsResponse withStatusCode(int statusCode) {
Utils.checkNotNull(statusCode, "statusCode");
this.statusCode = statusCode;
return this;
@@ -122,7 +122,7 @@ public class GetUserDetailsResponse implements Response {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetUserDetailsResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetTokenDetailsResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -131,7 +131,7 @@ public class GetUserDetailsResponse implements Response {
/**
* Logged in user details
*/
public GetUserDetailsResponse withUserPlexAccount(GetUserDetailsUserPlexAccount userPlexAccount) {
public GetTokenDetailsResponse withUserPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) {
Utils.checkNotNull(userPlexAccount, "userPlexAccount");
this.userPlexAccount = Optional.ofNullable(userPlexAccount);
return this;
@@ -140,7 +140,7 @@ public class GetUserDetailsResponse implements Response {
/**
* Logged in user details
*/
public GetUserDetailsResponse withUserPlexAccount(Optional<? extends GetUserDetailsUserPlexAccount> userPlexAccount) {
public GetTokenDetailsResponse withUserPlexAccount(Optional<? extends GetTokenDetailsUserPlexAccount> userPlexAccount) {
Utils.checkNotNull(userPlexAccount, "userPlexAccount");
this.userPlexAccount = userPlexAccount;
return this;
@@ -154,7 +154,7 @@ public class GetUserDetailsResponse implements Response {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetUserDetailsResponse other = (GetUserDetailsResponse) o;
GetTokenDetailsResponse other = (GetTokenDetailsResponse) o;
return
Objects.deepEquals(this.contentType, other.contentType) &&
Objects.deepEquals(this.statusCode, other.statusCode) &&
@@ -173,7 +173,7 @@ public class GetUserDetailsResponse implements Response {
@Override
public String toString() {
return Utils.toString(GetUserDetailsResponse.class,
return Utils.toString(GetTokenDetailsResponse.class,
"contentType", contentType,
"statusCode", statusCode,
"rawResponse", rawResponse,
@@ -188,7 +188,7 @@ public class GetUserDetailsResponse implements Response {
private HttpResponse<InputStream> rawResponse;
private Optional<? extends GetUserDetailsUserPlexAccount> userPlexAccount = Optional.empty();
private Optional<? extends GetTokenDetailsUserPlexAccount> userPlexAccount = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -224,7 +224,7 @@ public class GetUserDetailsResponse implements Response {
/**
* Logged in user details
*/
public Builder userPlexAccount(GetUserDetailsUserPlexAccount userPlexAccount) {
public Builder userPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) {
Utils.checkNotNull(userPlexAccount, "userPlexAccount");
this.userPlexAccount = Optional.ofNullable(userPlexAccount);
return this;
@@ -233,14 +233,14 @@ public class GetUserDetailsResponse implements Response {
/**
* Logged in user details
*/
public Builder userPlexAccount(Optional<? extends GetUserDetailsUserPlexAccount> userPlexAccount) {
public Builder userPlexAccount(Optional<? extends GetTokenDetailsUserPlexAccount> userPlexAccount) {
Utils.checkNotNull(userPlexAccount, "userPlexAccount");
this.userPlexAccount = userPlexAccount;
return this;
}
public GetUserDetailsResponse build() {
return new GetUserDetailsResponse(
public GetTokenDetailsResponse build() {
return new GetTokenDetailsResponse(
contentType,
statusCode,
rawResponse,

View File

@@ -7,14 +7,14 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
public enum GetUserDetailsStatus {
public enum GetTokenDetailsStatus {
ONLINE("online"),
OFFLINE("offline");
@JsonValue
private final String value;
private GetUserDetailsStatus(String value) {
private GetTokenDetailsStatus(String value) {
this.value = value;
}

View File

@@ -21,14 +21,14 @@ import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
public class GetUserDetailsSubscription {
public class GetTokenDetailsSubscription {
/**
* List of features allowed on your Plex Pass subscription
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("features")
private Optional<? extends List<GetUserDetailsFeatures>> features;
private Optional<? extends List<GetTokenDetailsFeatures>> features;
/**
* If the account's Plex Pass subscription is active
@@ -49,7 +49,7 @@ public class GetUserDetailsSubscription {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<? extends GetUserDetailsAuthenticationResponseStatus> status;
private Optional<? extends GetTokenDetailsAuthenticationResponseStatus> status;
/**
* Payment service used for your Plex Pass subscription
@@ -66,11 +66,11 @@ public class GetUserDetailsSubscription {
private JsonNullable<String> plan;
@JsonCreator
public GetUserDetailsSubscription(
@JsonProperty("features") Optional<? extends List<GetUserDetailsFeatures>> features,
public GetTokenDetailsSubscription(
@JsonProperty("features") Optional<? extends List<GetTokenDetailsFeatures>> features,
@JsonProperty("active") Optional<Boolean> active,
@JsonProperty("subscribedAt") JsonNullable<String> subscribedAt,
@JsonProperty("status") Optional<? extends GetUserDetailsAuthenticationResponseStatus> status,
@JsonProperty("status") Optional<? extends GetTokenDetailsAuthenticationResponseStatus> status,
@JsonProperty("paymentService") JsonNullable<String> paymentService,
@JsonProperty("plan") JsonNullable<String> plan) {
Utils.checkNotNull(features, "features");
@@ -87,7 +87,7 @@ public class GetUserDetailsSubscription {
this.plan = plan;
}
public GetUserDetailsSubscription() {
public GetTokenDetailsSubscription() {
this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined());
}
@@ -96,8 +96,8 @@ public class GetUserDetailsSubscription {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetUserDetailsFeatures>> features() {
return (Optional<List<GetUserDetailsFeatures>>) features;
public Optional<List<GetTokenDetailsFeatures>> features() {
return (Optional<List<GetTokenDetailsFeatures>>) features;
}
/**
@@ -121,8 +121,8 @@ public class GetUserDetailsSubscription {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetUserDetailsAuthenticationResponseStatus> status() {
return (Optional<GetUserDetailsAuthenticationResponseStatus>) status;
public Optional<GetTokenDetailsAuthenticationResponseStatus> status() {
return (Optional<GetTokenDetailsAuthenticationResponseStatus>) status;
}
/**
@@ -148,7 +148,7 @@ public class GetUserDetailsSubscription {
/**
* List of features allowed on your Plex Pass subscription
*/
public GetUserDetailsSubscription withFeatures(List<GetUserDetailsFeatures> features) {
public GetTokenDetailsSubscription withFeatures(List<GetTokenDetailsFeatures> features) {
Utils.checkNotNull(features, "features");
this.features = Optional.ofNullable(features);
return this;
@@ -157,7 +157,7 @@ public class GetUserDetailsSubscription {
/**
* List of features allowed on your Plex Pass subscription
*/
public GetUserDetailsSubscription withFeatures(Optional<? extends List<GetUserDetailsFeatures>> features) {
public GetTokenDetailsSubscription withFeatures(Optional<? extends List<GetTokenDetailsFeatures>> features) {
Utils.checkNotNull(features, "features");
this.features = features;
return this;
@@ -166,7 +166,7 @@ public class GetUserDetailsSubscription {
/**
* If the account's Plex Pass subscription is active
*/
public GetUserDetailsSubscription withActive(boolean active) {
public GetTokenDetailsSubscription withActive(boolean active) {
Utils.checkNotNull(active, "active");
this.active = Optional.ofNullable(active);
return this;
@@ -175,7 +175,7 @@ public class GetUserDetailsSubscription {
/**
* If the account's Plex Pass subscription is active
*/
public GetUserDetailsSubscription withActive(Optional<Boolean> active) {
public GetTokenDetailsSubscription withActive(Optional<Boolean> active) {
Utils.checkNotNull(active, "active");
this.active = active;
return this;
@@ -184,7 +184,7 @@ public class GetUserDetailsSubscription {
/**
* Date the account subscribed to Plex Pass
*/
public GetUserDetailsSubscription withSubscribedAt(String subscribedAt) {
public GetTokenDetailsSubscription withSubscribedAt(String subscribedAt) {
Utils.checkNotNull(subscribedAt, "subscribedAt");
this.subscribedAt = JsonNullable.of(subscribedAt);
return this;
@@ -193,7 +193,7 @@ public class GetUserDetailsSubscription {
/**
* Date the account subscribed to Plex Pass
*/
public GetUserDetailsSubscription withSubscribedAt(JsonNullable<String> subscribedAt) {
public GetTokenDetailsSubscription withSubscribedAt(JsonNullable<String> subscribedAt) {
Utils.checkNotNull(subscribedAt, "subscribedAt");
this.subscribedAt = subscribedAt;
return this;
@@ -202,7 +202,7 @@ public class GetUserDetailsSubscription {
/**
* String representation of subscriptionActive
*/
public GetUserDetailsSubscription withStatus(GetUserDetailsAuthenticationResponseStatus status) {
public GetTokenDetailsSubscription withStatus(GetTokenDetailsAuthenticationResponseStatus status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
@@ -211,7 +211,7 @@ public class GetUserDetailsSubscription {
/**
* String representation of subscriptionActive
*/
public GetUserDetailsSubscription withStatus(Optional<? extends GetUserDetailsAuthenticationResponseStatus> status) {
public GetTokenDetailsSubscription withStatus(Optional<? extends GetTokenDetailsAuthenticationResponseStatus> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -220,7 +220,7 @@ public class GetUserDetailsSubscription {
/**
* Payment service used for your Plex Pass subscription
*/
public GetUserDetailsSubscription withPaymentService(String paymentService) {
public GetTokenDetailsSubscription withPaymentService(String paymentService) {
Utils.checkNotNull(paymentService, "paymentService");
this.paymentService = JsonNullable.of(paymentService);
return this;
@@ -229,7 +229,7 @@ public class GetUserDetailsSubscription {
/**
* Payment service used for your Plex Pass subscription
*/
public GetUserDetailsSubscription withPaymentService(JsonNullable<String> paymentService) {
public GetTokenDetailsSubscription withPaymentService(JsonNullable<String> paymentService) {
Utils.checkNotNull(paymentService, "paymentService");
this.paymentService = paymentService;
return this;
@@ -238,7 +238,7 @@ public class GetUserDetailsSubscription {
/**
* Name of Plex Pass subscription plan
*/
public GetUserDetailsSubscription withPlan(String plan) {
public GetTokenDetailsSubscription withPlan(String plan) {
Utils.checkNotNull(plan, "plan");
this.plan = JsonNullable.of(plan);
return this;
@@ -247,7 +247,7 @@ public class GetUserDetailsSubscription {
/**
* Name of Plex Pass subscription plan
*/
public GetUserDetailsSubscription withPlan(JsonNullable<String> plan) {
public GetTokenDetailsSubscription withPlan(JsonNullable<String> plan) {
Utils.checkNotNull(plan, "plan");
this.plan = plan;
return this;
@@ -261,7 +261,7 @@ public class GetUserDetailsSubscription {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetUserDetailsSubscription other = (GetUserDetailsSubscription) o;
GetTokenDetailsSubscription other = (GetTokenDetailsSubscription) o;
return
Objects.deepEquals(this.features, other.features) &&
Objects.deepEquals(this.active, other.active) &&
@@ -284,7 +284,7 @@ public class GetUserDetailsSubscription {
@Override
public String toString() {
return Utils.toString(GetUserDetailsSubscription.class,
return Utils.toString(GetTokenDetailsSubscription.class,
"features", features,
"active", active,
"subscribedAt", subscribedAt,
@@ -295,13 +295,13 @@ public class GetUserDetailsSubscription {
public final static class Builder {
private Optional<? extends List<GetUserDetailsFeatures>> features = Optional.empty();
private Optional<? extends List<GetTokenDetailsFeatures>> features = Optional.empty();
private Optional<Boolean> active = Optional.empty();
private JsonNullable<String> subscribedAt = JsonNullable.undefined();
private Optional<? extends GetUserDetailsAuthenticationResponseStatus> status = Optional.empty();
private Optional<? extends GetTokenDetailsAuthenticationResponseStatus> status = Optional.empty();
private JsonNullable<String> paymentService = JsonNullable.undefined();
@@ -314,7 +314,7 @@ public class GetUserDetailsSubscription {
/**
* List of features allowed on your Plex Pass subscription
*/
public Builder features(List<GetUserDetailsFeatures> features) {
public Builder features(List<GetTokenDetailsFeatures> features) {
Utils.checkNotNull(features, "features");
this.features = Optional.ofNullable(features);
return this;
@@ -323,7 +323,7 @@ public class GetUserDetailsSubscription {
/**
* List of features allowed on your Plex Pass subscription
*/
public Builder features(Optional<? extends List<GetUserDetailsFeatures>> features) {
public Builder features(Optional<? extends List<GetTokenDetailsFeatures>> features) {
Utils.checkNotNull(features, "features");
this.features = features;
return this;
@@ -368,7 +368,7 @@ public class GetUserDetailsSubscription {
/**
* String representation of subscriptionActive
*/
public Builder status(GetUserDetailsAuthenticationResponseStatus status) {
public Builder status(GetTokenDetailsAuthenticationResponseStatus status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
@@ -377,7 +377,7 @@ public class GetUserDetailsSubscription {
/**
* String representation of subscriptionActive
*/
public Builder status(Optional<? extends GetUserDetailsAuthenticationResponseStatus> status) {
public Builder status(Optional<? extends GetTokenDetailsAuthenticationResponseStatus> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -419,8 +419,8 @@ public class GetUserDetailsSubscription {
return this;
}
public GetUserDetailsSubscription build() {
return new GetUserDetailsSubscription(
public GetTokenDetailsSubscription build() {
return new GetTokenDetailsSubscription(
features,
active,
subscribedAt,

View File

@@ -16,6 +16,7 @@ import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Deprecated;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
@@ -26,10 +27,10 @@ import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* GetUserDetailsUserPlexAccount - Logged in user details
* GetTokenDetailsUserPlexAccount - Logged in user details
*/
public class GetUserDetailsUserPlexAccount {
public class GetTokenDetailsUserPlexAccount {
/**
* Unknown
@@ -158,10 +159,10 @@ public class GetUserDetailsUserPlexAccount {
private int id;
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
@JsonProperty("joinedAt")
private int joinedAt;
private long joinedAt;
/**
* The account locale
@@ -209,10 +210,10 @@ public class GetUserDetailsUserPlexAccount {
private Optional<Boolean> protected_;
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
@JsonProperty("rememberExpiresAt")
private int rememberExpiresAt;
private long rememberExpiresAt;
/**
* If the account is a Plex Home managed user
@@ -251,7 +252,7 @@ public class GetUserDetailsUserPlexAccount {
private Optional<String> subscriptionDescription;
@JsonProperty("subscriptions")
private List<GetUserDetailsSubscription> subscriptions;
private List<GetTokenDetailsSubscription> subscriptions;
/**
* URL of the account thumbnail
@@ -285,7 +286,7 @@ public class GetUserDetailsUserPlexAccount {
private String uuid;
@JsonCreator
public GetUserDetailsUserPlexAccount(
public GetTokenDetailsUserPlexAccount(
@JsonProperty("adsConsent") Optional<Boolean> adsConsent,
@JsonProperty("adsConsentReminderAt") Optional<OffsetDateTime> adsConsentReminderAt,
@JsonProperty("adsConsentSetAt") Optional<OffsetDateTime> adsConsentSetAt,
@@ -305,7 +306,7 @@ public class GetUserDetailsUserPlexAccount {
@JsonProperty("homeAdmin") Optional<Boolean> homeAdmin,
@JsonProperty("homeSize") int homeSize,
@JsonProperty("id") int id,
@JsonProperty("joinedAt") int joinedAt,
@JsonProperty("joinedAt") long joinedAt,
@JsonProperty("locale") Optional<String> locale,
@JsonProperty("mailingListActive") Optional<Boolean> mailingListActive,
@JsonProperty("mailingListStatus") MailingListStatus mailingListStatus,
@@ -313,14 +314,14 @@ public class GetUserDetailsUserPlexAccount {
@JsonProperty("pin") Optional<String> pin,
@JsonProperty("profile") UserProfile profile,
@JsonProperty("protected") Optional<Boolean> protected_,
@JsonProperty("rememberExpiresAt") int rememberExpiresAt,
@JsonProperty("rememberExpiresAt") long rememberExpiresAt,
@JsonProperty("restricted") Optional<Boolean> restricted,
@JsonProperty("roles") Optional<? extends List<String>> roles,
@JsonProperty("scrobbleTypes") String scrobbleTypes,
@JsonProperty("services") List<Services> services,
@JsonProperty("subscription") Subscription subscription,
@JsonProperty("subscriptionDescription") Optional<String> subscriptionDescription,
@JsonProperty("subscriptions") List<GetUserDetailsSubscription> subscriptions,
@JsonProperty("subscriptions") List<GetTokenDetailsSubscription> subscriptions,
@JsonProperty("thumb") String thumb,
@JsonProperty("title") String title,
@JsonProperty("twoFactorEnabled") Optional<Boolean> twoFactorEnabled,
@@ -408,7 +409,7 @@ public class GetUserDetailsUserPlexAccount {
this.uuid = uuid;
}
public GetUserDetailsUserPlexAccount(
public GetTokenDetailsUserPlexAccount(
String authToken,
String country,
String email,
@@ -416,15 +417,15 @@ public class GetUserDetailsUserPlexAccount {
List<String> entitlements,
int homeSize,
int id,
int joinedAt,
long joinedAt,
MailingListStatus mailingListStatus,
int maxHomeSize,
UserProfile profile,
int rememberExpiresAt,
long rememberExpiresAt,
String scrobbleTypes,
List<Services> services,
Subscription subscription,
List<GetUserDetailsSubscription> subscriptions,
List<GetTokenDetailsSubscription> subscriptions,
String thumb,
String title,
String username,
@@ -585,10 +586,10 @@ public class GetUserDetailsUserPlexAccount {
}
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
@JsonIgnore
public int joinedAt() {
public long joinedAt() {
return joinedAt;
}
@@ -648,10 +649,10 @@ public class GetUserDetailsUserPlexAccount {
}
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
@JsonIgnore
public int rememberExpiresAt() {
public long rememberExpiresAt() {
return rememberExpiresAt;
}
@@ -702,7 +703,7 @@ public class GetUserDetailsUserPlexAccount {
}
@JsonIgnore
public List<GetUserDetailsSubscription> subscriptions() {
public List<GetTokenDetailsSubscription> subscriptions() {
return subscriptions;
}
@@ -753,7 +754,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAdsConsent(boolean adsConsent) {
public GetTokenDetailsUserPlexAccount withAdsConsent(boolean adsConsent) {
Utils.checkNotNull(adsConsent, "adsConsent");
this.adsConsent = Optional.ofNullable(adsConsent);
return this;
@@ -762,7 +763,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAdsConsent(Optional<Boolean> adsConsent) {
public GetTokenDetailsUserPlexAccount withAdsConsent(Optional<Boolean> adsConsent) {
Utils.checkNotNull(adsConsent, "adsConsent");
this.adsConsent = adsConsent;
return this;
@@ -771,7 +772,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAdsConsentReminderAt(OffsetDateTime adsConsentReminderAt) {
public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(OffsetDateTime adsConsentReminderAt) {
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt);
return this;
@@ -780,7 +781,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAdsConsentReminderAt(Optional<OffsetDateTime> adsConsentReminderAt) {
public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(Optional<OffsetDateTime> adsConsentReminderAt) {
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
this.adsConsentReminderAt = adsConsentReminderAt;
return this;
@@ -789,7 +790,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAdsConsentSetAt(OffsetDateTime adsConsentSetAt) {
public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(OffsetDateTime adsConsentSetAt) {
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt);
return this;
@@ -798,7 +799,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAdsConsentSetAt(Optional<OffsetDateTime> adsConsentSetAt) {
public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(Optional<OffsetDateTime> adsConsentSetAt) {
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
this.adsConsentSetAt = adsConsentSetAt;
return this;
@@ -807,7 +808,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAnonymous(boolean anonymous) {
public GetTokenDetailsUserPlexAccount withAnonymous(boolean anonymous) {
Utils.checkNotNull(anonymous, "anonymous");
this.anonymous = JsonNullable.of(anonymous);
return this;
@@ -816,7 +817,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withAnonymous(JsonNullable<Boolean> anonymous) {
public GetTokenDetailsUserPlexAccount withAnonymous(JsonNullable<Boolean> anonymous) {
Utils.checkNotNull(anonymous, "anonymous");
this.anonymous = anonymous;
return this;
@@ -825,7 +826,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account token
*/
public GetUserDetailsUserPlexAccount withAuthToken(String authToken) {
public GetTokenDetailsUserPlexAccount withAuthToken(String authToken) {
Utils.checkNotNull(authToken, "authToken");
this.authToken = authToken;
return this;
@@ -834,7 +835,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the two-factor authentication backup codes have been created
*/
public GetUserDetailsUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) {
public GetTokenDetailsUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) {
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
this.backupCodesCreated = Optional.ofNullable(backupCodesCreated);
return this;
@@ -843,7 +844,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the two-factor authentication backup codes have been created
*/
public GetUserDetailsUserPlexAccount withBackupCodesCreated(Optional<Boolean> backupCodesCreated) {
public GetTokenDetailsUserPlexAccount withBackupCodesCreated(Optional<Boolean> backupCodesCreated) {
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
this.backupCodesCreated = backupCodesCreated;
return this;
@@ -852,7 +853,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account has been confirmed
*/
public GetUserDetailsUserPlexAccount withConfirmed(boolean confirmed) {
public GetTokenDetailsUserPlexAccount withConfirmed(boolean confirmed) {
Utils.checkNotNull(confirmed, "confirmed");
this.confirmed = Optional.ofNullable(confirmed);
return this;
@@ -861,7 +862,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account has been confirmed
*/
public GetUserDetailsUserPlexAccount withConfirmed(Optional<Boolean> confirmed) {
public GetTokenDetailsUserPlexAccount withConfirmed(Optional<Boolean> confirmed) {
Utils.checkNotNull(confirmed, "confirmed");
this.confirmed = confirmed;
return this;
@@ -870,7 +871,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account country
*/
public GetUserDetailsUserPlexAccount withCountry(String country) {
public GetTokenDetailsUserPlexAccount withCountry(String country) {
Utils.checkNotNull(country, "country");
this.country = country;
return this;
@@ -879,7 +880,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account email address
*/
public GetUserDetailsUserPlexAccount withEmail(String email) {
public GetTokenDetailsUserPlexAccount withEmail(String email) {
Utils.checkNotNull(email, "email");
this.email = email;
return this;
@@ -888,7 +889,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If login with email only is enabled
*/
public GetUserDetailsUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) {
public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) {
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth);
return this;
@@ -897,7 +898,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If login with email only is enabled
*/
public GetUserDetailsUserPlexAccount withEmailOnlyAuth(Optional<Boolean> emailOnlyAuth) {
public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(Optional<Boolean> emailOnlyAuth) {
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
this.emailOnlyAuth = emailOnlyAuth;
return this;
@@ -906,7 +907,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If experimental features are enabled
*/
public GetUserDetailsUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) {
public GetTokenDetailsUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) {
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
this.experimentalFeatures = Optional.ofNullable(experimentalFeatures);
return this;
@@ -915,7 +916,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If experimental features are enabled
*/
public GetUserDetailsUserPlexAccount withExperimentalFeatures(Optional<Boolean> experimentalFeatures) {
public GetTokenDetailsUserPlexAccount withExperimentalFeatures(Optional<Boolean> experimentalFeatures) {
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
this.experimentalFeatures = experimentalFeatures;
return this;
@@ -924,7 +925,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Your account full name
*/
public GetUserDetailsUserPlexAccount withFriendlyName(String friendlyName) {
public GetTokenDetailsUserPlexAccount withFriendlyName(String friendlyName) {
Utils.checkNotNull(friendlyName, "friendlyName");
this.friendlyName = friendlyName;
return this;
@@ -933,7 +934,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* List of devices your allowed to use with this account
*/
public GetUserDetailsUserPlexAccount withEntitlements(List<String> entitlements) {
public GetTokenDetailsUserPlexAccount withEntitlements(List<String> entitlements) {
Utils.checkNotNull(entitlements, "entitlements");
this.entitlements = entitlements;
return this;
@@ -942,7 +943,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is a Plex Home guest user
*/
public GetUserDetailsUserPlexAccount withGuest(boolean guest) {
public GetTokenDetailsUserPlexAccount withGuest(boolean guest) {
Utils.checkNotNull(guest, "guest");
this.guest = Optional.ofNullable(guest);
return this;
@@ -951,7 +952,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is a Plex Home guest user
*/
public GetUserDetailsUserPlexAccount withGuest(Optional<Boolean> guest) {
public GetTokenDetailsUserPlexAccount withGuest(Optional<Boolean> guest) {
Utils.checkNotNull(guest, "guest");
this.guest = guest;
return this;
@@ -960,7 +961,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account has a password
*/
public GetUserDetailsUserPlexAccount withHasPassword(boolean hasPassword) {
public GetTokenDetailsUserPlexAccount withHasPassword(boolean hasPassword) {
Utils.checkNotNull(hasPassword, "hasPassword");
this.hasPassword = Optional.ofNullable(hasPassword);
return this;
@@ -969,7 +970,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account has a password
*/
public GetUserDetailsUserPlexAccount withHasPassword(Optional<Boolean> hasPassword) {
public GetTokenDetailsUserPlexAccount withHasPassword(Optional<Boolean> hasPassword) {
Utils.checkNotNull(hasPassword, "hasPassword");
this.hasPassword = hasPassword;
return this;
@@ -978,7 +979,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is a Plex Home user
*/
public GetUserDetailsUserPlexAccount withHome(boolean home) {
public GetTokenDetailsUserPlexAccount withHome(boolean home) {
Utils.checkNotNull(home, "home");
this.home = Optional.ofNullable(home);
return this;
@@ -987,7 +988,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is a Plex Home user
*/
public GetUserDetailsUserPlexAccount withHome(Optional<Boolean> home) {
public GetTokenDetailsUserPlexAccount withHome(Optional<Boolean> home) {
Utils.checkNotNull(home, "home");
this.home = home;
return this;
@@ -996,7 +997,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is the Plex Home admin
*/
public GetUserDetailsUserPlexAccount withHomeAdmin(boolean homeAdmin) {
public GetTokenDetailsUserPlexAccount withHomeAdmin(boolean homeAdmin) {
Utils.checkNotNull(homeAdmin, "homeAdmin");
this.homeAdmin = Optional.ofNullable(homeAdmin);
return this;
@@ -1005,7 +1006,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is the Plex Home admin
*/
public GetUserDetailsUserPlexAccount withHomeAdmin(Optional<Boolean> homeAdmin) {
public GetTokenDetailsUserPlexAccount withHomeAdmin(Optional<Boolean> homeAdmin) {
Utils.checkNotNull(homeAdmin, "homeAdmin");
this.homeAdmin = homeAdmin;
return this;
@@ -1014,7 +1015,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The number of accounts in the Plex Home
*/
public GetUserDetailsUserPlexAccount withHomeSize(int homeSize) {
public GetTokenDetailsUserPlexAccount withHomeSize(int homeSize) {
Utils.checkNotNull(homeSize, "homeSize");
this.homeSize = homeSize;
return this;
@@ -1023,16 +1024,16 @@ public class GetUserDetailsUserPlexAccount {
/**
* The Plex account ID
*/
public GetUserDetailsUserPlexAccount withId(int id) {
public GetTokenDetailsUserPlexAccount withId(int id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
public GetUserDetailsUserPlexAccount withJoinedAt(int joinedAt) {
public GetTokenDetailsUserPlexAccount withJoinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
this.joinedAt = joinedAt;
return this;
@@ -1041,7 +1042,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account locale
*/
public GetUserDetailsUserPlexAccount withLocale(String locale) {
public GetTokenDetailsUserPlexAccount withLocale(String locale) {
Utils.checkNotNull(locale, "locale");
this.locale = Optional.ofNullable(locale);
return this;
@@ -1050,7 +1051,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account locale
*/
public GetUserDetailsUserPlexAccount withLocale(Optional<String> locale) {
public GetTokenDetailsUserPlexAccount withLocale(Optional<String> locale) {
Utils.checkNotNull(locale, "locale");
this.locale = locale;
return this;
@@ -1059,7 +1060,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If you are subscribed to the Plex newsletter
*/
public GetUserDetailsUserPlexAccount withMailingListActive(boolean mailingListActive) {
public GetTokenDetailsUserPlexAccount withMailingListActive(boolean mailingListActive) {
Utils.checkNotNull(mailingListActive, "mailingListActive");
this.mailingListActive = Optional.ofNullable(mailingListActive);
return this;
@@ -1068,7 +1069,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If you are subscribed to the Plex newsletter
*/
public GetUserDetailsUserPlexAccount withMailingListActive(Optional<Boolean> mailingListActive) {
public GetTokenDetailsUserPlexAccount withMailingListActive(Optional<Boolean> mailingListActive) {
Utils.checkNotNull(mailingListActive, "mailingListActive");
this.mailingListActive = mailingListActive;
return this;
@@ -1077,7 +1078,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Your current mailing list status
*/
public GetUserDetailsUserPlexAccount withMailingListStatus(MailingListStatus mailingListStatus) {
public GetTokenDetailsUserPlexAccount withMailingListStatus(MailingListStatus mailingListStatus) {
Utils.checkNotNull(mailingListStatus, "mailingListStatus");
this.mailingListStatus = mailingListStatus;
return this;
@@ -1086,7 +1087,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The maximum number of accounts allowed in the Plex Home
*/
public GetUserDetailsUserPlexAccount withMaxHomeSize(int maxHomeSize) {
public GetTokenDetailsUserPlexAccount withMaxHomeSize(int maxHomeSize) {
Utils.checkNotNull(maxHomeSize, "maxHomeSize");
this.maxHomeSize = maxHomeSize;
return this;
@@ -1097,7 +1098,7 @@ public class GetUserDetailsUserPlexAccount {
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
public GetUserDetailsUserPlexAccount withPin(String pin) {
public GetTokenDetailsUserPlexAccount withPin(String pin) {
Utils.checkNotNull(pin, "pin");
this.pin = Optional.ofNullable(pin);
return this;
@@ -1108,13 +1109,13 @@ public class GetUserDetailsUserPlexAccount {
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
public GetUserDetailsUserPlexAccount withPin(Optional<String> pin) {
public GetTokenDetailsUserPlexAccount withPin(Optional<String> pin) {
Utils.checkNotNull(pin, "pin");
this.pin = pin;
return this;
}
public GetUserDetailsUserPlexAccount withProfile(UserProfile profile) {
public GetTokenDetailsUserPlexAccount withProfile(UserProfile profile) {
Utils.checkNotNull(profile, "profile");
this.profile = profile;
return this;
@@ -1123,7 +1124,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account has a Plex Home PIN enabled
*/
public GetUserDetailsUserPlexAccount withProtected(boolean protected_) {
public GetTokenDetailsUserPlexAccount withProtected(boolean protected_) {
Utils.checkNotNull(protected_, "protected_");
this.protected_ = Optional.ofNullable(protected_);
return this;
@@ -1132,16 +1133,16 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account has a Plex Home PIN enabled
*/
public GetUserDetailsUserPlexAccount withProtected(Optional<Boolean> protected_) {
public GetTokenDetailsUserPlexAccount withProtected(Optional<Boolean> protected_) {
Utils.checkNotNull(protected_, "protected_");
this.protected_ = protected_;
return this;
}
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
public GetUserDetailsUserPlexAccount withRememberExpiresAt(int rememberExpiresAt) {
public GetTokenDetailsUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
this.rememberExpiresAt = rememberExpiresAt;
return this;
@@ -1150,7 +1151,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is a Plex Home managed user
*/
public GetUserDetailsUserPlexAccount withRestricted(boolean restricted) {
public GetTokenDetailsUserPlexAccount withRestricted(boolean restricted) {
Utils.checkNotNull(restricted, "restricted");
this.restricted = Optional.ofNullable(restricted);
return this;
@@ -1159,7 +1160,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the account is a Plex Home managed user
*/
public GetUserDetailsUserPlexAccount withRestricted(Optional<Boolean> restricted) {
public GetTokenDetailsUserPlexAccount withRestricted(Optional<Boolean> restricted) {
Utils.checkNotNull(restricted, "restricted");
this.restricted = restricted;
return this;
@@ -1168,7 +1169,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
public GetUserDetailsUserPlexAccount withRoles(List<String> roles) {
public GetTokenDetailsUserPlexAccount withRoles(List<String> roles) {
Utils.checkNotNull(roles, "roles");
this.roles = Optional.ofNullable(roles);
return this;
@@ -1177,7 +1178,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
public GetUserDetailsUserPlexAccount withRoles(Optional<? extends List<String>> roles) {
public GetTokenDetailsUserPlexAccount withRoles(Optional<? extends List<String>> roles) {
Utils.checkNotNull(roles, "roles");
this.roles = roles;
return this;
@@ -1186,13 +1187,13 @@ public class GetUserDetailsUserPlexAccount {
/**
* Unknown
*/
public GetUserDetailsUserPlexAccount withScrobbleTypes(String scrobbleTypes) {
public GetTokenDetailsUserPlexAccount withScrobbleTypes(String scrobbleTypes) {
Utils.checkNotNull(scrobbleTypes, "scrobbleTypes");
this.scrobbleTypes = scrobbleTypes;
return this;
}
public GetUserDetailsUserPlexAccount withServices(List<Services> services) {
public GetTokenDetailsUserPlexAccount withServices(List<Services> services) {
Utils.checkNotNull(services, "services");
this.services = services;
return this;
@@ -1201,7 +1202,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If the accounts Plex Pass subscription is active
*/
public GetUserDetailsUserPlexAccount withSubscription(Subscription subscription) {
public GetTokenDetailsUserPlexAccount withSubscription(Subscription subscription) {
Utils.checkNotNull(subscription, "subscription");
this.subscription = subscription;
return this;
@@ -1210,7 +1211,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* Description of the Plex Pass subscription
*/
public GetUserDetailsUserPlexAccount withSubscriptionDescription(String subscriptionDescription) {
public GetTokenDetailsUserPlexAccount withSubscriptionDescription(String subscriptionDescription) {
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
this.subscriptionDescription = Optional.ofNullable(subscriptionDescription);
return this;
@@ -1219,13 +1220,13 @@ public class GetUserDetailsUserPlexAccount {
/**
* Description of the Plex Pass subscription
*/
public GetUserDetailsUserPlexAccount withSubscriptionDescription(Optional<String> subscriptionDescription) {
public GetTokenDetailsUserPlexAccount withSubscriptionDescription(Optional<String> subscriptionDescription) {
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
this.subscriptionDescription = subscriptionDescription;
return this;
}
public GetUserDetailsUserPlexAccount withSubscriptions(List<GetUserDetailsSubscription> subscriptions) {
public GetTokenDetailsUserPlexAccount withSubscriptions(List<GetTokenDetailsSubscription> subscriptions) {
Utils.checkNotNull(subscriptions, "subscriptions");
this.subscriptions = subscriptions;
return this;
@@ -1234,7 +1235,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* URL of the account thumbnail
*/
public GetUserDetailsUserPlexAccount withThumb(String thumb) {
public GetTokenDetailsUserPlexAccount withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
@@ -1243,7 +1244,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The title of the account (username or friendly name)
*/
public GetUserDetailsUserPlexAccount withTitle(String title) {
public GetTokenDetailsUserPlexAccount withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
@@ -1252,7 +1253,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If two-factor authentication is enabled
*/
public GetUserDetailsUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) {
public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) {
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled);
return this;
@@ -1261,7 +1262,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* If two-factor authentication is enabled
*/
public GetUserDetailsUserPlexAccount withTwoFactorEnabled(Optional<Boolean> twoFactorEnabled) {
public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(Optional<Boolean> twoFactorEnabled) {
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
this.twoFactorEnabled = twoFactorEnabled;
return this;
@@ -1270,7 +1271,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account username
*/
public GetUserDetailsUserPlexAccount withUsername(String username) {
public GetTokenDetailsUserPlexAccount withUsername(String username) {
Utils.checkNotNull(username, "username");
this.username = username;
return this;
@@ -1279,7 +1280,7 @@ public class GetUserDetailsUserPlexAccount {
/**
* The account UUID
*/
public GetUserDetailsUserPlexAccount withUuid(String uuid) {
public GetTokenDetailsUserPlexAccount withUuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
@@ -1293,7 +1294,7 @@ public class GetUserDetailsUserPlexAccount {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetUserDetailsUserPlexAccount other = (GetUserDetailsUserPlexAccount) o;
GetTokenDetailsUserPlexAccount other = (GetTokenDetailsUserPlexAccount) o;
return
Objects.deepEquals(this.adsConsent, other.adsConsent) &&
Objects.deepEquals(this.adsConsentReminderAt, other.adsConsentReminderAt) &&
@@ -1384,7 +1385,7 @@ public class GetUserDetailsUserPlexAccount {
@Override
public String toString() {
return Utils.toString(GetUserDetailsUserPlexAccount.class,
return Utils.toString(GetTokenDetailsUserPlexAccount.class,
"adsConsent", adsConsent,
"adsConsentReminderAt", adsConsentReminderAt,
"adsConsentSetAt", adsConsentSetAt,
@@ -1467,7 +1468,7 @@ public class GetUserDetailsUserPlexAccount {
private Integer id;
private Integer joinedAt;
private Long joinedAt;
private Optional<String> locale = Optional.empty();
@@ -1484,7 +1485,7 @@ public class GetUserDetailsUserPlexAccount {
private Optional<Boolean> protected_;
private Integer rememberExpiresAt;
private Long rememberExpiresAt;
private Optional<Boolean> restricted;
@@ -1498,7 +1499,7 @@ public class GetUserDetailsUserPlexAccount {
private Optional<String> subscriptionDescription = Optional.empty();
private List<GetUserDetailsSubscription> subscriptions;
private List<GetTokenDetailsSubscription> subscriptions;
private String thumb;
@@ -1794,9 +1795,9 @@ public class GetUserDetailsUserPlexAccount {
}
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
public Builder joinedAt(int joinedAt) {
public Builder joinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
this.joinedAt = joinedAt;
return this;
@@ -1903,9 +1904,9 @@ public class GetUserDetailsUserPlexAccount {
}
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
public Builder rememberExpiresAt(int rememberExpiresAt) {
public Builder rememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
this.rememberExpiresAt = rememberExpiresAt;
return this;
@@ -1989,7 +1990,7 @@ public class GetUserDetailsUserPlexAccount {
return this;
}
public Builder subscriptions(List<GetUserDetailsSubscription> subscriptions) {
public Builder subscriptions(List<GetTokenDetailsSubscription> subscriptions) {
Utils.checkNotNull(subscriptions, "subscriptions");
this.subscriptions = subscriptions;
return this;
@@ -2049,7 +2050,7 @@ public class GetUserDetailsUserPlexAccount {
return this;
}
public GetUserDetailsUserPlexAccount build() {
public GetTokenDetailsUserPlexAccount build() {
if (anonymous == null) {
anonymous = _SINGLETON_VALUE_Anonymous.value();
}
@@ -2088,7 +2089,7 @@ public class GetUserDetailsUserPlexAccount {
}
if (twoFactorEnabled == null) {
twoFactorEnabled = _SINGLETON_VALUE_TwoFactorEnabled.value();
} return new GetUserDetailsUserPlexAccount(
} return new GetTokenDetailsUserPlexAccount(
adsConsent,
adsConsentReminderAt,
adsConsentSetAt,

View File

@@ -1,101 +0,0 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import dev.plexapi.sdk.utils.SpeakeasyMetadata;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetUserDetailsRequest {
/**
* Plex Authentication Token
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")
private String xPlexToken;
@JsonCreator
public GetUserDetailsRequest(
String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
}
/**
* Plex Authentication Token
*/
@JsonIgnore
public String xPlexToken() {
return xPlexToken;
}
public final static Builder builder() {
return new Builder();
}
/**
* Plex Authentication Token
*/
public GetUserDetailsRequest withXPlexToken(String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetUserDetailsRequest other = (GetUserDetailsRequest) o;
return
Objects.deepEquals(this.xPlexToken, other.xPlexToken);
}
@Override
public int hashCode() {
return Objects.hash(
xPlexToken);
}
@Override
public String toString() {
return Utils.toString(GetUserDetailsRequest.class,
"xPlexToken", xPlexToken);
}
public final static class Builder {
private String xPlexToken;
private Builder() {
// force use of static builder() method
}
/**
* Plex Authentication Token
*/
public Builder xPlexToken(String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
return this;
}
public GetUserDetailsRequest build() {
return new GetUserDetailsRequest(
xPlexToken);
}
}
}

View File

@@ -1,45 +0,0 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import dev.plexapi.sdk.utils.Utils;
import java.lang.String;
import java.util.Optional;
public class GetUserDetailsRequestBuilder {
private String xPlexToken;
private Optional<String> serverURL = Optional.empty();
private final SDKMethodInterfaces.MethodCallGetUserDetails sdk;
public GetUserDetailsRequestBuilder(SDKMethodInterfaces.MethodCallGetUserDetails sdk) {
this.sdk = sdk;
}
public GetUserDetailsRequestBuilder xPlexToken(java.lang.String xPlexToken) {
Utils.checkNotNull(xPlexToken, "xPlexToken");
this.xPlexToken = xPlexToken;
return this;
}
public GetUserDetailsRequestBuilder serverURL(java.lang.String serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = Optional.of(serverURL);
return this;
}
public GetUserDetailsRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
Utils.checkNotNull(serverURL, "serverURL");
this.serverURL = serverURL;
return this;
}
public GetUserDetailsResponse call() throws Exception {
return sdk.getUserDetails(
xPlexToken,
serverURL);
}
}

View File

@@ -14,7 +14,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -33,11 +33,11 @@ public class PastSubscription {
@JsonInclude(Include.ALWAYS)
@JsonProperty("renewsAt")
private Optional<Integer> renewsAt;
private Optional<Long> renewsAt;
@JsonInclude(Include.ALWAYS)
@JsonProperty("endsAt")
private Optional<Integer> endsAt;
private Optional<Long> endsAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("canceled")
@@ -84,8 +84,8 @@ public class PastSubscription {
public PastSubscription(
@JsonProperty("id") Optional<String> id,
@JsonProperty("mode") Optional<String> mode,
@JsonProperty("renewsAt") Optional<Integer> renewsAt,
@JsonProperty("endsAt") Optional<Integer> endsAt,
@JsonProperty("renewsAt") Optional<Long> renewsAt,
@JsonProperty("endsAt") Optional<Long> endsAt,
@JsonProperty("canceled") Optional<Boolean> canceled,
@JsonProperty("gracePeriod") Optional<Boolean> gracePeriod,
@JsonProperty("onHold") Optional<Boolean> onHold,
@@ -147,12 +147,12 @@ public class PastSubscription {
}
@JsonIgnore
public Optional<Integer> renewsAt() {
public Optional<Long> renewsAt() {
return renewsAt;
}
@JsonIgnore
public Optional<Integer> endsAt() {
public Optional<Long> endsAt() {
return endsAt;
}
@@ -239,25 +239,25 @@ public class PastSubscription {
return this;
}
public PastSubscription withRenewsAt(int renewsAt) {
public PastSubscription withRenewsAt(long renewsAt) {
Utils.checkNotNull(renewsAt, "renewsAt");
this.renewsAt = Optional.ofNullable(renewsAt);
return this;
}
public PastSubscription withRenewsAt(Optional<Integer> renewsAt) {
public PastSubscription withRenewsAt(Optional<Long> renewsAt) {
Utils.checkNotNull(renewsAt, "renewsAt");
this.renewsAt = renewsAt;
return this;
}
public PastSubscription withEndsAt(int endsAt) {
public PastSubscription withEndsAt(long endsAt) {
Utils.checkNotNull(endsAt, "endsAt");
this.endsAt = Optional.ofNullable(endsAt);
return this;
}
public PastSubscription withEndsAt(Optional<Integer> endsAt) {
public PastSubscription withEndsAt(Optional<Long> endsAt) {
Utils.checkNotNull(endsAt, "endsAt");
this.endsAt = endsAt;
return this;
@@ -450,9 +450,9 @@ public class PastSubscription {
private Optional<String> mode = Optional.empty();
private Optional<Integer> renewsAt = Optional.empty();
private Optional<Long> renewsAt = Optional.empty();
private Optional<Integer> endsAt = Optional.empty();
private Optional<Long> endsAt = Optional.empty();
private Optional<Boolean> canceled;
@@ -504,25 +504,25 @@ public class PastSubscription {
return this;
}
public Builder renewsAt(int renewsAt) {
public Builder renewsAt(long renewsAt) {
Utils.checkNotNull(renewsAt, "renewsAt");
this.renewsAt = Optional.ofNullable(renewsAt);
return this;
}
public Builder renewsAt(Optional<Integer> renewsAt) {
public Builder renewsAt(Optional<Long> renewsAt) {
Utils.checkNotNull(renewsAt, "renewsAt");
this.renewsAt = renewsAt;
return this;
}
public Builder endsAt(int endsAt) {
public Builder endsAt(long endsAt) {
Utils.checkNotNull(endsAt, "endsAt");
this.endsAt = Optional.ofNullable(endsAt);
return this;
}
public Builder endsAt(Optional<Integer> endsAt) {
public Builder endsAt(Optional<Long> endsAt) {
Utils.checkNotNull(endsAt, "endsAt");
this.endsAt = endsAt;
return this;

View File

@@ -32,23 +32,29 @@ public class PostUsersSignInDataRequestBody {
@SpeakeasyMetadata("form:name=rememberMe")
private Optional<Boolean> rememberMe;
@SpeakeasyMetadata("form:name=verificationCode")
private Optional<String> verificationCode;
@JsonCreator
public PostUsersSignInDataRequestBody(
String login,
String password,
Optional<Boolean> rememberMe) {
Optional<Boolean> rememberMe,
Optional<String> verificationCode) {
Utils.checkNotNull(login, "login");
Utils.checkNotNull(password, "password");
Utils.checkNotNull(rememberMe, "rememberMe");
Utils.checkNotNull(verificationCode, "verificationCode");
this.login = login;
this.password = password;
this.rememberMe = rememberMe;
this.verificationCode = verificationCode;
}
public PostUsersSignInDataRequestBody(
String login,
String password) {
this(login, password, Optional.empty());
this(login, password, Optional.empty(), Optional.empty());
}
@JsonIgnore
@@ -66,6 +72,11 @@ public class PostUsersSignInDataRequestBody {
return rememberMe;
}
@JsonIgnore
public Optional<String> verificationCode() {
return verificationCode;
}
public final static Builder builder() {
return new Builder();
}
@@ -93,6 +104,18 @@ public class PostUsersSignInDataRequestBody {
this.rememberMe = rememberMe;
return this;
}
public PostUsersSignInDataRequestBody withVerificationCode(String verificationCode) {
Utils.checkNotNull(verificationCode, "verificationCode");
this.verificationCode = Optional.ofNullable(verificationCode);
return this;
}
public PostUsersSignInDataRequestBody withVerificationCode(Optional<String> verificationCode) {
Utils.checkNotNull(verificationCode, "verificationCode");
this.verificationCode = verificationCode;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -106,7 +129,8 @@ public class PostUsersSignInDataRequestBody {
return
Objects.deepEquals(this.login, other.login) &&
Objects.deepEquals(this.password, other.password) &&
Objects.deepEquals(this.rememberMe, other.rememberMe);
Objects.deepEquals(this.rememberMe, other.rememberMe) &&
Objects.deepEquals(this.verificationCode, other.verificationCode);
}
@Override
@@ -114,7 +138,8 @@ public class PostUsersSignInDataRequestBody {
return Objects.hash(
login,
password,
rememberMe);
rememberMe,
verificationCode);
}
@Override
@@ -122,7 +147,8 @@ public class PostUsersSignInDataRequestBody {
return Utils.toString(PostUsersSignInDataRequestBody.class,
"login", login,
"password", password,
"rememberMe", rememberMe);
"rememberMe", rememberMe,
"verificationCode", verificationCode);
}
public final static class Builder {
@@ -131,7 +157,9 @@ public class PostUsersSignInDataRequestBody {
private String password;
private Optional<Boolean> rememberMe;
private Optional<Boolean> rememberMe;
private Optional<String> verificationCode = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -160,6 +188,18 @@ public class PostUsersSignInDataRequestBody {
this.rememberMe = rememberMe;
return this;
}
public Builder verificationCode(String verificationCode) {
Utils.checkNotNull(verificationCode, "verificationCode");
this.verificationCode = Optional.ofNullable(verificationCode);
return this;
}
public Builder verificationCode(Optional<String> verificationCode) {
Utils.checkNotNull(verificationCode, "verificationCode");
this.verificationCode = verificationCode;
return this;
}
public PostUsersSignInDataRequestBody build() {
if (rememberMe == null) {
@@ -167,7 +207,8 @@ public class PostUsersSignInDataRequestBody {
} return new PostUsersSignInDataRequestBody(
login,
password,
rememberMe);
rememberMe,
verificationCode);
}
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_RememberMe =

View File

@@ -16,6 +16,7 @@ import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Deprecated;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
@@ -158,10 +159,10 @@ public class PostUsersSignInDataUserPlexAccount {
private int id;
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
@JsonProperty("joinedAt")
private int joinedAt;
private long joinedAt;
/**
* The account locale
@@ -209,10 +210,10 @@ public class PostUsersSignInDataUserPlexAccount {
private Optional<Boolean> protected_;
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
@JsonProperty("rememberExpiresAt")
private int rememberExpiresAt;
private long rememberExpiresAt;
/**
* If the account is a Plex Home managed user
@@ -311,7 +312,7 @@ public class PostUsersSignInDataUserPlexAccount {
@JsonProperty("homeAdmin") Optional<Boolean> homeAdmin,
@JsonProperty("homeSize") int homeSize,
@JsonProperty("id") int id,
@JsonProperty("joinedAt") int joinedAt,
@JsonProperty("joinedAt") long joinedAt,
@JsonProperty("locale") Optional<String> locale,
@JsonProperty("mailingListActive") Optional<Boolean> mailingListActive,
@JsonProperty("mailingListStatus") PostUsersSignInDataMailingListStatus mailingListStatus,
@@ -319,7 +320,7 @@ public class PostUsersSignInDataUserPlexAccount {
@JsonProperty("pin") Optional<String> pin,
@JsonProperty("profile") PostUsersSignInDataUserProfile profile,
@JsonProperty("protected") Optional<Boolean> protected_,
@JsonProperty("rememberExpiresAt") int rememberExpiresAt,
@JsonProperty("rememberExpiresAt") long rememberExpiresAt,
@JsonProperty("restricted") Optional<Boolean> restricted,
@JsonProperty("roles") Optional<? extends List<String>> roles,
@JsonProperty("scrobbleTypes") String scrobbleTypes,
@@ -428,11 +429,11 @@ public class PostUsersSignInDataUserPlexAccount {
List<String> entitlements,
int homeSize,
int id,
int joinedAt,
long joinedAt,
PostUsersSignInDataMailingListStatus mailingListStatus,
int maxHomeSize,
PostUsersSignInDataUserProfile profile,
int rememberExpiresAt,
long rememberExpiresAt,
String scrobbleTypes,
List<PostUsersSignInDataServices> services,
PostUsersSignInDataSubscription subscription,
@@ -599,10 +600,10 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
@JsonIgnore
public int joinedAt() {
public long joinedAt() {
return joinedAt;
}
@@ -662,10 +663,10 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
@JsonIgnore
public int rememberExpiresAt() {
public long rememberExpiresAt() {
return rememberExpiresAt;
}
@@ -1054,9 +1055,9 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
public PostUsersSignInDataUserPlexAccount withJoinedAt(int joinedAt) {
public PostUsersSignInDataUserPlexAccount withJoinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
this.joinedAt = joinedAt;
return this;
@@ -1163,9 +1164,9 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
public PostUsersSignInDataUserPlexAccount withRememberExpiresAt(int rememberExpiresAt) {
public PostUsersSignInDataUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
this.rememberExpiresAt = rememberExpiresAt;
return this;
@@ -1509,7 +1510,7 @@ public class PostUsersSignInDataUserPlexAccount {
private Integer id;
private Integer joinedAt;
private Long joinedAt;
private Optional<String> locale = Optional.empty();
@@ -1526,7 +1527,7 @@ public class PostUsersSignInDataUserPlexAccount {
private Optional<Boolean> protected_;
private Integer rememberExpiresAt;
private Long rememberExpiresAt;
private Optional<Boolean> restricted;
@@ -1840,9 +1841,9 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime the account joined Plex
* Unix epoch datetime
*/
public Builder joinedAt(int joinedAt) {
public Builder joinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
this.joinedAt = joinedAt;
return this;
@@ -1949,9 +1950,9 @@ public class PostUsersSignInDataUserPlexAccount {
}
/**
* Unix epoch datetime the authtoken expires
* Unix epoch datetime
*/
public Builder rememberExpiresAt(int rememberExpiresAt) {
public Builder rememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
this.rememberExpiresAt = rememberExpiresAt;
return this;

View File

@@ -168,7 +168,10 @@ public class SDKMethodInterfaces {
public interface MethodCallGetServerResources {
dev.plexapi.sdk.models.operations.GetServerResourcesResponse getServerResources(
GetServerResourcesRequest request,
Optional<String> xPlexClientIdentifier,
Optional<? extends IncludeHttps> includeHttps,
Optional<? extends IncludeRelay> includeRelay,
Optional<? extends IncludeIPv6> includeIPv6,
Optional<String> serverURL) throws Exception;
}
@@ -404,9 +407,8 @@ public class SDKMethodInterfaces {
}
public interface MethodCallGetUserDetails {
dev.plexapi.sdk.models.operations.GetUserDetailsResponse getUserDetails(
String xPlexToken,
public interface MethodCallGetTokenDetails {
dev.plexapi.sdk.models.operations.GetTokenDetailsResponse getTokenDetails(
Optional<String> serverURL) throws Exception;
}

View File

@@ -34,7 +34,7 @@ public class Services {
private Optional<String> secret;
@JsonProperty("status")
private GetUserDetailsStatus status;
private GetTokenDetailsStatus status;
@JsonCreator
public Services(
@@ -42,7 +42,7 @@ public class Services {
@JsonProperty("endpoint") String endpoint,
@JsonProperty("token") Optional<String> token,
@JsonProperty("secret") Optional<String> secret,
@JsonProperty("status") GetUserDetailsStatus status) {
@JsonProperty("status") GetTokenDetailsStatus status) {
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(endpoint, "endpoint");
Utils.checkNotNull(token, "token");
@@ -58,7 +58,7 @@ public class Services {
public Services(
String identifier,
String endpoint,
GetUserDetailsStatus status) {
GetTokenDetailsStatus status) {
this(identifier, endpoint, Optional.empty(), Optional.empty(), status);
}
@@ -83,7 +83,7 @@ public class Services {
}
@JsonIgnore
public GetUserDetailsStatus status() {
public GetTokenDetailsStatus status() {
return status;
}
@@ -127,7 +127,7 @@ public class Services {
return this;
}
public Services withStatus(GetUserDetailsStatus status) {
public Services withStatus(GetTokenDetailsStatus status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -180,7 +180,7 @@ public class Services {
private Optional<String> secret = Optional.empty();
private GetUserDetailsStatus status;
private GetTokenDetailsStatus status;
private Builder() {
// force use of static builder() method
@@ -222,7 +222,7 @@ public class Services {
return this;
}
public Builder status(GetUserDetailsStatus status) {
public Builder status(GetTokenDetailsStatus status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -52,7 +52,7 @@ public class Subscription {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<? extends GetUserDetailsAuthenticationStatus> status;
private Optional<? extends GetTokenDetailsAuthenticationStatus> status;
/**
* Payment service used for your Plex Pass subscription
@@ -73,7 +73,7 @@ public class Subscription {
@JsonProperty("features") Optional<? extends List<Features>> features,
@JsonProperty("active") Optional<Boolean> active,
@JsonProperty("subscribedAt") JsonNullable<String> subscribedAt,
@JsonProperty("status") Optional<? extends GetUserDetailsAuthenticationStatus> status,
@JsonProperty("status") Optional<? extends GetTokenDetailsAuthenticationStatus> status,
@JsonProperty("paymentService") JsonNullable<String> paymentService,
@JsonProperty("plan") JsonNullable<String> plan) {
Utils.checkNotNull(features, "features");
@@ -124,8 +124,8 @@ public class Subscription {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetUserDetailsAuthenticationStatus> status() {
return (Optional<GetUserDetailsAuthenticationStatus>) status;
public Optional<GetTokenDetailsAuthenticationStatus> status() {
return (Optional<GetTokenDetailsAuthenticationStatus>) status;
}
/**
@@ -205,7 +205,7 @@ public class Subscription {
/**
* String representation of subscriptionActive
*/
public Subscription withStatus(GetUserDetailsAuthenticationStatus status) {
public Subscription withStatus(GetTokenDetailsAuthenticationStatus status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
@@ -214,7 +214,7 @@ public class Subscription {
/**
* String representation of subscriptionActive
*/
public Subscription withStatus(Optional<? extends GetUserDetailsAuthenticationStatus> status) {
public Subscription withStatus(Optional<? extends GetTokenDetailsAuthenticationStatus> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -304,7 +304,7 @@ public class Subscription {
private JsonNullable<String> subscribedAt = JsonNullable.undefined();
private Optional<? extends GetUserDetailsAuthenticationStatus> status = Optional.empty();
private Optional<? extends GetTokenDetailsAuthenticationStatus> status = Optional.empty();
private JsonNullable<String> paymentService = JsonNullable.undefined();
@@ -371,7 +371,7 @@ public class Subscription {
/**
* String representation of subscriptionActive
*/
public Builder status(GetUserDetailsAuthenticationStatus status) {
public Builder status(GetTokenDetailsAuthenticationStatus status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
@@ -380,7 +380,7 @@ public class Subscription {
/**
* String representation of subscriptionActive
*/
public Builder status(Optional<? extends GetUserDetailsAuthenticationStatus> status) {
public Builder status(Optional<? extends GetTokenDetailsAuthenticationStatus> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;