Package com.dropbox.core.v2.team
Class UserSelectorArg
- java.lang.Object
- 
- com.dropbox.core.v2.team.UserSelectorArg
 
- 
 public final class UserSelectorArg extends java.lang.ObjectArgument for selecting a single user, either by team_member_id, external_id or email.This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of the isAbc()methods will returntrue. You can usetag()to determine the tag associated with this instance.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classUserSelectorArg.TagDiscriminating tag type forUserSelectorArg.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserSelectorArgemail(java.lang.String value)Returns an instance ofUserSelectorArgthat has its tag set toUserSelectorArg.Tag.EMAIL.booleanequals(java.lang.Object obj)static UserSelectorArgexternalId(java.lang.String value)Returns an instance ofUserSelectorArgthat has its tag set toUserSelectorArg.Tag.EXTERNAL_ID.java.lang.StringgetEmailValue()This instance must be tagged asUserSelectorArg.Tag.EMAIL.java.lang.StringgetExternalIdValue()This instance must be tagged asUserSelectorArg.Tag.EXTERNAL_ID.java.lang.StringgetTeamMemberIdValue()This instance must be tagged asUserSelectorArg.Tag.TEAM_MEMBER_ID.inthashCode()booleanisEmail()booleanisExternalId()booleanisTeamMemberId()UserSelectorArg.Tagtag()Returns the tag for this instance.static UserSelectorArgteamMemberId(java.lang.String value)Returns an instance ofUserSelectorArgthat has its tag set toUserSelectorArg.Tag.TEAM_MEMBER_ID.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
 
- 
- 
- 
Method Detail- 
tagpublic UserSelectorArg.Tag tag() Returns the tag for this instance.This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of the isXyz()methods will returntrue. Callers are recommended to use the tag value in aswitchstatement to properly handle the different values for thisUserSelectorArg.- Returns:
- the tag for this instance.
 
 - 
isTeamMemberIdpublic boolean isTeamMemberId() - Returns:
- trueif this instance is tagged as- UserSelectorArg.Tag.TEAM_MEMBER_ID,- falseotherwise.
 
 - 
teamMemberIdpublic static UserSelectorArg teamMemberId(java.lang.String value) Returns an instance ofUserSelectorArgthat has its tag set toUserSelectorArg.Tag.TEAM_MEMBER_ID.None - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of UserSelectorArgwith its tag set toUserSelectorArg.Tag.TEAM_MEMBER_ID.
- Throws:
- java.lang.IllegalArgumentException- if- valueis- null.
 
 - 
getTeamMemberIdValuepublic java.lang.String getTeamMemberIdValue() This instance must be tagged asUserSelectorArg.Tag.TEAM_MEMBER_ID.- Returns:
- The Stringvalue associated with this instance ifisTeamMemberId()istrue.
- Throws:
- java.lang.IllegalStateException- If- isTeamMemberId()is- false.
 
 - 
isExternalIdpublic boolean isExternalId() - Returns:
- trueif this instance is tagged as- UserSelectorArg.Tag.EXTERNAL_ID,- falseotherwise.
 
 - 
externalIdpublic static UserSelectorArg externalId(java.lang.String value) Returns an instance ofUserSelectorArgthat has its tag set toUserSelectorArg.Tag.EXTERNAL_ID.None - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of UserSelectorArgwith its tag set toUserSelectorArg.Tag.EXTERNAL_ID.
- Throws:
- java.lang.IllegalArgumentException- if- valueis longer than 64 or is- null.
 
 - 
getExternalIdValuepublic java.lang.String getExternalIdValue() This instance must be tagged asUserSelectorArg.Tag.EXTERNAL_ID.- Returns:
- The Stringvalue associated with this instance ifisExternalId()istrue.
- Throws:
- java.lang.IllegalStateException- If- isExternalId()is- false.
 
 - 
isEmailpublic boolean isEmail() - Returns:
- trueif this instance is tagged as- UserSelectorArg.Tag.EMAIL,- falseotherwise.
 
 - 
emailpublic static UserSelectorArg email(java.lang.String value) - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of UserSelectorArgwith its tag set toUserSelectorArg.Tag.EMAIL.
- Throws:
- java.lang.IllegalArgumentException- if- valueis longer than 255, does not match pattern "- ^['#&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$", or is- null.
 
 - 
getEmailValuepublic java.lang.String getEmailValue() This instance must be tagged asUserSelectorArg.Tag.EMAIL.
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.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
 
 
- 
 
-