Package com.dropbox.core.v2.team
Class GroupSelector
java.lang.Object
com.dropbox.core.v2.team.GroupSelector
Argument for selecting a single group, either by group_id or by external
group ID.
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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanExternal ID of the group.Group ID.static GroupSelectorgroupExternalId(String value) Returns an instance ofGroupSelectorthat has its tag set toGroupSelector.Tag.GROUP_EXTERNAL_ID.static GroupSelectorReturns an instance ofGroupSelectorthat has its tag set toGroupSelector.Tag.GROUP_ID.inthashCode()booleanbooleantag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Method Details
-
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 thisGroupSelector.- Returns:
- the tag for this instance.
-
isGroupId
public boolean isGroupId()- Returns:
trueif this instance is tagged asGroupSelector.Tag.GROUP_ID,falseotherwise.
-
groupId
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
GroupSelectorwith its tag set toGroupSelector.Tag.GROUP_ID. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getGroupIdValue
Group ID.This instance must be tagged as
GroupSelector.Tag.GROUP_ID.- Returns:
- The
Stringvalue associated with this instance ifisGroupId()istrue. - Throws:
IllegalStateException- IfisGroupId()isfalse.
-
isGroupExternalId
public boolean isGroupExternalId()- Returns:
trueif this instance is tagged asGroupSelector.Tag.GROUP_EXTERNAL_ID,falseotherwise.
-
groupExternalId
Returns an instance ofGroupSelectorthat has its tag set toGroupSelector.Tag.GROUP_EXTERNAL_ID.External ID of the group.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
GroupSelectorwith its tag set toGroupSelector.Tag.GROUP_EXTERNAL_ID. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getGroupExternalIdValue
External ID of the group.This instance must be tagged as
GroupSelector.Tag.GROUP_EXTERNAL_ID.- Returns:
- The
Stringvalue associated with this instance ifisGroupExternalId()istrue. - Throws:
IllegalStateException- IfisGroupExternalId()isfalse.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-