Class GroupsSelector
- java.lang.Object
-
- com.dropbox.core.v2.team.GroupsSelector
-
public final class GroupsSelector extends java.lang.Object
Argument for selecting a list of groups, either by group_ids, or external group IDs.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 Summary
Nested Classes Modifier and Type Class Description static class
GroupsSelector.Tag
Discriminating tag type forGroupsSelector
.
-
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>
getGroupExternalIdsValue()
List of external IDs of groups.java.util.List<java.lang.String>
getGroupIdsValue()
List of group IDs.static GroupsSelector
groupExternalIds(java.util.List<java.lang.String> value)
Returns an instance ofGroupsSelector
that has its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS
.static GroupsSelector
groupIds(java.util.List<java.lang.String> value)
Returns an instance ofGroupsSelector
that has its tag set toGroupsSelector.Tag.GROUP_IDS
.int
hashCode()
boolean
isGroupExternalIds()
boolean
isGroupIds()
GroupsSelector.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.
-
-
-
Method Detail
-
tag
public GroupsSelector.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 thisGroupsSelector
.- Returns:
- the tag for this instance.
-
isGroupIds
public boolean isGroupIds()
- Returns:
true
if this instance is tagged asGroupsSelector.Tag.GROUP_IDS
,false
otherwise.
-
groupIds
public static GroupsSelector groupIds(java.util.List<java.lang.String> value)
Returns an instance ofGroupsSelector
that has its tag set toGroupsSelector.Tag.GROUP_IDS
.List of group IDs.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
GroupsSelector
with its tag set toGroupsSelector.Tag.GROUP_IDS
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
contains anull
item or isnull
.
-
getGroupIdsValue
public java.util.List<java.lang.String> getGroupIdsValue()
List of group IDs.This instance must be tagged as
GroupsSelector.Tag.GROUP_IDS
.- Returns:
- The
List
value associated with this instance ifisGroupIds()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisGroupIds()
isfalse
.
-
isGroupExternalIds
public boolean isGroupExternalIds()
- Returns:
true
if this instance is tagged asGroupsSelector.Tag.GROUP_EXTERNAL_IDS
,false
otherwise.
-
groupExternalIds
public static GroupsSelector groupExternalIds(java.util.List<java.lang.String> value)
Returns an instance ofGroupsSelector
that has its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS
.List of external IDs of groups.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
GroupsSelector
with its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
contains anull
item or isnull
.
-
getGroupExternalIdsValue
public java.util.List<java.lang.String> getGroupExternalIdsValue()
List of external IDs of groups.This instance must be tagged as
GroupsSelector.Tag.GROUP_EXTERNAL_IDS
.- Returns:
- The
List
value associated with this instance ifisGroupExternalIds()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisGroupExternalIds()
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
-
-