public class BasicAccount extends Account
Modifier and Type | Class and Description |
---|---|
static class |
BasicAccount.Builder
Builder for
BasicAccount . |
Modifier and Type | Field and Description |
---|---|
protected boolean |
isTeammate |
protected String |
teamMemberId |
accountId, disabled, email, emailVerified, name, profilePhotoUrl
Constructor and Description |
---|
BasicAccount(String accountId,
Name name,
String email,
boolean emailVerified,
boolean disabled,
boolean isTeammate)
Basic information about any account.
|
BasicAccount(String accountId,
Name name,
String email,
boolean emailVerified,
boolean disabled,
boolean isTeammate,
String profilePhotoUrl,
String teamMemberId)
Basic information about any account.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAccountId()
The user's unique Dropbox ID.
|
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 |
getIsTeammate()
Whether this user is a teammate of the current user.
|
Name |
getName()
Details of a user's name.
|
String |
getProfilePhotoUrl()
URL for the photo representing the user, if one is set.
|
String |
getTeamMemberId()
The user's unique team member id.
|
int |
hashCode() |
static BasicAccount.Builder |
newBuilder(String accountId,
Name name,
String email,
boolean emailVerified,
boolean disabled,
boolean isTeammate)
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 boolean isTeammate
protected final String teamMemberId
public BasicAccount(String accountId, Name name, String email, boolean emailVerified, boolean disabled, boolean isTeammate, String profilePhotoUrl, 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.isTeammate
- Whether this user is a teammate of the current user.
If this account is the current user's account, then this will be
true
.profilePhotoUrl
- URL for the photo representing the user, if one
is set.teamMemberId
- The user's unique team member id. This field will
only be present if the user is part of a team and getIsTeammate()
is true
.IllegalArgumentException
- If any argument does not meet its
preconditions.public BasicAccount(String accountId, Name name, String email, boolean emailVerified, boolean disabled, boolean isTeammate)
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.isTeammate
- Whether this user is a teammate of the current user.
If this account is the current user's account, then this will be
true
.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 boolean getIsTeammate()
true
.public String getProfilePhotoUrl()
getProfilePhotoUrl
in class Account
null
if not present.public String getTeamMemberId()
getIsTeammate()
is true
.null
if not present.public static BasicAccount.Builder newBuilder(String accountId, Name name, String email, boolean emailVerified, boolean disabled, boolean isTeammate)
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.isTeammate
- Whether this user is a teammate of the current user.
If this account is the current user's account, then this will be
true
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class Account