public final class MemberAddResult
extends java.lang.Object
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 return true
. You can use tag()
to determine the
tag associated with this instance.
Modifier and Type | Class and Description |
---|---|
static class |
MemberAddResult.Tag
Discriminating tag type for
MemberAddResult . |
Modifier and Type | Method and Description |
---|---|
static MemberAddResult |
duplicateExternalMemberId(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID . |
static MemberAddResult |
duplicateMemberPersistentId(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID . |
boolean |
equals(java.lang.Object obj) |
static MemberAddResult |
freeTeamMemberLimitReached(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED . |
java.lang.String |
getDuplicateExternalMemberIdValue()
A user with the given external member ID already exists on the team
(including in recoverable state).
|
java.lang.String |
getDuplicateMemberPersistentIdValue()
A user with the given persistent ID already exists on the team (including
in recoverable state).
|
java.lang.String |
getFreeTeamMemberLimitReachedValue()
Team is already full.
|
java.lang.String |
getPersistentIdDisabledValue()
Persistent ID is only available to teams with persistent ID SAML
configuration.
|
TeamMemberInfo |
getSuccessValue()
Describes a user that was successfully added to the team.
|
java.lang.String |
getTeamLicenseLimitValue()
Team is already full.
|
java.lang.String |
getUserAlreadyOnTeamValue()
User is already on this team.
|
java.lang.String |
getUserAlreadyPairedValue()
User is already paired.
|
java.lang.String |
getUserCreationFailedValue()
User creation has failed.
|
java.lang.String |
getUserMigrationFailedValue()
User migration has failed.
|
java.lang.String |
getUserOnAnotherTeamValue()
User is already on another team.
|
int |
hashCode() |
boolean |
isDuplicateExternalMemberId()
Returns
true if this instance has the tag MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID , false otherwise. |
boolean |
isDuplicateMemberPersistentId()
Returns
true if this instance has the tag MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID , false otherwise. |
boolean |
isFreeTeamMemberLimitReached()
Returns
true if this instance has the tag MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED , false otherwise. |
boolean |
isPersistentIdDisabled()
Returns
true if this instance has the tag MemberAddResult.Tag.PERSISTENT_ID_DISABLED , false otherwise. |
boolean |
isSuccess()
|
boolean |
isTeamLicenseLimit()
|
boolean |
isUserAlreadyOnTeam()
Returns
true if this instance has the tag MemberAddResult.Tag.USER_ALREADY_ON_TEAM , false otherwise. |
boolean |
isUserAlreadyPaired()
|
boolean |
isUserCreationFailed()
Returns
true if this instance has the tag MemberAddResult.Tag.USER_CREATION_FAILED , false otherwise. |
boolean |
isUserMigrationFailed()
Returns
true if this instance has the tag MemberAddResult.Tag.USER_MIGRATION_FAILED , false otherwise. |
boolean |
isUserOnAnotherTeam()
Returns
true if this instance has the tag MemberAddResult.Tag.USER_ON_ANOTHER_TEAM , false otherwise. |
static MemberAddResult |
persistentIdDisabled(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.PERSISTENT_ID_DISABLED . |
static MemberAddResult |
success(TeamMemberInfo value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.SUCCESS . |
MemberAddResult.Tag |
tag()
Returns the tag for this instance.
|
static MemberAddResult |
teamLicenseLimit(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.TEAM_LICENSE_LIMIT . |
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
static MemberAddResult |
userAlreadyOnTeam(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.USER_ALREADY_ON_TEAM . |
static MemberAddResult |
userAlreadyPaired(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.USER_ALREADY_PAIRED . |
static MemberAddResult |
userCreationFailed(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.USER_CREATION_FAILED . |
static MemberAddResult |
userMigrationFailed(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.USER_MIGRATION_FAILED . |
static MemberAddResult |
userOnAnotherTeam(java.lang.String value)
Returns an instance of
MemberAddResult that has its tag set to
MemberAddResult.Tag.USER_ON_ANOTHER_TEAM . |
public MemberAddResult.Tag tag()
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 return true
. Callers are recommended to use the tag
value in a switch
statement to properly handle the different
values for this MemberAddResult
.
public boolean isSuccess()
true
if this instance is tagged as MemberAddResult.Tag.SUCCESS
,
false
otherwise.public static MemberAddResult success(TeamMemberInfo value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.SUCCESS
.
Describes a user that was successfully added to the team.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.SUCCESS
.java.lang.IllegalArgumentException
- if value
is null
.public TeamMemberInfo getSuccessValue()
This instance must be tagged as MemberAddResult.Tag.SUCCESS
.
TeamMemberInfo
value associated with this instance if
isSuccess()
is true
.java.lang.IllegalStateException
- If isSuccess()
is false
.public boolean isTeamLicenseLimit()
true
if this instance is tagged as MemberAddResult.Tag.TEAM_LICENSE_LIMIT
, false
otherwise.public static MemberAddResult teamLicenseLimit(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.TEAM_LICENSE_LIMIT
.
Team is already full. The organization has no available licenses.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.TEAM_LICENSE_LIMIT
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getTeamLicenseLimitValue()
This instance must be tagged as MemberAddResult.Tag.TEAM_LICENSE_LIMIT
.
String
value associated with this instance if isTeamLicenseLimit()
is true
.java.lang.IllegalStateException
- If isTeamLicenseLimit()
is false
.public boolean isFreeTeamMemberLimitReached()
true
if this instance has the tag MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
, false
otherwise.public static MemberAddResult freeTeamMemberLimitReached(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
.
Team is already full. The free team member limit has been reached.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getFreeTeamMemberLimitReachedValue()
This instance must be tagged as MemberAddResult.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
.
String
value associated with this instance if isFreeTeamMemberLimitReached()
is true
.java.lang.IllegalStateException
- If isFreeTeamMemberLimitReached()
is false
.public boolean isUserAlreadyOnTeam()
true
if this instance has the tag MemberAddResult.Tag.USER_ALREADY_ON_TEAM
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.USER_ALREADY_ON_TEAM
, false
otherwise.public static MemberAddResult userAlreadyOnTeam(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.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.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.USER_ALREADY_ON_TEAM
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getUserAlreadyOnTeamValue()
This instance must be tagged as MemberAddResult.Tag.USER_ALREADY_ON_TEAM
.
String
value associated with this instance if isUserAlreadyOnTeam()
is true
.java.lang.IllegalStateException
- If isUserAlreadyOnTeam()
is false
.public boolean isUserOnAnotherTeam()
true
if this instance has the tag MemberAddResult.Tag.USER_ON_ANOTHER_TEAM
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.USER_ON_ANOTHER_TEAM
, false
otherwise.public static MemberAddResult userOnAnotherTeam(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.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.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.USER_ON_ANOTHER_TEAM
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getUserOnAnotherTeamValue()
This instance must be tagged as MemberAddResult.Tag.USER_ON_ANOTHER_TEAM
.
String
value associated with this instance if isUserOnAnotherTeam()
is true
.java.lang.IllegalStateException
- If isUserOnAnotherTeam()
is false
.public boolean isUserAlreadyPaired()
true
if this instance is tagged as MemberAddResult.Tag.USER_ALREADY_PAIRED
, false
otherwise.public static MemberAddResult userAlreadyPaired(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.USER_ALREADY_PAIRED
.
User is already paired.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.USER_ALREADY_PAIRED
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getUserAlreadyPairedValue()
This instance must be tagged as MemberAddResult.Tag.USER_ALREADY_PAIRED
.
String
value associated with this instance if isUserAlreadyPaired()
is true
.java.lang.IllegalStateException
- If isUserAlreadyPaired()
is false
.public boolean isUserMigrationFailed()
true
if this instance has the tag MemberAddResult.Tag.USER_MIGRATION_FAILED
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.USER_MIGRATION_FAILED
, false
otherwise.public static MemberAddResult userMigrationFailed(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.USER_MIGRATION_FAILED
.
User migration has failed.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.USER_MIGRATION_FAILED
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getUserMigrationFailedValue()
This instance must be tagged as MemberAddResult.Tag.USER_MIGRATION_FAILED
.
String
value associated with this instance if isUserMigrationFailed()
is true
.java.lang.IllegalStateException
- If isUserMigrationFailed()
is
false
.public boolean isDuplicateExternalMemberId()
true
if this instance has the tag MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
, false
otherwise.public static MemberAddResult duplicateExternalMemberId(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
.
A user with the given external member ID already exists on the team (including in recoverable state).
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getDuplicateExternalMemberIdValue()
This instance must be tagged as MemberAddResult.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
.
String
value associated with this instance if isDuplicateExternalMemberId()
is true
.java.lang.IllegalStateException
- If isDuplicateExternalMemberId()
is
false
.public boolean isDuplicateMemberPersistentId()
true
if this instance has the tag MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
, false
otherwise.public static MemberAddResult duplicateMemberPersistentId(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
.
A user with the given persistent ID already exists on the team (including in recoverable state).
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getDuplicateMemberPersistentIdValue()
This instance must be tagged as MemberAddResult.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
.
String
value associated with this instance if isDuplicateMemberPersistentId()
is true
.java.lang.IllegalStateException
- If isDuplicateMemberPersistentId()
is false
.public boolean isPersistentIdDisabled()
true
if this instance has the tag MemberAddResult.Tag.PERSISTENT_ID_DISABLED
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.PERSISTENT_ID_DISABLED
, false
otherwise.public static MemberAddResult persistentIdDisabled(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.PERSISTENT_ID_DISABLED
.
Persistent ID is only available to teams with persistent ID SAML configuration. Please contact Dropbox for more information.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.PERSISTENT_ID_DISABLED
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getPersistentIdDisabledValue()
This instance must be tagged as MemberAddResult.Tag.PERSISTENT_ID_DISABLED
.
String
value associated with this instance if isPersistentIdDisabled()
is true
.java.lang.IllegalStateException
- If isPersistentIdDisabled()
is
false
.public boolean isUserCreationFailed()
true
if this instance has the tag MemberAddResult.Tag.USER_CREATION_FAILED
, false
otherwise.true
if this instance is tagged as MemberAddResult.Tag.USER_CREATION_FAILED
, false
otherwise.public static MemberAddResult userCreationFailed(java.lang.String value)
MemberAddResult
that has its tag set to
MemberAddResult.Tag.USER_CREATION_FAILED
.
User creation has failed.
value
- value to assign to this instance.MemberAddResult
with its tag set to MemberAddResult.Tag.USER_CREATION_FAILED
.java.lang.IllegalArgumentException
- if value
is 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
.public java.lang.String getUserCreationFailedValue()
This instance must be tagged as MemberAddResult.Tag.USER_CREATION_FAILED
.
String
value associated with this instance if isUserCreationFailed()
is true
.java.lang.IllegalStateException
- If isUserCreationFailed()
is false
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.