Class GroupMembersAddError
- java.lang.Object
-
- com.dropbox.core.v2.team.GroupMembersAddError
-
public final class GroupMembersAddError 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 theisAbc()
methods will returntrue
. You can usetag()
to determine the tag associated with this instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroupMembersAddError.Tag
Discriminating tag type forGroupMembersAddError
.
-
Field Summary
Fields Modifier and Type Field Description static GroupMembersAddError
DUPLICATE_USER
You cannot add duplicate users.static GroupMembersAddError
GROUP_NOT_FOUND
No matching group found.static GroupMembersAddError
GROUP_NOT_IN_TEAM
Group is not in this team.static GroupMembersAddError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.static GroupMembersAddError
SYSTEM_MANAGED_GROUP_DISALLOWED
This operation is not supported on system-managed groups.static GroupMembersAddError
USER_MUST_BE_ACTIVE_TO_BE_OWNER
A suspended user cannot be added to a group asGroupAccessType.OWNER
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.List<java.lang.String>
getMembersNotInTeamValue()
These members are not part of your team.java.util.List<java.lang.String>
getUserCannotBeManagerOfCompanyManagedGroupValue()
A company-managed group cannot be managed by a user.java.util.List<java.lang.String>
getUsersNotFoundValue()
These users were not found in Dropbox.int
hashCode()
boolean
isDuplicateUser()
boolean
isGroupNotFound()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.GROUP_NOT_FOUND
,false
otherwise.boolean
isGroupNotInTeam()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.GROUP_NOT_IN_TEAM
,false
otherwise.boolean
isMembersNotInTeam()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
,false
otherwise.boolean
isOther()
boolean
isSystemManagedGroupDisallowed()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.SYSTEM_MANAGED_GROUP_DISALLOWED
,false
otherwise.boolean
isUserCannotBeManagerOfCompanyManagedGroup()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
,false
otherwise.boolean
isUserMustBeActiveToBeOwner()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.USER_MUST_BE_ACTIVE_TO_BE_OWNER
,false
otherwise.boolean
isUsersNotFound()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.USERS_NOT_FOUND
,false
otherwise.static GroupMembersAddError
membersNotInTeam(java.util.List<java.lang.String> value)
Returns an instance ofGroupMembersAddError
that has its tag set toGroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
.GroupMembersAddError.Tag
tag()
Returns the tag for this instance.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.static GroupMembersAddError
userCannotBeManagerOfCompanyManagedGroup(java.util.List<java.lang.String> value)
Returns an instance ofGroupMembersAddError
that has its tag set toGroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
.static GroupMembersAddError
usersNotFound(java.util.List<java.lang.String> value)
Returns an instance ofGroupMembersAddError
that has its tag set toGroupMembersAddError.Tag.USERS_NOT_FOUND
.
-
-
-
Field Detail
-
GROUP_NOT_FOUND
public static final GroupMembersAddError GROUP_NOT_FOUND
No matching group found. No groups match the specified group ID.
-
OTHER
public static final GroupMembersAddError 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.
-
SYSTEM_MANAGED_GROUP_DISALLOWED
public static final GroupMembersAddError SYSTEM_MANAGED_GROUP_DISALLOWED
This operation is not supported on system-managed groups.
-
DUPLICATE_USER
public static final GroupMembersAddError DUPLICATE_USER
You cannot add duplicate users. One or more of the members you are trying to add is already a member of the group.
-
GROUP_NOT_IN_TEAM
public static final GroupMembersAddError GROUP_NOT_IN_TEAM
Group is not in this team. You cannot add members to a group that is outside of your team.
-
USER_MUST_BE_ACTIVE_TO_BE_OWNER
public static final GroupMembersAddError USER_MUST_BE_ACTIVE_TO_BE_OWNER
A suspended user cannot be added to a group asGroupAccessType.OWNER
.
-
-
Method Detail
-
tag
public GroupMembersAddError.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 thisGroupMembersAddError
.- Returns:
- the tag for this instance.
-
isGroupNotFound
public boolean isGroupNotFound()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.GROUP_NOT_FOUND
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.GROUP_NOT_FOUND
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.OTHER
,false
otherwise.
-
isSystemManagedGroupDisallowed
public boolean isSystemManagedGroupDisallowed()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.SYSTEM_MANAGED_GROUP_DISALLOWED
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.SYSTEM_MANAGED_GROUP_DISALLOWED
,false
otherwise.
-
isDuplicateUser
public boolean isDuplicateUser()
- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.DUPLICATE_USER
,false
otherwise.
-
isGroupNotInTeam
public boolean isGroupNotInTeam()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.GROUP_NOT_IN_TEAM
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.GROUP_NOT_IN_TEAM
,false
otherwise.
-
isMembersNotInTeam
public boolean isMembersNotInTeam()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
,false
otherwise.
-
membersNotInTeam
public static GroupMembersAddError membersNotInTeam(java.util.List<java.lang.String> value)
Returns an instance ofGroupMembersAddError
that has its tag set toGroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
.These members are not part of your team. Currently, you cannot add members to a group if they are not part of your team, though this may change in a subsequent version. To add new members to your Dropbox Business team, use the
DbxTeamTeamRequests.membersAdd(List,boolean)
endpoint.- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
GroupMembersAddError
with its tag set toGroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
contains anull
item or isnull
.
-
getMembersNotInTeamValue
public java.util.List<java.lang.String> getMembersNotInTeamValue()
These members are not part of your team. Currently, you cannot add members to a group if they are not part of your team, though this may change in a subsequent version. To add new members to your Dropbox Business team, use theDbxTeamTeamRequests.membersAdd(List,boolean)
endpoint.This instance must be tagged as
GroupMembersAddError.Tag.MEMBERS_NOT_IN_TEAM
.- Returns:
- The
List
value associated with this instance ifisMembersNotInTeam()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisMembersNotInTeam()
isfalse
.
-
isUsersNotFound
public boolean isUsersNotFound()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.USERS_NOT_FOUND
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.USERS_NOT_FOUND
,false
otherwise.
-
usersNotFound
public static GroupMembersAddError usersNotFound(java.util.List<java.lang.String> value)
Returns an instance ofGroupMembersAddError
that has its tag set toGroupMembersAddError.Tag.USERS_NOT_FOUND
.These users were not found in Dropbox.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
GroupMembersAddError
with its tag set toGroupMembersAddError.Tag.USERS_NOT_FOUND
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
contains anull
item or isnull
.
-
getUsersNotFoundValue
public java.util.List<java.lang.String> getUsersNotFoundValue()
These users were not found in Dropbox.This instance must be tagged as
GroupMembersAddError.Tag.USERS_NOT_FOUND
.- Returns:
- The
List
value associated with this instance ifisUsersNotFound()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUsersNotFound()
isfalse
.
-
isUserMustBeActiveToBeOwner
public boolean isUserMustBeActiveToBeOwner()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.USER_MUST_BE_ACTIVE_TO_BE_OWNER
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.USER_MUST_BE_ACTIVE_TO_BE_OWNER
,false
otherwise.
-
isUserCannotBeManagerOfCompanyManagedGroup
public boolean isUserCannotBeManagerOfCompanyManagedGroup()
Returnstrue
if this instance has the tagGroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
,false
otherwise.- Returns:
true
if this instance is tagged asGroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
,false
otherwise.
-
userCannotBeManagerOfCompanyManagedGroup
public static GroupMembersAddError userCannotBeManagerOfCompanyManagedGroup(java.util.List<java.lang.String> value)
Returns an instance ofGroupMembersAddError
that has its tag set toGroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
.A company-managed group cannot be managed by a user.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
GroupMembersAddError
with its tag set toGroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
contains anull
item or isnull
.
-
getUserCannotBeManagerOfCompanyManagedGroupValue
public java.util.List<java.lang.String> getUserCannotBeManagerOfCompanyManagedGroupValue()
A company-managed group cannot be managed by a user.This instance must be tagged as
GroupMembersAddError.Tag.USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP
.- Returns:
- The
List
value associated with this instance ifisUserCannotBeManagerOfCompanyManagedGroup()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUserCannotBeManagerOfCompanyManagedGroup()
isfalse
.
-
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
-
-