Class MemberAddV2Result
- java.lang.Object
-
- com.dropbox.core.v2.team.MemberAddV2Result
-
public final class MemberAddV2Result extends java.lang.Object
Describes 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 an open 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.Open unions may be extended in the future with additional tags. If a new tag is introduced that this SDK does not recognized, the
OTHER
value will be used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MemberAddV2Result.Tag
Discriminating tag type forMemberAddV2Result
.
-
Field Summary
Fields Modifier and Type Field Description static MemberAddV2Result
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemberAddV2Result
duplicateExternalMemberId(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
.static MemberAddV2Result
duplicateMemberPersistentId(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
.boolean
equals(java.lang.Object obj)
static MemberAddV2Result
freeTeamMemberLimitReached(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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.TeamMemberInfoV2
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()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
,false
otherwise.boolean
isDuplicateMemberPersistentId()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
,false
otherwise.boolean
isFreeTeamMemberLimitReached()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
,false
otherwise.boolean
isOther()
boolean
isPersistentIdDisabled()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.PERSISTENT_ID_DISABLED
,false
otherwise.boolean
isSuccess()
boolean
isTeamLicenseLimit()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.TEAM_LICENSE_LIMIT
,false
otherwise.boolean
isUserAlreadyOnTeam()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_ALREADY_ON_TEAM
,false
otherwise.boolean
isUserAlreadyPaired()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_ALREADY_PAIRED
,false
otherwise.boolean
isUserCreationFailed()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_CREATION_FAILED
,false
otherwise.boolean
isUserMigrationFailed()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_MIGRATION_FAILED
,false
otherwise.boolean
isUserOnAnotherTeam()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_ON_ANOTHER_TEAM
,false
otherwise.static MemberAddV2Result
persistentIdDisabled(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.PERSISTENT_ID_DISABLED
.static MemberAddV2Result
success(TeamMemberInfoV2 value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.SUCCESS
.MemberAddV2Result.Tag
tag()
Returns the tag for this instance.static MemberAddV2Result
teamLicenseLimit(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.TEAM_LICENSE_LIMIT
.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.static MemberAddV2Result
userAlreadyOnTeam(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_ALREADY_ON_TEAM
.static MemberAddV2Result
userAlreadyPaired(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_ALREADY_PAIRED
.static MemberAddV2Result
userCreationFailed(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_CREATION_FAILED
.static MemberAddV2Result
userMigrationFailed(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_MIGRATION_FAILED
.static MemberAddV2Result
userOnAnotherTeam(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_ON_ANOTHER_TEAM
.
-
-
-
Field Detail
-
OTHER
public static final MemberAddV2Result OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.Receiving a catch-all value typically indicates this SDK version is not up to date. Consider updating your SDK version to handle the new tags.
-
-
Method Detail
-
tag
public MemberAddV2Result.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 aswitch
statement to properly handle the different values for thisMemberAddV2Result
.If a tag returned by the server is unrecognized by this SDK, the
MemberAddV2Result.Tag.OTHER
value will be used.- Returns:
- the tag for this instance.
-
isTeamLicenseLimit
public boolean isTeamLicenseLimit()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.TEAM_LICENSE_LIMIT
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.TEAM_LICENSE_LIMIT
,false
otherwise.
-
teamLicenseLimit
public static MemberAddV2Result teamLicenseLimit(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.TEAM_LICENSE_LIMIT
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getTeamLicenseLimitValue
public java.lang.String getTeamLicenseLimitValue()
Team is already full. The organization has no available licenses.This instance must be tagged as
MemberAddV2Result.Tag.TEAM_LICENSE_LIMIT
.- Returns:
- The
String
value associated with this instance ifisTeamLicenseLimit()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisTeamLicenseLimit()
isfalse
.
-
isFreeTeamMemberLimitReached
public boolean isFreeTeamMemberLimitReached()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
,false
otherwise.
-
freeTeamMemberLimitReached
public static MemberAddV2Result freeTeamMemberLimitReached(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getFreeTeamMemberLimitReachedValue
public java.lang.String getFreeTeamMemberLimitReachedValue()
Team is already full. The free team member limit has been reached.This instance must be tagged as
MemberAddV2Result.Tag.FREE_TEAM_MEMBER_LIMIT_REACHED
.- Returns:
- The
String
value associated with this instance ifisFreeTeamMemberLimitReached()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisFreeTeamMemberLimitReached()
isfalse
.
-
isUserAlreadyOnTeam
public boolean isUserAlreadyOnTeam()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_ALREADY_ON_TEAM
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.USER_ALREADY_ON_TEAM
,false
otherwise.
-
userAlreadyOnTeam
public static MemberAddV2Result userAlreadyOnTeam(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.USER_ALREADY_ON_TEAM
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getUserAlreadyOnTeamValue
public 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
MemberAddV2Result.Tag.USER_ALREADY_ON_TEAM
.- Returns:
- The
String
value associated with this instance ifisUserAlreadyOnTeam()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUserAlreadyOnTeam()
isfalse
.
-
isUserOnAnotherTeam
public boolean isUserOnAnotherTeam()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_ON_ANOTHER_TEAM
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.USER_ON_ANOTHER_TEAM
,false
otherwise.
-
userOnAnotherTeam
public static MemberAddV2Result userOnAnotherTeam(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.USER_ON_ANOTHER_TEAM
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getUserOnAnotherTeamValue
public 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
MemberAddV2Result.Tag.USER_ON_ANOTHER_TEAM
.- Returns:
- The
String
value associated with this instance ifisUserOnAnotherTeam()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUserOnAnotherTeam()
isfalse
.
-
isUserAlreadyPaired
public boolean isUserAlreadyPaired()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_ALREADY_PAIRED
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.USER_ALREADY_PAIRED
,false
otherwise.
-
userAlreadyPaired
public static MemberAddV2Result userAlreadyPaired(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_ALREADY_PAIRED
.User is already paired.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.USER_ALREADY_PAIRED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getUserAlreadyPairedValue
public java.lang.String getUserAlreadyPairedValue()
User is already paired.This instance must be tagged as
MemberAddV2Result.Tag.USER_ALREADY_PAIRED
.- Returns:
- The
String
value associated with this instance ifisUserAlreadyPaired()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUserAlreadyPaired()
isfalse
.
-
isUserMigrationFailed
public boolean isUserMigrationFailed()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_MIGRATION_FAILED
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.USER_MIGRATION_FAILED
,false
otherwise.
-
userMigrationFailed
public static MemberAddV2Result userMigrationFailed(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_MIGRATION_FAILED
.User migration has failed.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.USER_MIGRATION_FAILED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getUserMigrationFailedValue
public java.lang.String getUserMigrationFailedValue()
User migration has failed.This instance must be tagged as
MemberAddV2Result.Tag.USER_MIGRATION_FAILED
.- Returns:
- The
String
value associated with this instance ifisUserMigrationFailed()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUserMigrationFailed()
isfalse
.
-
isDuplicateExternalMemberId
public boolean isDuplicateExternalMemberId()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
,false
otherwise.
-
duplicateExternalMemberId
public static MemberAddV2Result duplicateExternalMemberId(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getDuplicateExternalMemberIdValue
public 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
MemberAddV2Result.Tag.DUPLICATE_EXTERNAL_MEMBER_ID
.- Returns:
- The
String
value associated with this instance ifisDuplicateExternalMemberId()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisDuplicateExternalMemberId()
isfalse
.
-
isDuplicateMemberPersistentId
public boolean isDuplicateMemberPersistentId()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
,false
otherwise.
-
duplicateMemberPersistentId
public static MemberAddV2Result duplicateMemberPersistentId(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getDuplicateMemberPersistentIdValue
public 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
MemberAddV2Result.Tag.DUPLICATE_MEMBER_PERSISTENT_ID
.- Returns:
- The
String
value associated with this instance ifisDuplicateMemberPersistentId()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisDuplicateMemberPersistentId()
isfalse
.
-
isPersistentIdDisabled
public boolean isPersistentIdDisabled()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.PERSISTENT_ID_DISABLED
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.PERSISTENT_ID_DISABLED
,false
otherwise.
-
persistentIdDisabled
public static MemberAddV2Result persistentIdDisabled(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.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
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.PERSISTENT_ID_DISABLED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getPersistentIdDisabledValue
public 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
MemberAddV2Result.Tag.PERSISTENT_ID_DISABLED
.- Returns:
- The
String
value associated with this instance ifisPersistentIdDisabled()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisPersistentIdDisabled()
isfalse
.
-
isUserCreationFailed
public boolean isUserCreationFailed()
Returnstrue
if this instance has the tagMemberAddV2Result.Tag.USER_CREATION_FAILED
,false
otherwise.- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.USER_CREATION_FAILED
,false
otherwise.
-
userCreationFailed
public static MemberAddV2Result userCreationFailed(java.lang.String value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.USER_CREATION_FAILED
.User creation has failed.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.USER_CREATION_FAILED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getUserCreationFailedValue
public java.lang.String getUserCreationFailedValue()
User creation has failed.This instance must be tagged as
MemberAddV2Result.Tag.USER_CREATION_FAILED
.- Returns:
- The
String
value associated with this instance ifisUserCreationFailed()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUserCreationFailed()
isfalse
.
-
isSuccess
public boolean isSuccess()
- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.SUCCESS
,false
otherwise.
-
success
public static MemberAddV2Result success(TeamMemberInfoV2 value)
Returns an instance ofMemberAddV2Result
that has its tag set toMemberAddV2Result.Tag.SUCCESS
.Describes a user that was successfully added to the team.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
MemberAddV2Result
with its tag set toMemberAddV2Result.Tag.SUCCESS
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getSuccessValue
public TeamMemberInfoV2 getSuccessValue()
Describes a user that was successfully added to the team.This instance must be tagged as
MemberAddV2Result.Tag.SUCCESS
.- Returns:
- The
TeamMemberInfoV2
value associated with this instance ifisSuccess()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisSuccess()
isfalse
.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asMemberAddV2Result.Tag.OTHER
,false
otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public 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
-
-