Class Account

java.lang.Object
com.dropbox.core.v2.users.Account
Direct Known Subclasses:
BasicAccount, FullAccount

public class Account extends Object
The amount of detail revealed about an account depends on the user being queried and the user making the query.
  • Field Details

    • accountId

      @Nonnull protected final String accountId
    • name

      @Nonnull protected final Name name
    • email

      @Nonnull protected final String email
    • emailVerified

      protected final boolean emailVerified
    • profilePhotoUrl

      @Nullable protected final String profilePhotoUrl
    • disabled

      protected final boolean disabled
  • Constructor Details

    • Account

      public Account(@Nonnull String accountId, @Nonnull Name name, @Nonnull String email, boolean emailVerified, boolean disabled, @Nullable String profilePhotoUrl)
      The amount of detail revealed about an account depends on the user being queried and the user making the query.
      Parameters:
      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 email address. Do not rely on this without checking the getEmailVerified() field. Even then, it's possible that the user has since lost access to their email. Must not be null.
      emailVerified - Whether the user has verified their email address.
      disabled - Whether the user has been disabled.
      profilePhotoUrl - URL for the photo representing the user, if one is set.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • Account

      public Account(@Nonnull String accountId, @Nonnull Name name, @Nonnull String email, boolean emailVerified, boolean disabled)
      The amount of detail revealed about an account depends on the user being queried and the user making the query.

      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 be null.
      name - Details of a user's name. Must not be null.
      email - The user's email address. Do not rely on this without checking the getEmailVerified() field. Even then, it's possible that the user has since lost access to their email. Must not be null.
      emailVerified - Whether the user has verified their email address.
      disabled - Whether the user has been disabled.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getAccountId

      @Nonnull public String getAccountId()
      The user's unique Dropbox ID.
      Returns:
      value for this field, never null.
    • getName

      @Nonnull public Name getName()
      Details of a user's name.
      Returns:
      value for this field, never null.
    • getEmail

      @Nonnull public String getEmail()
      The user's email address. Do not rely on this without checking the getEmailVerified() field. Even then, it's possible that the user has since lost access to their email.
      Returns:
      value for this field, never null.
    • getEmailVerified

      public boolean getEmailVerified()
      Whether the user has verified their email address.
      Returns:
      value for this field.
    • getDisabled

      public boolean getDisabled()
      Whether the user has been disabled.
      Returns:
      value for this field.
    • getProfilePhotoUrl

      @Nullable public String getProfilePhotoUrl()
      URL for the photo representing the user, if one is set.
      Returns:
      value for this field, or null if not present.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

      public String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.

      The returned String may contain newlines.

      Returns:
      Formatted, multiline String representation of this object