Files
plexjava/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java

2220 lines
68 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Deprecated;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* GetTokenDetailsUserPlexAccount - Logged in user details
*/
public class GetTokenDetailsUserPlexAccount {
/**
* Unknown
*/
@JsonInclude(Include.ALWAYS)
@JsonProperty("adsConsent")
private Optional<Boolean> adsConsent;
@JsonInclude(Include.ALWAYS)
@JsonProperty("adsConsentReminderAt")
private Optional<Long> adsConsentReminderAt;
@JsonInclude(Include.ALWAYS)
@JsonProperty("adsConsentSetAt")
private Optional<Long> adsConsentSetAt;
/**
* Unknown
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("anonymous")
private JsonNullable<Boolean> anonymous;
/**
* The account token
*/
@JsonProperty("authToken")
private String authToken;
/**
* If the two-factor authentication backup codes have been created
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("backupCodesCreated")
private Optional<Boolean> backupCodesCreated;
/**
* If the account has been confirmed
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("confirmed")
private Optional<Boolean> confirmed;
/**
* The account country
*/
@JsonProperty("country")
private String country;
/**
* The account email address
*/
@JsonProperty("email")
private String email;
/**
* If login with email only is enabled
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("emailOnlyAuth")
private Optional<Boolean> emailOnlyAuth;
/**
* If experimental features are enabled
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("experimentalFeatures")
private Optional<Boolean> experimentalFeatures;
/**
* Your account full name
*/
@JsonProperty("friendlyName")
private String friendlyName;
/**
* List of devices your allowed to use with this account
*/
@JsonProperty("entitlements")
private List<String> entitlements;
/**
* If the account is a Plex Home guest user
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("guest")
private Optional<Boolean> guest;
/**
* If the account has a password
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hasPassword")
private Optional<Boolean> hasPassword;
/**
* If the account is a Plex Home user
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("home")
private Optional<Boolean> home;
/**
* If the account is the Plex Home admin
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("homeAdmin")
private Optional<Boolean> homeAdmin;
/**
* The number of accounts in the Plex Home
*/
@JsonProperty("homeSize")
private int homeSize;
/**
* The Plex account ID
*/
@JsonProperty("id")
private int id;
/**
* Unix epoch datetime in seconds
*/
@JsonProperty("joinedAt")
private long joinedAt;
/**
* The account locale
*/
@JsonInclude(Include.ALWAYS)
@JsonProperty("locale")
private Optional<String> locale;
/**
* If you are subscribed to the Plex newsletter
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("mailingListActive")
private Optional<Boolean> mailingListActive;
/**
* Your current mailing list status (active or unsubscribed)
*/
@JsonProperty("mailingListStatus")
private MailingListStatus mailingListStatus;
/**
* The maximum number of accounts allowed in the Plex Home
*/
@JsonProperty("maxHomeSize")
private int maxHomeSize;
/**
* [Might be removed] The hashed Plex Home PIN
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("pin")
@Deprecated
private Optional<String> pin;
@JsonProperty("profile")
private UserProfile profile;
/**
* If the account has a Plex Home PIN enabled
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("protected")
private Optional<Boolean> protected_;
/**
* Unix epoch datetime in seconds
*/
@JsonProperty("rememberExpiresAt")
private long rememberExpiresAt;
/**
* If the account is a Plex Home managed user
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("restricted")
private Optional<Boolean> restricted;
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("roles")
private Optional<? extends List<String>> roles;
/**
* Unknown
*/
@JsonProperty("scrobbleTypes")
private String scrobbleTypes;
@JsonProperty("services")
private List<Services> services;
/**
* If the accounts Plex Pass subscription is active
*/
@JsonProperty("subscription")
private Subscription subscription;
/**
* Description of the Plex Pass subscription
*/
@JsonInclude(Include.ALWAYS)
@JsonProperty("subscriptionDescription")
private Optional<String> subscriptionDescription;
@JsonProperty("subscriptions")
private List<GetTokenDetailsSubscription> subscriptions;
/**
* URL of the account thumbnail
*/
@JsonProperty("thumb")
private String thumb;
/**
* The title of the account (username or friendly name)
*/
@JsonProperty("title")
private String title;
/**
* If two-factor authentication is enabled
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("twoFactorEnabled")
private Optional<Boolean> twoFactorEnabled;
/**
* The account username
*/
@JsonProperty("username")
private String username;
/**
* The account UUID
*/
@JsonProperty("uuid")
private String uuid;
@JsonInclude(Include.ALWAYS)
@JsonProperty("attributionPartner")
private Optional<String> attributionPartner;
@JsonCreator
public GetTokenDetailsUserPlexAccount(
@JsonProperty("adsConsent") Optional<Boolean> adsConsent,
@JsonProperty("adsConsentReminderAt") Optional<Long> adsConsentReminderAt,
@JsonProperty("adsConsentSetAt") Optional<Long> adsConsentSetAt,
@JsonProperty("anonymous") JsonNullable<Boolean> anonymous,
@JsonProperty("authToken") String authToken,
@JsonProperty("backupCodesCreated") Optional<Boolean> backupCodesCreated,
@JsonProperty("confirmed") Optional<Boolean> confirmed,
@JsonProperty("country") String country,
@JsonProperty("email") String email,
@JsonProperty("emailOnlyAuth") Optional<Boolean> emailOnlyAuth,
@JsonProperty("experimentalFeatures") Optional<Boolean> experimentalFeatures,
@JsonProperty("friendlyName") String friendlyName,
@JsonProperty("entitlements") List<String> entitlements,
@JsonProperty("guest") Optional<Boolean> guest,
@JsonProperty("hasPassword") Optional<Boolean> hasPassword,
@JsonProperty("home") Optional<Boolean> home,
@JsonProperty("homeAdmin") Optional<Boolean> homeAdmin,
@JsonProperty("homeSize") int homeSize,
@JsonProperty("id") int id,
@JsonProperty("joinedAt") long joinedAt,
@JsonProperty("locale") Optional<String> locale,
@JsonProperty("mailingListActive") Optional<Boolean> mailingListActive,
@JsonProperty("mailingListStatus") MailingListStatus mailingListStatus,
@JsonProperty("maxHomeSize") int maxHomeSize,
@JsonProperty("pin") Optional<String> pin,
@JsonProperty("profile") UserProfile profile,
@JsonProperty("protected") Optional<Boolean> protected_,
@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<GetTokenDetailsSubscription> subscriptions,
@JsonProperty("thumb") String thumb,
@JsonProperty("title") String title,
@JsonProperty("twoFactorEnabled") Optional<Boolean> twoFactorEnabled,
@JsonProperty("username") String username,
@JsonProperty("uuid") String uuid,
@JsonProperty("attributionPartner") Optional<String> attributionPartner) {
Utils.checkNotNull(adsConsent, "adsConsent");
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
Utils.checkNotNull(anonymous, "anonymous");
Utils.checkNotNull(authToken, "authToken");
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
Utils.checkNotNull(confirmed, "confirmed");
Utils.checkNotNull(country, "country");
Utils.checkNotNull(email, "email");
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
Utils.checkNotNull(friendlyName, "friendlyName");
Utils.checkNotNull(entitlements, "entitlements");
Utils.checkNotNull(guest, "guest");
Utils.checkNotNull(hasPassword, "hasPassword");
Utils.checkNotNull(home, "home");
Utils.checkNotNull(homeAdmin, "homeAdmin");
Utils.checkNotNull(homeSize, "homeSize");
Utils.checkNotNull(id, "id");
Utils.checkNotNull(joinedAt, "joinedAt");
Utils.checkNotNull(locale, "locale");
Utils.checkNotNull(mailingListActive, "mailingListActive");
Utils.checkNotNull(mailingListStatus, "mailingListStatus");
Utils.checkNotNull(maxHomeSize, "maxHomeSize");
Utils.checkNotNull(pin, "pin");
Utils.checkNotNull(profile, "profile");
Utils.checkNotNull(protected_, "protected_");
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
Utils.checkNotNull(restricted, "restricted");
Utils.checkNotNull(roles, "roles");
Utils.checkNotNull(scrobbleTypes, "scrobbleTypes");
Utils.checkNotNull(services, "services");
Utils.checkNotNull(subscription, "subscription");
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
Utils.checkNotNull(subscriptions, "subscriptions");
Utils.checkNotNull(thumb, "thumb");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
Utils.checkNotNull(username, "username");
Utils.checkNotNull(uuid, "uuid");
Utils.checkNotNull(attributionPartner, "attributionPartner");
this.adsConsent = adsConsent;
this.adsConsentReminderAt = adsConsentReminderAt;
this.adsConsentSetAt = adsConsentSetAt;
this.anonymous = anonymous;
this.authToken = authToken;
this.backupCodesCreated = backupCodesCreated;
this.confirmed = confirmed;
this.country = country;
this.email = email;
this.emailOnlyAuth = emailOnlyAuth;
this.experimentalFeatures = experimentalFeatures;
this.friendlyName = friendlyName;
this.entitlements = entitlements;
this.guest = guest;
this.hasPassword = hasPassword;
this.home = home;
this.homeAdmin = homeAdmin;
this.homeSize = homeSize;
this.id = id;
this.joinedAt = joinedAt;
this.locale = locale;
this.mailingListActive = mailingListActive;
this.mailingListStatus = mailingListStatus;
this.maxHomeSize = maxHomeSize;
this.pin = pin;
this.profile = profile;
this.protected_ = protected_;
this.rememberExpiresAt = rememberExpiresAt;
this.restricted = restricted;
this.roles = roles;
this.scrobbleTypes = scrobbleTypes;
this.services = services;
this.subscription = subscription;
this.subscriptionDescription = subscriptionDescription;
this.subscriptions = subscriptions;
this.thumb = thumb;
this.title = title;
this.twoFactorEnabled = twoFactorEnabled;
this.username = username;
this.uuid = uuid;
this.attributionPartner = attributionPartner;
}
public GetTokenDetailsUserPlexAccount(
String authToken,
String country,
String email,
String friendlyName,
List<String> entitlements,
int homeSize,
int id,
long joinedAt,
MailingListStatus mailingListStatus,
int maxHomeSize,
UserProfile profile,
long rememberExpiresAt,
String scrobbleTypes,
List<Services> services,
Subscription subscription,
List<GetTokenDetailsSubscription> subscriptions,
String thumb,
String title,
String username,
String uuid) {
this(Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), authToken, Optional.empty(), Optional.empty(), country, email, Optional.empty(), Optional.empty(), friendlyName, entitlements, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), homeSize, id, joinedAt, Optional.empty(), Optional.empty(), mailingListStatus, maxHomeSize, Optional.empty(), profile, Optional.empty(), rememberExpiresAt, Optional.empty(), Optional.empty(), scrobbleTypes, services, subscription, Optional.empty(), subscriptions, thumb, title, Optional.empty(), username, uuid, Optional.empty());
}
/**
* Unknown
*/
@JsonIgnore
public Optional<Boolean> adsConsent() {
return adsConsent;
}
@JsonIgnore
public Optional<Long> adsConsentReminderAt() {
return adsConsentReminderAt;
}
@JsonIgnore
public Optional<Long> adsConsentSetAt() {
return adsConsentSetAt;
}
/**
* Unknown
*/
@JsonIgnore
public JsonNullable<Boolean> anonymous() {
return anonymous;
}
/**
* The account token
*/
@JsonIgnore
public String authToken() {
return authToken;
}
/**
* If the two-factor authentication backup codes have been created
*/
@JsonIgnore
public Optional<Boolean> backupCodesCreated() {
return backupCodesCreated;
}
/**
* If the account has been confirmed
*/
@JsonIgnore
public Optional<Boolean> confirmed() {
return confirmed;
}
/**
* The account country
*/
@JsonIgnore
public String country() {
return country;
}
/**
* The account email address
*/
@JsonIgnore
public String email() {
return email;
}
/**
* If login with email only is enabled
*/
@JsonIgnore
public Optional<Boolean> emailOnlyAuth() {
return emailOnlyAuth;
}
/**
* If experimental features are enabled
*/
@JsonIgnore
public Optional<Boolean> experimentalFeatures() {
return experimentalFeatures;
}
/**
* Your account full name
*/
@JsonIgnore
public String friendlyName() {
return friendlyName;
}
/**
* List of devices your allowed to use with this account
*/
@JsonIgnore
public List<String> entitlements() {
return entitlements;
}
/**
* If the account is a Plex Home guest user
*/
@JsonIgnore
public Optional<Boolean> guest() {
return guest;
}
/**
* If the account has a password
*/
@JsonIgnore
public Optional<Boolean> hasPassword() {
return hasPassword;
}
/**
* If the account is a Plex Home user
*/
@JsonIgnore
public Optional<Boolean> home() {
return home;
}
/**
* If the account is the Plex Home admin
*/
@JsonIgnore
public Optional<Boolean> homeAdmin() {
return homeAdmin;
}
/**
* The number of accounts in the Plex Home
*/
@JsonIgnore
public int homeSize() {
return homeSize;
}
/**
* The Plex account ID
*/
@JsonIgnore
public int id() {
return id;
}
/**
* Unix epoch datetime in seconds
*/
@JsonIgnore
public long joinedAt() {
return joinedAt;
}
/**
* The account locale
*/
@JsonIgnore
public Optional<String> locale() {
return locale;
}
/**
* If you are subscribed to the Plex newsletter
*/
@JsonIgnore
public Optional<Boolean> mailingListActive() {
return mailingListActive;
}
/**
* Your current mailing list status (active or unsubscribed)
*/
@JsonIgnore
public MailingListStatus mailingListStatus() {
return mailingListStatus;
}
/**
* The maximum number of accounts allowed in the Plex Home
*/
@JsonIgnore
public int maxHomeSize() {
return maxHomeSize;
}
/**
* [Might be removed] The hashed Plex Home PIN
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
@JsonIgnore
public Optional<String> pin() {
return pin;
}
@JsonIgnore
public UserProfile profile() {
return profile;
}
/**
* If the account has a Plex Home PIN enabled
*/
@JsonIgnore
public Optional<Boolean> protected_() {
return protected_;
}
/**
* Unix epoch datetime in seconds
*/
@JsonIgnore
public long rememberExpiresAt() {
return rememberExpiresAt;
}
/**
* If the account is a Plex Home managed user
*/
@JsonIgnore
public Optional<Boolean> restricted() {
return restricted;
}
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<String>> roles() {
return (Optional<List<String>>) roles;
}
/**
* Unknown
*/
@JsonIgnore
public String scrobbleTypes() {
return scrobbleTypes;
}
@JsonIgnore
public List<Services> services() {
return services;
}
/**
* If the accounts Plex Pass subscription is active
*/
@JsonIgnore
public Subscription subscription() {
return subscription;
}
/**
* Description of the Plex Pass subscription
*/
@JsonIgnore
public Optional<String> subscriptionDescription() {
return subscriptionDescription;
}
@JsonIgnore
public List<GetTokenDetailsSubscription> subscriptions() {
return subscriptions;
}
/**
* URL of the account thumbnail
*/
@JsonIgnore
public String thumb() {
return thumb;
}
/**
* The title of the account (username or friendly name)
*/
@JsonIgnore
public String title() {
return title;
}
/**
* If two-factor authentication is enabled
*/
@JsonIgnore
public Optional<Boolean> twoFactorEnabled() {
return twoFactorEnabled;
}
/**
* The account username
*/
@JsonIgnore
public String username() {
return username;
}
/**
* The account UUID
*/
@JsonIgnore
public String uuid() {
return uuid;
}
@JsonIgnore
public Optional<String> attributionPartner() {
return attributionPartner;
}
public final static Builder builder() {
return new Builder();
}
/**
* Unknown
*/
public GetTokenDetailsUserPlexAccount withAdsConsent(boolean adsConsent) {
Utils.checkNotNull(adsConsent, "adsConsent");
this.adsConsent = Optional.ofNullable(adsConsent);
return this;
}
/**
* Unknown
*/
public GetTokenDetailsUserPlexAccount withAdsConsent(Optional<Boolean> adsConsent) {
Utils.checkNotNull(adsConsent, "adsConsent");
this.adsConsent = adsConsent;
return this;
}
public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(long adsConsentReminderAt) {
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt);
return this;
}
public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(Optional<Long> adsConsentReminderAt) {
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
this.adsConsentReminderAt = adsConsentReminderAt;
return this;
}
public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(long adsConsentSetAt) {
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt);
return this;
}
public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(Optional<Long> adsConsentSetAt) {
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
this.adsConsentSetAt = adsConsentSetAt;
return this;
}
/**
* Unknown
*/
public GetTokenDetailsUserPlexAccount withAnonymous(boolean anonymous) {
Utils.checkNotNull(anonymous, "anonymous");
this.anonymous = JsonNullable.of(anonymous);
return this;
}
/**
* Unknown
*/
public GetTokenDetailsUserPlexAccount withAnonymous(JsonNullable<Boolean> anonymous) {
Utils.checkNotNull(anonymous, "anonymous");
this.anonymous = anonymous;
return this;
}
/**
* The account token
*/
public GetTokenDetailsUserPlexAccount withAuthToken(String authToken) {
Utils.checkNotNull(authToken, "authToken");
this.authToken = authToken;
return this;
}
/**
* If the two-factor authentication backup codes have been created
*/
public GetTokenDetailsUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) {
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
this.backupCodesCreated = Optional.ofNullable(backupCodesCreated);
return this;
}
/**
* If the two-factor authentication backup codes have been created
*/
public GetTokenDetailsUserPlexAccount withBackupCodesCreated(Optional<Boolean> backupCodesCreated) {
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
this.backupCodesCreated = backupCodesCreated;
return this;
}
/**
* If the account has been confirmed
*/
public GetTokenDetailsUserPlexAccount withConfirmed(boolean confirmed) {
Utils.checkNotNull(confirmed, "confirmed");
this.confirmed = Optional.ofNullable(confirmed);
return this;
}
/**
* If the account has been confirmed
*/
public GetTokenDetailsUserPlexAccount withConfirmed(Optional<Boolean> confirmed) {
Utils.checkNotNull(confirmed, "confirmed");
this.confirmed = confirmed;
return this;
}
/**
* The account country
*/
public GetTokenDetailsUserPlexAccount withCountry(String country) {
Utils.checkNotNull(country, "country");
this.country = country;
return this;
}
/**
* The account email address
*/
public GetTokenDetailsUserPlexAccount withEmail(String email) {
Utils.checkNotNull(email, "email");
this.email = email;
return this;
}
/**
* If login with email only is enabled
*/
public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) {
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth);
return this;
}
/**
* If login with email only is enabled
*/
public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(Optional<Boolean> emailOnlyAuth) {
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
this.emailOnlyAuth = emailOnlyAuth;
return this;
}
/**
* If experimental features are enabled
*/
public GetTokenDetailsUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) {
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
this.experimentalFeatures = Optional.ofNullable(experimentalFeatures);
return this;
}
/**
* If experimental features are enabled
*/
public GetTokenDetailsUserPlexAccount withExperimentalFeatures(Optional<Boolean> experimentalFeatures) {
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
this.experimentalFeatures = experimentalFeatures;
return this;
}
/**
* Your account full name
*/
public GetTokenDetailsUserPlexAccount withFriendlyName(String friendlyName) {
Utils.checkNotNull(friendlyName, "friendlyName");
this.friendlyName = friendlyName;
return this;
}
/**
* List of devices your allowed to use with this account
*/
public GetTokenDetailsUserPlexAccount withEntitlements(List<String> entitlements) {
Utils.checkNotNull(entitlements, "entitlements");
this.entitlements = entitlements;
return this;
}
/**
* If the account is a Plex Home guest user
*/
public GetTokenDetailsUserPlexAccount withGuest(boolean guest) {
Utils.checkNotNull(guest, "guest");
this.guest = Optional.ofNullable(guest);
return this;
}
/**
* If the account is a Plex Home guest user
*/
public GetTokenDetailsUserPlexAccount withGuest(Optional<Boolean> guest) {
Utils.checkNotNull(guest, "guest");
this.guest = guest;
return this;
}
/**
* If the account has a password
*/
public GetTokenDetailsUserPlexAccount withHasPassword(boolean hasPassword) {
Utils.checkNotNull(hasPassword, "hasPassword");
this.hasPassword = Optional.ofNullable(hasPassword);
return this;
}
/**
* If the account has a password
*/
public GetTokenDetailsUserPlexAccount withHasPassword(Optional<Boolean> hasPassword) {
Utils.checkNotNull(hasPassword, "hasPassword");
this.hasPassword = hasPassword;
return this;
}
/**
* If the account is a Plex Home user
*/
public GetTokenDetailsUserPlexAccount withHome(boolean home) {
Utils.checkNotNull(home, "home");
this.home = Optional.ofNullable(home);
return this;
}
/**
* If the account is a Plex Home user
*/
public GetTokenDetailsUserPlexAccount withHome(Optional<Boolean> home) {
Utils.checkNotNull(home, "home");
this.home = home;
return this;
}
/**
* If the account is the Plex Home admin
*/
public GetTokenDetailsUserPlexAccount withHomeAdmin(boolean homeAdmin) {
Utils.checkNotNull(homeAdmin, "homeAdmin");
this.homeAdmin = Optional.ofNullable(homeAdmin);
return this;
}
/**
* If the account is the Plex Home admin
*/
public GetTokenDetailsUserPlexAccount withHomeAdmin(Optional<Boolean> homeAdmin) {
Utils.checkNotNull(homeAdmin, "homeAdmin");
this.homeAdmin = homeAdmin;
return this;
}
/**
* The number of accounts in the Plex Home
*/
public GetTokenDetailsUserPlexAccount withHomeSize(int homeSize) {
Utils.checkNotNull(homeSize, "homeSize");
this.homeSize = homeSize;
return this;
}
/**
* The Plex account ID
*/
public GetTokenDetailsUserPlexAccount withId(int id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* Unix epoch datetime in seconds
*/
public GetTokenDetailsUserPlexAccount withJoinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
this.joinedAt = joinedAt;
return this;
}
/**
* The account locale
*/
public GetTokenDetailsUserPlexAccount withLocale(String locale) {
Utils.checkNotNull(locale, "locale");
this.locale = Optional.ofNullable(locale);
return this;
}
/**
* The account locale
*/
public GetTokenDetailsUserPlexAccount withLocale(Optional<String> locale) {
Utils.checkNotNull(locale, "locale");
this.locale = locale;
return this;
}
/**
* If you are subscribed to the Plex newsletter
*/
public GetTokenDetailsUserPlexAccount withMailingListActive(boolean mailingListActive) {
Utils.checkNotNull(mailingListActive, "mailingListActive");
this.mailingListActive = Optional.ofNullable(mailingListActive);
return this;
}
/**
* If you are subscribed to the Plex newsletter
*/
public GetTokenDetailsUserPlexAccount withMailingListActive(Optional<Boolean> mailingListActive) {
Utils.checkNotNull(mailingListActive, "mailingListActive");
this.mailingListActive = mailingListActive;
return this;
}
/**
* Your current mailing list status (active or unsubscribed)
*/
public GetTokenDetailsUserPlexAccount withMailingListStatus(MailingListStatus mailingListStatus) {
Utils.checkNotNull(mailingListStatus, "mailingListStatus");
this.mailingListStatus = mailingListStatus;
return this;
}
/**
* The maximum number of accounts allowed in the Plex Home
*/
public GetTokenDetailsUserPlexAccount withMaxHomeSize(int maxHomeSize) {
Utils.checkNotNull(maxHomeSize, "maxHomeSize");
this.maxHomeSize = maxHomeSize;
return this;
}
/**
* [Might be removed] The hashed Plex Home PIN
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
public GetTokenDetailsUserPlexAccount withPin(String pin) {
Utils.checkNotNull(pin, "pin");
this.pin = Optional.ofNullable(pin);
return this;
}
/**
* [Might be removed] The hashed Plex Home PIN
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
public GetTokenDetailsUserPlexAccount withPin(Optional<String> pin) {
Utils.checkNotNull(pin, "pin");
this.pin = pin;
return this;
}
public GetTokenDetailsUserPlexAccount withProfile(UserProfile profile) {
Utils.checkNotNull(profile, "profile");
this.profile = profile;
return this;
}
/**
* If the account has a Plex Home PIN enabled
*/
public GetTokenDetailsUserPlexAccount withProtected(boolean protected_) {
Utils.checkNotNull(protected_, "protected_");
this.protected_ = Optional.ofNullable(protected_);
return this;
}
/**
* If the account has a Plex Home PIN enabled
*/
public GetTokenDetailsUserPlexAccount withProtected(Optional<Boolean> protected_) {
Utils.checkNotNull(protected_, "protected_");
this.protected_ = protected_;
return this;
}
/**
* Unix epoch datetime in seconds
*/
public GetTokenDetailsUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
this.rememberExpiresAt = rememberExpiresAt;
return this;
}
/**
* If the account is a Plex Home managed user
*/
public GetTokenDetailsUserPlexAccount withRestricted(boolean restricted) {
Utils.checkNotNull(restricted, "restricted");
this.restricted = Optional.ofNullable(restricted);
return this;
}
/**
* If the account is a Plex Home managed user
*/
public GetTokenDetailsUserPlexAccount withRestricted(Optional<Boolean> restricted) {
Utils.checkNotNull(restricted, "restricted");
this.restricted = restricted;
return this;
}
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
public GetTokenDetailsUserPlexAccount withRoles(List<String> roles) {
Utils.checkNotNull(roles, "roles");
this.roles = Optional.ofNullable(roles);
return this;
}
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
public GetTokenDetailsUserPlexAccount withRoles(Optional<? extends List<String>> roles) {
Utils.checkNotNull(roles, "roles");
this.roles = roles;
return this;
}
/**
* Unknown
*/
public GetTokenDetailsUserPlexAccount withScrobbleTypes(String scrobbleTypes) {
Utils.checkNotNull(scrobbleTypes, "scrobbleTypes");
this.scrobbleTypes = scrobbleTypes;
return this;
}
public GetTokenDetailsUserPlexAccount withServices(List<Services> services) {
Utils.checkNotNull(services, "services");
this.services = services;
return this;
}
/**
* If the accounts Plex Pass subscription is active
*/
public GetTokenDetailsUserPlexAccount withSubscription(Subscription subscription) {
Utils.checkNotNull(subscription, "subscription");
this.subscription = subscription;
return this;
}
/**
* Description of the Plex Pass subscription
*/
public GetTokenDetailsUserPlexAccount withSubscriptionDescription(String subscriptionDescription) {
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
this.subscriptionDescription = Optional.ofNullable(subscriptionDescription);
return this;
}
/**
* Description of the Plex Pass subscription
*/
public GetTokenDetailsUserPlexAccount withSubscriptionDescription(Optional<String> subscriptionDescription) {
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
this.subscriptionDescription = subscriptionDescription;
return this;
}
public GetTokenDetailsUserPlexAccount withSubscriptions(List<GetTokenDetailsSubscription> subscriptions) {
Utils.checkNotNull(subscriptions, "subscriptions");
this.subscriptions = subscriptions;
return this;
}
/**
* URL of the account thumbnail
*/
public GetTokenDetailsUserPlexAccount withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The title of the account (username or friendly name)
*/
public GetTokenDetailsUserPlexAccount withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
/**
* If two-factor authentication is enabled
*/
public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) {
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled);
return this;
}
/**
* If two-factor authentication is enabled
*/
public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(Optional<Boolean> twoFactorEnabled) {
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
this.twoFactorEnabled = twoFactorEnabled;
return this;
}
/**
* The account username
*/
public GetTokenDetailsUserPlexAccount withUsername(String username) {
Utils.checkNotNull(username, "username");
this.username = username;
return this;
}
/**
* The account UUID
*/
public GetTokenDetailsUserPlexAccount withUuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
}
public GetTokenDetailsUserPlexAccount withAttributionPartner(String attributionPartner) {
Utils.checkNotNull(attributionPartner, "attributionPartner");
this.attributionPartner = Optional.ofNullable(attributionPartner);
return this;
}
public GetTokenDetailsUserPlexAccount withAttributionPartner(Optional<String> attributionPartner) {
Utils.checkNotNull(attributionPartner, "attributionPartner");
this.attributionPartner = attributionPartner;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetTokenDetailsUserPlexAccount other = (GetTokenDetailsUserPlexAccount) o;
return
Objects.deepEquals(this.adsConsent, other.adsConsent) &&
Objects.deepEquals(this.adsConsentReminderAt, other.adsConsentReminderAt) &&
Objects.deepEquals(this.adsConsentSetAt, other.adsConsentSetAt) &&
Objects.deepEquals(this.anonymous, other.anonymous) &&
Objects.deepEquals(this.authToken, other.authToken) &&
Objects.deepEquals(this.backupCodesCreated, other.backupCodesCreated) &&
Objects.deepEquals(this.confirmed, other.confirmed) &&
Objects.deepEquals(this.country, other.country) &&
Objects.deepEquals(this.email, other.email) &&
Objects.deepEquals(this.emailOnlyAuth, other.emailOnlyAuth) &&
Objects.deepEquals(this.experimentalFeatures, other.experimentalFeatures) &&
Objects.deepEquals(this.friendlyName, other.friendlyName) &&
Objects.deepEquals(this.entitlements, other.entitlements) &&
Objects.deepEquals(this.guest, other.guest) &&
Objects.deepEquals(this.hasPassword, other.hasPassword) &&
Objects.deepEquals(this.home, other.home) &&
Objects.deepEquals(this.homeAdmin, other.homeAdmin) &&
Objects.deepEquals(this.homeSize, other.homeSize) &&
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.joinedAt, other.joinedAt) &&
Objects.deepEquals(this.locale, other.locale) &&
Objects.deepEquals(this.mailingListActive, other.mailingListActive) &&
Objects.deepEquals(this.mailingListStatus, other.mailingListStatus) &&
Objects.deepEquals(this.maxHomeSize, other.maxHomeSize) &&
Objects.deepEquals(this.pin, other.pin) &&
Objects.deepEquals(this.profile, other.profile) &&
Objects.deepEquals(this.protected_, other.protected_) &&
Objects.deepEquals(this.rememberExpiresAt, other.rememberExpiresAt) &&
Objects.deepEquals(this.restricted, other.restricted) &&
Objects.deepEquals(this.roles, other.roles) &&
Objects.deepEquals(this.scrobbleTypes, other.scrobbleTypes) &&
Objects.deepEquals(this.services, other.services) &&
Objects.deepEquals(this.subscription, other.subscription) &&
Objects.deepEquals(this.subscriptionDescription, other.subscriptionDescription) &&
Objects.deepEquals(this.subscriptions, other.subscriptions) &&
Objects.deepEquals(this.thumb, other.thumb) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.twoFactorEnabled, other.twoFactorEnabled) &&
Objects.deepEquals(this.username, other.username) &&
Objects.deepEquals(this.uuid, other.uuid) &&
Objects.deepEquals(this.attributionPartner, other.attributionPartner);
}
@Override
public int hashCode() {
return Objects.hash(
adsConsent,
adsConsentReminderAt,
adsConsentSetAt,
anonymous,
authToken,
backupCodesCreated,
confirmed,
country,
email,
emailOnlyAuth,
experimentalFeatures,
friendlyName,
entitlements,
guest,
hasPassword,
home,
homeAdmin,
homeSize,
id,
joinedAt,
locale,
mailingListActive,
mailingListStatus,
maxHomeSize,
pin,
profile,
protected_,
rememberExpiresAt,
restricted,
roles,
scrobbleTypes,
services,
subscription,
subscriptionDescription,
subscriptions,
thumb,
title,
twoFactorEnabled,
username,
uuid,
attributionPartner);
}
@Override
public String toString() {
return Utils.toString(GetTokenDetailsUserPlexAccount.class,
"adsConsent", adsConsent,
"adsConsentReminderAt", adsConsentReminderAt,
"adsConsentSetAt", adsConsentSetAt,
"anonymous", anonymous,
"authToken", authToken,
"backupCodesCreated", backupCodesCreated,
"confirmed", confirmed,
"country", country,
"email", email,
"emailOnlyAuth", emailOnlyAuth,
"experimentalFeatures", experimentalFeatures,
"friendlyName", friendlyName,
"entitlements", entitlements,
"guest", guest,
"hasPassword", hasPassword,
"home", home,
"homeAdmin", homeAdmin,
"homeSize", homeSize,
"id", id,
"joinedAt", joinedAt,
"locale", locale,
"mailingListActive", mailingListActive,
"mailingListStatus", mailingListStatus,
"maxHomeSize", maxHomeSize,
"pin", pin,
"profile", profile,
"protected_", protected_,
"rememberExpiresAt", rememberExpiresAt,
"restricted", restricted,
"roles", roles,
"scrobbleTypes", scrobbleTypes,
"services", services,
"subscription", subscription,
"subscriptionDescription", subscriptionDescription,
"subscriptions", subscriptions,
"thumb", thumb,
"title", title,
"twoFactorEnabled", twoFactorEnabled,
"username", username,
"uuid", uuid,
"attributionPartner", attributionPartner);
}
public final static class Builder {
private Optional<Boolean> adsConsent = Optional.empty();
private Optional<Long> adsConsentReminderAt = Optional.empty();
private Optional<Long> adsConsentSetAt = Optional.empty();
private JsonNullable<Boolean> anonymous;
private String authToken;
private Optional<Boolean> backupCodesCreated;
private Optional<Boolean> confirmed;
private String country;
private String email;
private Optional<Boolean> emailOnlyAuth;
private Optional<Boolean> experimentalFeatures;
private String friendlyName;
private List<String> entitlements;
private Optional<Boolean> guest;
private Optional<Boolean> hasPassword;
private Optional<Boolean> home;
private Optional<Boolean> homeAdmin;
private Integer homeSize;
private Integer id;
private Long joinedAt;
private Optional<String> locale = Optional.empty();
private Optional<Boolean> mailingListActive;
private MailingListStatus mailingListStatus;
private Integer maxHomeSize;
@Deprecated
private Optional<String> pin = Optional.empty();
private UserProfile profile;
private Optional<Boolean> protected_;
private Long rememberExpiresAt;
private Optional<Boolean> restricted;
private Optional<? extends List<String>> roles = Optional.empty();
private String scrobbleTypes;
private List<Services> services;
private Subscription subscription;
private Optional<String> subscriptionDescription = Optional.empty();
private List<GetTokenDetailsSubscription> subscriptions;
private String thumb;
private String title;
private Optional<Boolean> twoFactorEnabled;
private String username;
private String uuid;
private Optional<String> attributionPartner = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* Unknown
*/
public Builder adsConsent(boolean adsConsent) {
Utils.checkNotNull(adsConsent, "adsConsent");
this.adsConsent = Optional.ofNullable(adsConsent);
return this;
}
/**
* Unknown
*/
public Builder adsConsent(Optional<Boolean> adsConsent) {
Utils.checkNotNull(adsConsent, "adsConsent");
this.adsConsent = adsConsent;
return this;
}
public Builder adsConsentReminderAt(long adsConsentReminderAt) {
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt);
return this;
}
public Builder adsConsentReminderAt(Optional<Long> adsConsentReminderAt) {
Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt");
this.adsConsentReminderAt = adsConsentReminderAt;
return this;
}
public Builder adsConsentSetAt(long adsConsentSetAt) {
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt);
return this;
}
public Builder adsConsentSetAt(Optional<Long> adsConsentSetAt) {
Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt");
this.adsConsentSetAt = adsConsentSetAt;
return this;
}
/**
* Unknown
*/
public Builder anonymous(boolean anonymous) {
Utils.checkNotNull(anonymous, "anonymous");
this.anonymous = JsonNullable.of(anonymous);
return this;
}
/**
* Unknown
*/
public Builder anonymous(JsonNullable<Boolean> anonymous) {
Utils.checkNotNull(anonymous, "anonymous");
this.anonymous = anonymous;
return this;
}
/**
* The account token
*/
public Builder authToken(String authToken) {
Utils.checkNotNull(authToken, "authToken");
this.authToken = authToken;
return this;
}
/**
* If the two-factor authentication backup codes have been created
*/
public Builder backupCodesCreated(boolean backupCodesCreated) {
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
this.backupCodesCreated = Optional.ofNullable(backupCodesCreated);
return this;
}
/**
* If the two-factor authentication backup codes have been created
*/
public Builder backupCodesCreated(Optional<Boolean> backupCodesCreated) {
Utils.checkNotNull(backupCodesCreated, "backupCodesCreated");
this.backupCodesCreated = backupCodesCreated;
return this;
}
/**
* If the account has been confirmed
*/
public Builder confirmed(boolean confirmed) {
Utils.checkNotNull(confirmed, "confirmed");
this.confirmed = Optional.ofNullable(confirmed);
return this;
}
/**
* If the account has been confirmed
*/
public Builder confirmed(Optional<Boolean> confirmed) {
Utils.checkNotNull(confirmed, "confirmed");
this.confirmed = confirmed;
return this;
}
/**
* The account country
*/
public Builder country(String country) {
Utils.checkNotNull(country, "country");
this.country = country;
return this;
}
/**
* The account email address
*/
public Builder email(String email) {
Utils.checkNotNull(email, "email");
this.email = email;
return this;
}
/**
* If login with email only is enabled
*/
public Builder emailOnlyAuth(boolean emailOnlyAuth) {
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth);
return this;
}
/**
* If login with email only is enabled
*/
public Builder emailOnlyAuth(Optional<Boolean> emailOnlyAuth) {
Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth");
this.emailOnlyAuth = emailOnlyAuth;
return this;
}
/**
* If experimental features are enabled
*/
public Builder experimentalFeatures(boolean experimentalFeatures) {
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
this.experimentalFeatures = Optional.ofNullable(experimentalFeatures);
return this;
}
/**
* If experimental features are enabled
*/
public Builder experimentalFeatures(Optional<Boolean> experimentalFeatures) {
Utils.checkNotNull(experimentalFeatures, "experimentalFeatures");
this.experimentalFeatures = experimentalFeatures;
return this;
}
/**
* Your account full name
*/
public Builder friendlyName(String friendlyName) {
Utils.checkNotNull(friendlyName, "friendlyName");
this.friendlyName = friendlyName;
return this;
}
/**
* List of devices your allowed to use with this account
*/
public Builder entitlements(List<String> entitlements) {
Utils.checkNotNull(entitlements, "entitlements");
this.entitlements = entitlements;
return this;
}
/**
* If the account is a Plex Home guest user
*/
public Builder guest(boolean guest) {
Utils.checkNotNull(guest, "guest");
this.guest = Optional.ofNullable(guest);
return this;
}
/**
* If the account is a Plex Home guest user
*/
public Builder guest(Optional<Boolean> guest) {
Utils.checkNotNull(guest, "guest");
this.guest = guest;
return this;
}
/**
* If the account has a password
*/
public Builder hasPassword(boolean hasPassword) {
Utils.checkNotNull(hasPassword, "hasPassword");
this.hasPassword = Optional.ofNullable(hasPassword);
return this;
}
/**
* If the account has a password
*/
public Builder hasPassword(Optional<Boolean> hasPassword) {
Utils.checkNotNull(hasPassword, "hasPassword");
this.hasPassword = hasPassword;
return this;
}
/**
* If the account is a Plex Home user
*/
public Builder home(boolean home) {
Utils.checkNotNull(home, "home");
this.home = Optional.ofNullable(home);
return this;
}
/**
* If the account is a Plex Home user
*/
public Builder home(Optional<Boolean> home) {
Utils.checkNotNull(home, "home");
this.home = home;
return this;
}
/**
* If the account is the Plex Home admin
*/
public Builder homeAdmin(boolean homeAdmin) {
Utils.checkNotNull(homeAdmin, "homeAdmin");
this.homeAdmin = Optional.ofNullable(homeAdmin);
return this;
}
/**
* If the account is the Plex Home admin
*/
public Builder homeAdmin(Optional<Boolean> homeAdmin) {
Utils.checkNotNull(homeAdmin, "homeAdmin");
this.homeAdmin = homeAdmin;
return this;
}
/**
* The number of accounts in the Plex Home
*/
public Builder homeSize(int homeSize) {
Utils.checkNotNull(homeSize, "homeSize");
this.homeSize = homeSize;
return this;
}
/**
* The Plex account ID
*/
public Builder id(int id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* Unix epoch datetime in seconds
*/
public Builder joinedAt(long joinedAt) {
Utils.checkNotNull(joinedAt, "joinedAt");
this.joinedAt = joinedAt;
return this;
}
/**
* The account locale
*/
public Builder locale(String locale) {
Utils.checkNotNull(locale, "locale");
this.locale = Optional.ofNullable(locale);
return this;
}
/**
* The account locale
*/
public Builder locale(Optional<String> locale) {
Utils.checkNotNull(locale, "locale");
this.locale = locale;
return this;
}
/**
* If you are subscribed to the Plex newsletter
*/
public Builder mailingListActive(boolean mailingListActive) {
Utils.checkNotNull(mailingListActive, "mailingListActive");
this.mailingListActive = Optional.ofNullable(mailingListActive);
return this;
}
/**
* If you are subscribed to the Plex newsletter
*/
public Builder mailingListActive(Optional<Boolean> mailingListActive) {
Utils.checkNotNull(mailingListActive, "mailingListActive");
this.mailingListActive = mailingListActive;
return this;
}
/**
* Your current mailing list status (active or unsubscribed)
*/
public Builder mailingListStatus(MailingListStatus mailingListStatus) {
Utils.checkNotNull(mailingListStatus, "mailingListStatus");
this.mailingListStatus = mailingListStatus;
return this;
}
/**
* The maximum number of accounts allowed in the Plex Home
*/
public Builder maxHomeSize(int maxHomeSize) {
Utils.checkNotNull(maxHomeSize, "maxHomeSize");
this.maxHomeSize = maxHomeSize;
return this;
}
/**
* [Might be removed] The hashed Plex Home PIN
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
public Builder pin(String pin) {
Utils.checkNotNull(pin, "pin");
this.pin = Optional.ofNullable(pin);
return this;
}
/**
* [Might be removed] The hashed Plex Home PIN
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
@Deprecated
public Builder pin(Optional<String> pin) {
Utils.checkNotNull(pin, "pin");
this.pin = pin;
return this;
}
public Builder profile(UserProfile profile) {
Utils.checkNotNull(profile, "profile");
this.profile = profile;
return this;
}
/**
* If the account has a Plex Home PIN enabled
*/
public Builder protected_(boolean protected_) {
Utils.checkNotNull(protected_, "protected_");
this.protected_ = Optional.ofNullable(protected_);
return this;
}
/**
* If the account has a Plex Home PIN enabled
*/
public Builder protected_(Optional<Boolean> protected_) {
Utils.checkNotNull(protected_, "protected_");
this.protected_ = protected_;
return this;
}
/**
* Unix epoch datetime in seconds
*/
public Builder rememberExpiresAt(long rememberExpiresAt) {
Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt");
this.rememberExpiresAt = rememberExpiresAt;
return this;
}
/**
* If the account is a Plex Home managed user
*/
public Builder restricted(boolean restricted) {
Utils.checkNotNull(restricted, "restricted");
this.restricted = Optional.ofNullable(restricted);
return this;
}
/**
* If the account is a Plex Home managed user
*/
public Builder restricted(Optional<Boolean> restricted) {
Utils.checkNotNull(restricted, "restricted");
this.restricted = restricted;
return this;
}
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
public Builder roles(List<String> roles) {
Utils.checkNotNull(roles, "roles");
this.roles = Optional.ofNullable(roles);
return this;
}
/**
* [Might be removed] List of account roles. Plexpass membership listed here
*/
public Builder roles(Optional<? extends List<String>> roles) {
Utils.checkNotNull(roles, "roles");
this.roles = roles;
return this;
}
/**
* Unknown
*/
public Builder scrobbleTypes(String scrobbleTypes) {
Utils.checkNotNull(scrobbleTypes, "scrobbleTypes");
this.scrobbleTypes = scrobbleTypes;
return this;
}
public Builder services(List<Services> services) {
Utils.checkNotNull(services, "services");
this.services = services;
return this;
}
/**
* If the accounts Plex Pass subscription is active
*/
public Builder subscription(Subscription subscription) {
Utils.checkNotNull(subscription, "subscription");
this.subscription = subscription;
return this;
}
/**
* Description of the Plex Pass subscription
*/
public Builder subscriptionDescription(String subscriptionDescription) {
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
this.subscriptionDescription = Optional.ofNullable(subscriptionDescription);
return this;
}
/**
* Description of the Plex Pass subscription
*/
public Builder subscriptionDescription(Optional<String> subscriptionDescription) {
Utils.checkNotNull(subscriptionDescription, "subscriptionDescription");
this.subscriptionDescription = subscriptionDescription;
return this;
}
public Builder subscriptions(List<GetTokenDetailsSubscription> subscriptions) {
Utils.checkNotNull(subscriptions, "subscriptions");
this.subscriptions = subscriptions;
return this;
}
/**
* URL of the account thumbnail
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The title of the account (username or friendly name)
*/
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
/**
* If two-factor authentication is enabled
*/
public Builder twoFactorEnabled(boolean twoFactorEnabled) {
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled);
return this;
}
/**
* If two-factor authentication is enabled
*/
public Builder twoFactorEnabled(Optional<Boolean> twoFactorEnabled) {
Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled");
this.twoFactorEnabled = twoFactorEnabled;
return this;
}
/**
* The account username
*/
public Builder username(String username) {
Utils.checkNotNull(username, "username");
this.username = username;
return this;
}
/**
* The account UUID
*/
public Builder uuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
}
public Builder attributionPartner(String attributionPartner) {
Utils.checkNotNull(attributionPartner, "attributionPartner");
this.attributionPartner = Optional.ofNullable(attributionPartner);
return this;
}
public Builder attributionPartner(Optional<String> attributionPartner) {
Utils.checkNotNull(attributionPartner, "attributionPartner");
this.attributionPartner = attributionPartner;
return this;
}
public GetTokenDetailsUserPlexAccount build() {
if (anonymous == null) {
anonymous = _SINGLETON_VALUE_Anonymous.value();
}
if (backupCodesCreated == null) {
backupCodesCreated = _SINGLETON_VALUE_BackupCodesCreated.value();
}
if (confirmed == null) {
confirmed = _SINGLETON_VALUE_Confirmed.value();
}
if (emailOnlyAuth == null) {
emailOnlyAuth = _SINGLETON_VALUE_EmailOnlyAuth.value();
}
if (experimentalFeatures == null) {
experimentalFeatures = _SINGLETON_VALUE_ExperimentalFeatures.value();
}
if (guest == null) {
guest = _SINGLETON_VALUE_Guest.value();
}
if (hasPassword == null) {
hasPassword = _SINGLETON_VALUE_HasPassword.value();
}
if (home == null) {
home = _SINGLETON_VALUE_Home.value();
}
if (homeAdmin == null) {
homeAdmin = _SINGLETON_VALUE_HomeAdmin.value();
}
if (mailingListActive == null) {
mailingListActive = _SINGLETON_VALUE_MailingListActive.value();
}
if (protected_ == null) {
protected_ = _SINGLETON_VALUE_Protected.value();
}
if (restricted == null) {
restricted = _SINGLETON_VALUE_Restricted.value();
}
if (twoFactorEnabled == null) {
twoFactorEnabled = _SINGLETON_VALUE_TwoFactorEnabled.value();
} return new GetTokenDetailsUserPlexAccount(
adsConsent,
adsConsentReminderAt,
adsConsentSetAt,
anonymous,
authToken,
backupCodesCreated,
confirmed,
country,
email,
emailOnlyAuth,
experimentalFeatures,
friendlyName,
entitlements,
guest,
hasPassword,
home,
homeAdmin,
homeSize,
id,
joinedAt,
locale,
mailingListActive,
mailingListStatus,
maxHomeSize,
pin,
profile,
protected_,
rememberExpiresAt,
restricted,
roles,
scrobbleTypes,
services,
subscription,
subscriptionDescription,
subscriptions,
thumb,
title,
twoFactorEnabled,
username,
uuid,
attributionPartner);
}
private static final LazySingletonValue<JsonNullable<Boolean>> _SINGLETON_VALUE_Anonymous =
new LazySingletonValue<>(
"anonymous",
"false",
new TypeReference<JsonNullable<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_BackupCodesCreated =
new LazySingletonValue<>(
"backupCodesCreated",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_Confirmed =
new LazySingletonValue<>(
"confirmed",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_EmailOnlyAuth =
new LazySingletonValue<>(
"emailOnlyAuth",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_ExperimentalFeatures =
new LazySingletonValue<>(
"experimentalFeatures",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_Guest =
new LazySingletonValue<>(
"guest",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_HasPassword =
new LazySingletonValue<>(
"hasPassword",
"true",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_Home =
new LazySingletonValue<>(
"home",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_HomeAdmin =
new LazySingletonValue<>(
"homeAdmin",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_MailingListActive =
new LazySingletonValue<>(
"mailingListActive",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_Protected =
new LazySingletonValue<>(
"protected",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_Restricted =
new LazySingletonValue<>(
"restricted",
"false",
new TypeReference<Optional<Boolean>>() {});
private static final LazySingletonValue<Optional<Boolean>> _SINGLETON_VALUE_TwoFactorEnabled =
new LazySingletonValue<>(
"twoFactorEnabled",
"false",
new TypeReference<Optional<Boolean>>() {});
}
}