Class GroupsSelector
- java.lang.Object
-
- com.dropbox.core.v2.team.GroupsSelector
-
public final class GroupsSelector extends java.lang.ObjectArgument 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 classGroupsSelector.TagDiscriminating tag type forGroupsSelector.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(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 GroupsSelectorgroupExternalIds(java.util.List<java.lang.String> value)Returns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS.static GroupsSelectorgroupIds(java.util.List<java.lang.String> value)Returns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_IDS.inthashCode()booleanisGroupExternalIds()booleanisGroupIds()GroupsSelector.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()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 aswitchstatement to properly handle the different values for thisGroupsSelector.- Returns:
- the tag for this instance.
-
isGroupIds
public boolean isGroupIds()
- Returns:
trueif this instance is tagged asGroupsSelector.Tag.GROUP_IDS,falseotherwise.
-
groupIds
public static GroupsSelector groupIds(java.util.List<java.lang.String> value)
Returns an instance ofGroupsSelectorthat has its tag set toGroupsSelector.Tag.GROUP_IDS.List of group IDs.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
GroupsSelectorwith its tag set toGroupsSelector.Tag.GROUP_IDS. - Throws:
java.lang.IllegalArgumentException- ifvaluecontains anullitem 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
Listvalue associated with this instance ifisGroupIds()istrue. - Throws:
java.lang.IllegalStateException- IfisGroupIds()isfalse.
-
isGroupExternalIds
public boolean isGroupExternalIds()
- Returns:
trueif this instance is tagged asGroupsSelector.Tag.GROUP_EXTERNAL_IDS,falseotherwise.
-
groupExternalIds
public static GroupsSelector groupExternalIds(java.util.List<java.lang.String> value)
Returns an instance ofGroupsSelectorthat 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
GroupsSelectorwith its tag set toGroupsSelector.Tag.GROUP_EXTERNAL_IDS. - Throws:
java.lang.IllegalArgumentException- ifvaluecontains anullitem 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
Listvalue associated with this instance ifisGroupExternalIds()istrue. - Throws:
java.lang.IllegalStateException- IfisGroupExternalIds()isfalse.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-