public class GroupInfo extends GroupSummary
Modifier and Type | Class and Description |
---|---|
static class |
GroupInfo.Builder
Builder for
GroupInfo . |
Modifier and Type | Field and Description |
---|---|
protected GroupType |
groupType |
protected boolean |
isOwner |
protected boolean |
sameTeam |
groupExternalId, groupId, groupName, memberCount
Constructor and Description |
---|
GroupInfo(String groupName,
String groupId,
GroupType groupType,
boolean isOwner,
boolean sameTeam)
The information about a group.
|
GroupInfo(String groupName,
String groupId,
GroupType groupType,
boolean isOwner,
boolean sameTeam,
String groupExternalId,
Long memberCount)
The information about a group.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
GroupType |
getGroupType()
The type of group.
|
boolean |
getIsOwner()
If the current user is an owner of the group.
|
boolean |
getSameTeam()
If the group is owned by the current user's team.
|
int |
hashCode() |
static GroupInfo.Builder |
newBuilder(String groupName,
String groupId,
GroupType groupType,
boolean isOwner,
boolean sameTeam)
Returns a new builder for creating an instance of this class.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
getGroupExternalId, getGroupId, getGroupName, getMemberCount, newBuilder
protected final GroupType groupType
protected final boolean isOwner
protected final boolean sameTeam
public GroupInfo(String groupName, String groupId, GroupType groupType, boolean isOwner, boolean sameTeam, String groupExternalId, Long memberCount)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
groupName
- Must not be null
.groupId
- Must not be null
.groupType
- The type of group. Must not be null
.isOwner
- If the current user is an owner of the group.sameTeam
- If the group is owned by the current user's team.groupExternalId
- External ID of group. This is an arbitrary ID
that an admin can attach to a group.memberCount
- The number of members in the group.IllegalArgumentException
- If any argument does not meet its
preconditions.public GroupInfo(String groupName, String groupId, GroupType groupType, boolean isOwner, boolean sameTeam)
The default values for unset fields will be used.
groupName
- Must not be null
.groupId
- Must not be null
.groupType
- The type of group. Must not be null
.isOwner
- If the current user is an owner of the group.sameTeam
- If the group is owned by the current user's team.IllegalArgumentException
- If any argument does not meet its
preconditions.public GroupType getGroupType()
null
.public boolean getIsOwner()
public boolean getSameTeam()
public static GroupInfo.Builder newBuilder(String groupName, String groupId, GroupType groupType, boolean isOwner, boolean sameTeam)
groupName
- Must not be null
.groupId
- Must not be null
.groupType
- The type of group. Must not be null
.isOwner
- If the current user is an owner of the group.sameTeam
- If the group is owned by the current user's team.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class GroupSummary
public boolean equals(Object obj)
equals
in class GroupSummary
public String toString()
toString
in class GroupSummary
public String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class GroupSummary