Class TeamMemberStatus
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TeamMemberStatusUser has successfully joined the team.static final TeamMemberStatusUser has been invited to a team, but has not joined the team yet.static final TeamMemberStatusUser is no longer a member of the team, but the account can be un-suspended, re-establishing the user as a team member. -
Method Summary
Modifier and TypeMethodDescriptionbooleanUser is no longer a member of the team.inthashCode()booleanisActive()booleanbooleanbooleanstatic TeamMemberStatusremoved(RemovedStatus value) Returns an instance ofTeamMemberStatusthat has its tag set toTeamMemberStatus.Tag.REMOVED.tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
ACTIVE
User has successfully joined the team. -
INVITED
User has been invited to a team, but has not joined the team yet. -
SUSPENDED
User is no longer a member of the team, but the account can be un-suspended, re-establishing the user as a team member.
-
-
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 thisTeamMemberStatus.- Returns:
- the tag for this instance.
-
isActive
public boolean isActive()- Returns:
trueif this instance is tagged asTeamMemberStatus.Tag.ACTIVE,falseotherwise.
-
isInvited
public boolean isInvited()- Returns:
trueif this instance is tagged asTeamMemberStatus.Tag.INVITED,falseotherwise.
-
isSuspended
public boolean isSuspended()- Returns:
trueif this instance is tagged asTeamMemberStatus.Tag.SUSPENDED,falseotherwise.
-
isRemoved
public boolean isRemoved()- Returns:
trueif this instance is tagged asTeamMemberStatus.Tag.REMOVED,falseotherwise.
-
removed
Returns an instance ofTeamMemberStatusthat has its tag set toTeamMemberStatus.Tag.REMOVED.User is no longer a member of the team. Removed users are only listed when include_removed is true in members/list.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
TeamMemberStatuswith its tag set toTeamMemberStatus.Tag.REMOVED. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getRemovedValue
User is no longer a member of the team. Removed users are only listed when include_removed is true in members/list.This instance must be tagged as
TeamMemberStatus.Tag.REMOVED.- Returns:
- The
RemovedStatusvalue associated with this instance ifisRemoved()istrue. - Throws:
IllegalStateException- IfisRemoved()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
-