Class MemberAddResult
- java.lang.Object
- 
- com.dropbox.core.v2.team.MemberAddResult
 
- 
 public final class MemberAddResult extends java.lang.ObjectDescribes the result of attempting to add a single user to the team. 'success' is the only value indicating that a user was indeed added to the team - the other values explain the type of failure that occurred, and include the email of the user for which the operation has failed.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 classMemberAddResult.TagDiscriminating tag type forMemberAddResult.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemberAddResultduplicateExternalMemberId(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID.static MemberAddResultduplicateMemberPersistentId(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID.booleanequals(java.lang.Object obj)static MemberAddResultfreeTeamMemberLimitReached(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED.java.lang.StringgetDuplicateExternalMemberIdValue()A user with the given external member ID already exists on the team (including in recoverable state).java.lang.StringgetDuplicateMemberPersistentIdValue()A user with the given persistent ID already exists on the team (including in recoverable state).java.lang.StringgetFreeTeamMemberLimitReachedValue()Team is already full.java.lang.StringgetPersistentIdDisabledValue()Persistent ID is only available to teams with persistent ID SAML configuration.TeamMemberInfogetSuccessValue()Describes a user that was successfully added to the team.java.lang.StringgetTeamLicenseLimitValue()Team is already full.java.lang.StringgetUserAlreadyOnTeamValue()User is already on this team.java.lang.StringgetUserAlreadyPairedValue()User is already paired.java.lang.StringgetUserCreationFailedValue()User creation has failed.java.lang.StringgetUserMigrationFailedValue()User migration has failed.java.lang.StringgetUserOnAnotherTeamValue()User is already on another team.inthashCode()booleanisDuplicateExternalMemberId()Returnstrueif this instance has the tagMemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID,falseotherwise.booleanisDuplicateMemberPersistentId()Returnstrueif this instance has the tagMemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID,falseotherwise.booleanisFreeTeamMemberLimitReached()Returnstrueif this instance has the tagMemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED,falseotherwise.booleanisPersistentIdDisabled()Returnstrueif this instance has the tagMemberAddResult.Tag.PERSISTENT_ID_DISABLED,falseotherwise.booleanisSuccess()booleanisTeamLicenseLimit()booleanisUserAlreadyOnTeam()Returnstrueif this instance has the tagMemberAddResult.Tag.USER_ALREADY_ON_TEAM,falseotherwise.booleanisUserAlreadyPaired()booleanisUserCreationFailed()Returnstrueif this instance has the tagMemberAddResult.Tag.USER_CREATION_FAILED,falseotherwise.booleanisUserMigrationFailed()Returnstrueif this instance has the tagMemberAddResult.Tag.USER_MIGRATION_FAILED,falseotherwise.booleanisUserOnAnotherTeam()Returnstrueif this instance has the tagMemberAddResult.Tag.USER_ON_ANOTHER_TEAM,falseotherwise.static MemberAddResultpersistentIdDisabled(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.PERSISTENT_ID_DISABLED.static MemberAddResultsuccess(TeamMemberInfo value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.SUCCESS.MemberAddResult.Tagtag()Returns the tag for this instance.static MemberAddResultteamLicenseLimit(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.TEAM_LICENSE_LIMIT.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.static MemberAddResultuserAlreadyOnTeam(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_ALREADY_ON_TEAM.static MemberAddResultuserAlreadyPaired(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_ALREADY_PAIRED.static MemberAddResultuserCreationFailed(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_CREATION_FAILED.static MemberAddResultuserMigrationFailed(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_MIGRATION_FAILED.static MemberAddResultuserOnAnotherTeam(java.lang.String value)Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_ON_ANOTHER_TEAM.
 
- 
- 
- 
Method Detail- 
tagpublic MemberAddResult.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 thisMemberAddResult.- Returns:
- the tag for this instance.
 
 - 
isTeamLicenseLimitpublic boolean isTeamLicenseLimit() - Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.TEAM_LICENSE_LIMIT,- falseotherwise.
 
 - 
teamLicenseLimitpublic static MemberAddResult teamLicenseLimit(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.TEAM_LICENSE_LIMIT.Team is already full. The organization has no available licenses. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.TEAM_LICENSE_LIMIT.
- 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.
 
 - 
getTeamLicenseLimitValuepublic java.lang.String getTeamLicenseLimitValue() Team is already full. The organization has no available licenses.This instance must be tagged as MemberAddResult.Tag.TEAM_LICENSE_LIMIT.- Returns:
- The Stringvalue associated with this instance ifisTeamLicenseLimit()istrue.
- Throws:
- java.lang.IllegalStateException- If- isTeamLicenseLimit()is- false.
 
 - 
isFreeTeamMemberLimitReachedpublic boolean isFreeTeamMemberLimitReached() Returnstrueif this instance has the tagMemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED,- falseotherwise.
 
 - 
freeTeamMemberLimitReachedpublic static MemberAddResult freeTeamMemberLimitReached(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED.Team is already full. The free team member limit has been reached. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED.
- 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.
 
 - 
getFreeTeamMemberLimitReachedValuepublic java.lang.String getFreeTeamMemberLimitReachedValue() Team is already full. The free team member limit has been reached.This instance must be tagged as MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED.- Returns:
- The Stringvalue associated with this instance ifisFreeTeamMemberLimitReached()istrue.
- Throws:
- java.lang.IllegalStateException- If- isFreeTeamMemberLimitReached()is- false.
 
 - 
isUserAlreadyOnTeampublic boolean isUserAlreadyOnTeam() Returnstrueif this instance has the tagMemberAddResult.Tag.USER_ALREADY_ON_TEAM,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.USER_ALREADY_ON_TEAM,- falseotherwise.
 
 - 
userAlreadyOnTeampublic static MemberAddResult userAlreadyOnTeam(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_ALREADY_ON_TEAM.User is already on this team. The provided email address is associated with a user who is already a member of (including in recoverable state) or invited to the team. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.USER_ALREADY_ON_TEAM.
- 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.
 
 - 
getUserAlreadyOnTeamValuepublic java.lang.String getUserAlreadyOnTeamValue() User is already on this team. The provided email address is associated with a user who is already a member of (including in recoverable state) or invited to the team.This instance must be tagged as MemberAddResult.Tag.USER_ALREADY_ON_TEAM.- Returns:
- The Stringvalue associated with this instance ifisUserAlreadyOnTeam()istrue.
- Throws:
- java.lang.IllegalStateException- If- isUserAlreadyOnTeam()is- false.
 
 - 
isUserOnAnotherTeampublic boolean isUserOnAnotherTeam() Returnstrueif this instance has the tagMemberAddResult.Tag.USER_ON_ANOTHER_TEAM,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.USER_ON_ANOTHER_TEAM,- falseotherwise.
 
 - 
userOnAnotherTeampublic static MemberAddResult userOnAnotherTeam(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_ON_ANOTHER_TEAM.User is already on another team. The provided email address is associated with a user that is already a member or invited to another team. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.USER_ON_ANOTHER_TEAM.
- 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.
 
 - 
getUserOnAnotherTeamValuepublic java.lang.String getUserOnAnotherTeamValue() User is already on another team. The provided email address is associated with a user that is already a member or invited to another team.This instance must be tagged as MemberAddResult.Tag.USER_ON_ANOTHER_TEAM.- Returns:
- The Stringvalue associated with this instance ifisUserOnAnotherTeam()istrue.
- Throws:
- java.lang.IllegalStateException- If- isUserOnAnotherTeam()is- false.
 
 - 
isUserAlreadyPairedpublic boolean isUserAlreadyPaired() - Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.USER_ALREADY_PAIRED,- falseotherwise.
 
 - 
userAlreadyPairedpublic static MemberAddResult userAlreadyPaired(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_ALREADY_PAIRED.User is already paired. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.USER_ALREADY_PAIRED.
- 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.
 
 - 
getUserAlreadyPairedValuepublic java.lang.String getUserAlreadyPairedValue() User is already paired.This instance must be tagged as MemberAddResult.Tag.USER_ALREADY_PAIRED.- Returns:
- The Stringvalue associated with this instance ifisUserAlreadyPaired()istrue.
- Throws:
- java.lang.IllegalStateException- If- isUserAlreadyPaired()is- false.
 
 - 
isUserMigrationFailedpublic boolean isUserMigrationFailed() Returnstrueif this instance has the tagMemberAddResult.Tag.USER_MIGRATION_FAILED,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.USER_MIGRATION_FAILED,- falseotherwise.
 
 - 
userMigrationFailedpublic static MemberAddResult userMigrationFailed(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_MIGRATION_FAILED.User migration has failed. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.USER_MIGRATION_FAILED.
- 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.
 
 - 
getUserMigrationFailedValuepublic java.lang.String getUserMigrationFailedValue() User migration has failed.This instance must be tagged as MemberAddResult.Tag.USER_MIGRATION_FAILED.- Returns:
- The Stringvalue associated with this instance ifisUserMigrationFailed()istrue.
- Throws:
- java.lang.IllegalStateException- If- isUserMigrationFailed()is- false.
 
 - 
isDuplicateExternalMemberIdpublic boolean isDuplicateExternalMemberId() Returnstrueif this instance has the tagMemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID,- falseotherwise.
 
 - 
duplicateExternalMemberIdpublic static MemberAddResult duplicateExternalMemberId(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID.A user with the given external member ID already exists on the team (including in recoverable state). - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID.
- 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.
 
 - 
getDuplicateExternalMemberIdValuepublic java.lang.String getDuplicateExternalMemberIdValue() A user with the given external member ID already exists on the team (including in recoverable state).This instance must be tagged as MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID.- Returns:
- The Stringvalue associated with this instance ifisDuplicateExternalMemberId()istrue.
- Throws:
- java.lang.IllegalStateException- If- isDuplicateExternalMemberId()is- false.
 
 - 
isDuplicateMemberPersistentIdpublic boolean isDuplicateMemberPersistentId() Returnstrueif this instance has the tagMemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID,- falseotherwise.
 
 - 
duplicateMemberPersistentIdpublic static MemberAddResult duplicateMemberPersistentId(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID.A user with the given persistent ID already exists on the team (including in recoverable state). - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID.
- 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.
 
 - 
getDuplicateMemberPersistentIdValuepublic java.lang.String getDuplicateMemberPersistentIdValue() A user with the given persistent ID already exists on the team (including in recoverable state).This instance must be tagged as MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID.- Returns:
- The Stringvalue associated with this instance ifisDuplicateMemberPersistentId()istrue.
- Throws:
- java.lang.IllegalStateException- If- isDuplicateMemberPersistentId()is- false.
 
 - 
isPersistentIdDisabledpublic boolean isPersistentIdDisabled() Returnstrueif this instance has the tagMemberAddResult.Tag.PERSISTENT_ID_DISABLED,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.PERSISTENT_ID_DISABLED,- falseotherwise.
 
 - 
persistentIdDisabledpublic static MemberAddResult persistentIdDisabled(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.PERSISTENT_ID_DISABLED.Persistent ID is only available to teams with persistent ID SAML configuration. Please contact Dropbox for more information. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.PERSISTENT_ID_DISABLED.
- 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.
 
 - 
getPersistentIdDisabledValuepublic java.lang.String getPersistentIdDisabledValue() Persistent ID is only available to teams with persistent ID SAML configuration. Please contact Dropbox for more information.This instance must be tagged as MemberAddResult.Tag.PERSISTENT_ID_DISABLED.- Returns:
- The Stringvalue associated with this instance ifisPersistentIdDisabled()istrue.
- Throws:
- java.lang.IllegalStateException- If- isPersistentIdDisabled()is- false.
 
 - 
isUserCreationFailedpublic boolean isUserCreationFailed() Returnstrueif this instance has the tagMemberAddResult.Tag.USER_CREATION_FAILED,falseotherwise.- Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.USER_CREATION_FAILED,- falseotherwise.
 
 - 
userCreationFailedpublic static MemberAddResult userCreationFailed(java.lang.String value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.USER_CREATION_FAILED.User creation has failed. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.USER_CREATION_FAILED.
- 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.
 
 - 
getUserCreationFailedValuepublic java.lang.String getUserCreationFailedValue() User creation has failed.This instance must be tagged as MemberAddResult.Tag.USER_CREATION_FAILED.- Returns:
- The Stringvalue associated with this instance ifisUserCreationFailed()istrue.
- Throws:
- java.lang.IllegalStateException- If- isUserCreationFailed()is- false.
 
 - 
isSuccesspublic boolean isSuccess() - Returns:
- trueif this instance is tagged as- MemberAddResult.Tag.SUCCESS,- falseotherwise.
 
 - 
successpublic static MemberAddResult success(TeamMemberInfo value) Returns an instance ofMemberAddResultthat has its tag set toMemberAddResult.Tag.SUCCESS.Describes a user that was successfully added to the team. - Parameters:
- value- value to assign to this instance.
- Returns:
- Instance of MemberAddResultwith its tag set toMemberAddResult.Tag.SUCCESS.
- Throws:
- java.lang.IllegalArgumentException- if- valueis- null.
 
 - 
getSuccessValuepublic TeamMemberInfo getSuccessValue() Describes a user that was successfully added to the team.This instance must be tagged as MemberAddResult.Tag.SUCCESS.- Returns:
- The TeamMemberInfovalue associated with this instance ifisSuccess()istrue.
- Throws:
- java.lang.IllegalStateException- If- isSuccess()is- false.
 
 - 
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
 
 
- 
 
-