Package com.dropbox.core.v2.users
Class BasicAccount
java.lang.Object
com.dropbox.core.v2.users.Account
com.dropbox.core.v2.users.BasicAccount
Basic information about any account.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forBasicAccount.static classFor internal use only. -
Field Summary
FieldsFields inherited from class com.dropbox.core.v2.users.Account
accountId, disabled, email, emailVerified, name, profilePhotoUrl -
Constructor Summary
ConstructorsConstructorDescriptionBasicAccount(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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe user's unique Dropbox ID.booleanWhether the user has been disabled.getEmail()The user's email address.booleanWhether the user has verified their email address.booleanWhether this user is a teammate of the current user.getName()Details of a user's name.URL for the photo representing the user, if one is set.The user's unique team member id.inthashCode()static BasicAccount.BuildernewBuilder(String accountId, Name name, String email, boolean emailVerified, boolean disabled, boolean isTeammate) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
isTeammate
protected final boolean isTeammate -
teamMemberId
-
-
Constructor Details
-
BasicAccount
public BasicAccount(@Nonnull String accountId, @Nonnull Name name, @Nonnull String email, boolean emailVerified, boolean disabled, boolean isTeammate, @Nullable String profilePhotoUrl, @Nullable String teamMemberId) Basic information about any account.Use
newBuilder(java.lang.String,com.dropbox.core.v2.users.Name,java.lang.String,boolean,boolean,boolean)to create instances of this class without specifying values for all optional fields.- Parameters:
accountId- The user's unique Dropbox ID. Must have length of at least 40, have length of at most 40, and not benull.name- Details of a user's name. Must not benull.email- The user's email address. Do not rely on this without checking theAccount.getEmailVerified()field. Even then, it's possible that the user has since lost access to their email. Must not benull.emailVerified- Whether the user has verified their email 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 betrue.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 andgetIsTeammate()istrue.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
BasicAccount
public BasicAccount(@Nonnull String accountId, @Nonnull Name name, @Nonnull String email, boolean emailVerified, boolean disabled, boolean isTeammate) Basic information about any account.The default values for unset fields will be used.
- Parameters:
accountId- The user's unique Dropbox ID. Must have length of at least 40, have length of at most 40, and not benull.name- Details of a user's name. Must not benull.email- The user's email address. Do not rely on this without checking theAccount.getEmailVerified()field. Even then, it's possible that the user has since lost access to their email. Must not benull.emailVerified- Whether the user has verified their email 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 betrue.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Details
-
getAccountId
The user's unique Dropbox ID.- Overrides:
getAccountIdin classAccount- Returns:
- value for this field, never
null.
-
getName
Details of a user's name. -
getEmail
The user's email address. Do not rely on this without checking theAccount.getEmailVerified()field. Even then, it's possible that the user has since lost access to their email. -
getEmailVerified
public boolean getEmailVerified()Whether the user has verified their email address.- Overrides:
getEmailVerifiedin classAccount- Returns:
- value for this field.
-
getDisabled
public boolean getDisabled()Whether the user has been disabled.- Overrides:
getDisabledin classAccount- Returns:
- value for this field.
-
getIsTeammate
public boolean getIsTeammate()Whether this user is a teammate of the current user. If this account is the current user's account, then this will betrue.- Returns:
- value for this field.
-
getProfilePhotoUrl
URL for the photo representing the user, if one is set.- Overrides:
getProfilePhotoUrlin classAccount- Returns:
- value for this field, or
nullif not present.
-
getTeamMemberId
The user's unique team member id. This field will only be present if the user is part of a team andgetIsTeammate()istrue.- Returns:
- value for this field, or
nullif not present.
-
newBuilder
public 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.- Parameters:
accountId- The user's unique Dropbox ID. Must have length of at least 40, have length of at most 40, and not benull.name- Details of a user's name. Must not benull.email- The user's email address. Do not rely on this without checking theAccount.getEmailVerified()field. Even then, it's possible that the user has since lost access to their email. Must not benull.emailVerified- Whether the user has verified their email 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 betrue.- Returns:
- builder for this class.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode() -
equals
-
toString
-
toStringMultiline
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Overrides:
toStringMultilinein classAccount- Returns:
- Formatted, multiline String representation of this object
-