public final class TeamMemberStatus
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 the isAbc()
methods will return true
. You can use tag()
to determine the
tag associated with this instance.
Modifier and Type | Class and Description |
---|---|
static class |
TeamMemberStatus.Tag
Discriminating tag type for
TeamMemberStatus . |
Modifier and Type | Field and Description |
---|---|
static TeamMemberStatus |
ACTIVE
User has successfully joined the team.
|
static TeamMemberStatus |
INVITED
User has been invited to a team, but has not joined the team yet.
|
static TeamMemberStatus |
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
RemovedStatus |
getRemovedValue()
User is no longer a member of the team.
|
int |
hashCode() |
boolean |
isActive()
|
boolean |
isInvited()
|
boolean |
isRemoved()
|
boolean |
isSuspended()
|
static TeamMemberStatus |
removed(RemovedStatus value)
Returns an instance of
TeamMemberStatus that has its tag set to
TeamMemberStatus.Tag.REMOVED . |
TeamMemberStatus.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.
|
public static final TeamMemberStatus ACTIVE
public static final TeamMemberStatus INVITED
public static final TeamMemberStatus SUSPENDED
public TeamMemberStatus.Tag tag()
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 return true
. Callers are recommended to use the tag
value in a switch
statement to properly handle the different
values for this TeamMemberStatus
.
public boolean isActive()
true
if this instance is tagged as TeamMemberStatus.Tag.ACTIVE
,
false
otherwise.public boolean isInvited()
true
if this instance is tagged as TeamMemberStatus.Tag.INVITED
,
false
otherwise.public boolean isSuspended()
true
if this instance is tagged as TeamMemberStatus.Tag.SUSPENDED
,
false
otherwise.public boolean isRemoved()
true
if this instance is tagged as TeamMemberStatus.Tag.REMOVED
,
false
otherwise.public static TeamMemberStatus removed(RemovedStatus value)
TeamMemberStatus
that has its tag set to
TeamMemberStatus.Tag.REMOVED
.
User is no longer a member of the team. Removed users are only listed when include_removed is true in members/list.
value
- value to assign to this instance.TeamMemberStatus
with its tag set to TeamMemberStatus.Tag.REMOVED
.java.lang.IllegalArgumentException
- if value
is null
.public RemovedStatus getRemovedValue()
This instance must be tagged as TeamMemberStatus.Tag.REMOVED
.
RemovedStatus
value associated with this instance if
isRemoved()
is true
.java.lang.IllegalStateException
- If isRemoved()
is false
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.