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, groupManagementType, groupName, memberCount
Constructor and Description |
---|
GroupInfo(String groupName,
String groupId,
GroupManagementType groupManagementType,
GroupType groupType,
boolean isOwner,
boolean sameTeam)
The information about a group.
|
GroupInfo(String groupName,
String groupId,
GroupManagementType groupManagementType,
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) |
String |
getGroupExternalId()
External ID of group.
|
String |
getGroupId() |
GroupManagementType |
getGroupManagementType()
Who is allowed to manage the group.
|
String |
getGroupName() |
GroupType |
getGroupType()
The type of group.
|
boolean |
getIsOwner()
If the current user is an owner of the group.
|
Long |
getMemberCount()
The number of members in 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,
GroupManagementType groupManagementType,
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.
|
newBuilder
protected final GroupType groupType
protected final boolean isOwner
protected final boolean sameTeam
public GroupInfo(String groupName, String groupId, GroupManagementType groupManagementType, 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
.groupManagementType
- Who is allowed to manage the group. 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, GroupManagementType groupManagementType, 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
.groupManagementType
- Who is allowed to manage the group. 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 String getGroupName()
getGroupName
in class GroupSummary
null
.public String getGroupId()
getGroupId
in class GroupSummary
null
.public GroupManagementType getGroupManagementType()
getGroupManagementType
in class GroupSummary
null
.public GroupType getGroupType()
null
.public boolean getIsOwner()
public boolean getSameTeam()
public String getGroupExternalId()
getGroupExternalId
in class GroupSummary
null
if not present.public Long getMemberCount()
getMemberCount
in class GroupSummary
null
if not present.public static GroupInfo.Builder newBuilder(String groupName, String groupId, GroupManagementType groupManagementType, GroupType groupType, boolean isOwner, boolean sameTeam)
groupName
- Must not be null
.groupId
- Must not be null
.groupManagementType
- Who is allowed to manage the group. 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