public class FullAccount extends Account
Modifier and Type | Class and Description |
---|---|
static class |
FullAccount.Builder
Builder for
FullAccount . |
Modifier and Type | Field and Description |
---|---|
protected AccountType |
accountType |
protected String |
country |
protected boolean |
isPaired |
protected String |
locale |
protected String |
referralLink |
protected FullTeam |
team |
protected String |
teamMemberId |
accountId, disabled, email, emailVerified, name, profilePhotoUrl
Constructor and Description |
---|
FullAccount(String accountId,
Name name,
String email,
boolean emailVerified,
boolean disabled,
String locale,
String referralLink,
boolean isPaired,
AccountType accountType)
Detailed information about the current user's account.
|
FullAccount(String accountId,
Name name,
String email,
boolean emailVerified,
boolean disabled,
String locale,
String referralLink,
boolean isPaired,
AccountType accountType,
String profilePhotoUrl,
String country,
FullTeam team,
String teamMemberId)
Detailed information about the current user's account.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAccountId()
The user's unique Dropbox ID.
|
AccountType |
getAccountType()
What type of account this user has.
|
String |
getCountry()
The user's two-letter country code, if available.
|
boolean |
getDisabled()
Whether the user has been disabled.
|
String |
getEmail()
The user's e-mail address.
|
boolean |
getEmailVerified()
Whether the user has verified their e-mail address.
|
boolean |
getIsPaired()
Whether the user has a personal and work account.
|
String |
getLocale()
The language that the user specified.
|
Name |
getName()
Details of a user's name.
|
String |
getProfilePhotoUrl()
URL for the photo representing the user, if one is set.
|
String |
getReferralLink()
The user's referral link.
|
FullTeam |
getTeam()
If this account is a member of a team, information about that team.
|
String |
getTeamMemberId()
This account's unique team member id.
|
int |
hashCode() |
static FullAccount.Builder |
newBuilder(String accountId,
Name name,
String email,
boolean emailVerified,
boolean disabled,
String locale,
String referralLink,
boolean isPaired,
AccountType accountType)
Returns a new builder for creating an instance of this class.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final String country
protected final String locale
protected final String referralLink
protected final FullTeam team
protected final String teamMemberId
protected final boolean isPaired
protected final AccountType accountType
public FullAccount(String accountId, Name name, String email, boolean emailVerified, boolean disabled, String locale, String referralLink, boolean isPaired, AccountType accountType, String profilePhotoUrl, String country, FullTeam team, String teamMemberId)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
accountId
- The user's unique Dropbox ID. Must have length of at
least 40, have length of at most 40, and not be null
.name
- Details of a user's name. Must not be null
.email
- The user's e-mail address. Do not rely on this without
checking the Account.getEmailVerified()
field. Even then, it's
possible that the user has since lost access to their e-mail. Must
not be null
.emailVerified
- Whether the user has verified their e-mail address.disabled
- Whether the user has been disabled.locale
- The language that the user specified. Locale tags will be
IETF
language tags. Must have length of at least 2 and not be null
.referralLink
- The user's referral link. Must not
be null
.isPaired
- Whether the user has a personal and work account. If the
current account is personal, then getTeam()
will
always be null
, but getIsPaired()
will
indicate if a work account is linked.accountType
- What type of account this user has. Must not be
null
.profilePhotoUrl
- URL for the photo representing the user, if one
is set.country
- The user's two-letter country code, if available. Country
codes are based on ISO 3166-1. Must
have length of at least 2 and have length of at most 2.team
- If this account is a member of a team, information about
that team.teamMemberId
- This account's unique team member id. This field
will only be present if getTeam()
is present.IllegalArgumentException
- If any argument does not meet its
preconditions.public FullAccount(String accountId, Name name, String email, boolean emailVerified, boolean disabled, String locale, String referralLink, boolean isPaired, AccountType accountType)
The default values for unset fields will be used.
accountId
- The user's unique Dropbox ID. Must have length of at
least 40, have length of at most 40, and not be null
.name
- Details of a user's name. Must not be null
.email
- The user's e-mail address. Do not rely on this without
checking the Account.getEmailVerified()
field. Even then, it's
possible that the user has since lost access to their e-mail. Must
not be null
.emailVerified
- Whether the user has verified their e-mail address.disabled
- Whether the user has been disabled.locale
- The language that the user specified. Locale tags will be
IETF
language tags. Must have length of at least 2 and not be null
.referralLink
- The user's referral link. Must not
be null
.isPaired
- Whether the user has a personal and work account. If the
current account is personal, then getTeam()
will
always be null
, but getIsPaired()
will
indicate if a work account is linked.accountType
- What type of account this user has. Must not be
null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getAccountId()
getAccountId
in class Account
null
.public Name getName()
public String getEmail()
Account.getEmailVerified()
field. Even then, it's possible that the
user has since lost access to their e-mail.public boolean getEmailVerified()
getEmailVerified
in class Account
public boolean getDisabled()
getDisabled
in class Account
public String getLocale()
null
.public String getReferralLink()
null
.public boolean getIsPaired()
getTeam()
will always be null
, but getIsPaired()
will indicate if a work
account is linked.public AccountType getAccountType()
null
.public String getProfilePhotoUrl()
getProfilePhotoUrl
in class Account
null
if not present.public String getCountry()
null
if not present.public FullTeam getTeam()
null
if not present.public String getTeamMemberId()
getTeam()
is present.null
if not present.public static FullAccount.Builder newBuilder(String accountId, Name name, String email, boolean emailVerified, boolean disabled, String locale, String referralLink, boolean isPaired, AccountType accountType)
accountId
- The user's unique Dropbox ID. Must have length of at
least 40, have length of at most 40, and not be null
.name
- Details of a user's name. Must not be null
.email
- The user's e-mail address. Do not rely on this without
checking the Account.getEmailVerified()
field. Even then, it's
possible that the user has since lost access to their e-mail. Must
not be null
.emailVerified
- Whether the user has verified their e-mail address.disabled
- Whether the user has been disabled.locale
- The language that the user specified. Locale tags will be
IETF
language tags. Must have length of at least 2 and not be null
.referralLink
- The user's referral link. Must not
be null
.isPaired
- Whether the user has a personal and work account. If the
current account is personal, then getTeam()
will
always be null
, but getIsPaired()
will
indicate if a work account is linked.accountType
- What type of account this user has. Must not be
null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class Account