Class UserInfo

java.lang.Object
com.dropbox.core.v2.sharing.UserInfo

public class UserInfo extends Object
Basic information about a user. Use DbxUserUsersRequests.getAccount(String) and DbxUserUsersRequests.getAccountBatch(java.util.List) to obtain more detailed information.
  • Field Details

    • accountId

      @Nonnull protected final String accountId
    • email

      @Nonnull protected final String email
    • displayName

      @Nonnull protected final String displayName
    • sameTeam

      protected final boolean sameTeam
    • teamMemberId

      @Nullable protected final String teamMemberId
  • Constructor Details

    • UserInfo

      public UserInfo(@Nonnull String accountId, @Nonnull String email, @Nonnull String displayName, boolean sameTeam, @Nullable String teamMemberId)
      Basic information about a user. Use DbxUserUsersRequests.getAccount(String) and DbxUserUsersRequests.getAccountBatch(java.util.List) to obtain more detailed information.
      Parameters:
      accountId - The account ID of the user. Must have length of at least 40, have length of at most 40, and not be null.
      email - Email address of user. Must not be null.
      displayName - The display name of the user. Must not be null.
      sameTeam - If the user is in the same team as current user.
      teamMemberId - The team member ID of the shared folder member. Only present if getSameTeam() is true.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • UserInfo

      public UserInfo(@Nonnull String accountId, @Nonnull String email, @Nonnull String displayName, boolean sameTeam)
      Basic information about a user. Use DbxUserUsersRequests.getAccount(String) and DbxUserUsersRequests.getAccountBatch(java.util.List) to obtain more detailed information.

      The default values for unset fields will be used.

      Parameters:
      accountId - The account ID of the user. Must have length of at least 40, have length of at most 40, and not be null.
      email - Email address of user. Must not be null.
      displayName - The display name of the user. Must not be null.
      sameTeam - If the user is in the same team as current user.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getAccountId

      @Nonnull public String getAccountId()
      The account ID of the user.
      Returns:
      value for this field, never null.
    • getEmail

      @Nonnull public String getEmail()
      Email address of user.
      Returns:
      value for this field, never null.
    • getDisplayName

      @Nonnull public String getDisplayName()
      The display name of the user.
      Returns:
      value for this field, never null.
    • getSameTeam

      public boolean getSameTeam()
      If the user is in the same team as current user.
      Returns:
      value for this field.
    • getTeamMemberId

      @Nullable public String getTeamMemberId()
      The team member ID of the shared folder member. Only present if getSameTeam() is true.
      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