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 |
isMember |
protected boolean |
isOwner |
protected boolean |
sameTeam |
groupExternalId, groupId, groupManagementType, groupName, memberCount
Constructor and Description |
---|
GroupInfo(java.lang.String groupName,
java.lang.String groupId,
GroupManagementType groupManagementType,
GroupType groupType,
boolean isMember,
boolean isOwner,
boolean sameTeam)
The information about a group.
|
GroupInfo(java.lang.String groupName,
java.lang.String groupId,
GroupManagementType groupManagementType,
GroupType groupType,
boolean isMember,
boolean isOwner,
boolean sameTeam,
java.lang.String groupExternalId,
java.lang.Long memberCount)
The information about a group.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getGroupExternalId()
External ID of group.
|
java.lang.String |
getGroupId() |
GroupManagementType |
getGroupManagementType()
Who is allowed to manage the group.
|
java.lang.String |
getGroupName() |
GroupType |
getGroupType()
The type of group.
|
boolean |
getIsMember()
If the current user is a member of the group.
|
boolean |
getIsOwner()
If the current user is an owner of the group.
|
java.lang.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(java.lang.String groupName,
java.lang.String groupId,
GroupManagementType groupManagementType,
GroupType groupType,
boolean isMember,
boolean isOwner,
boolean sameTeam)
Returns a new builder for creating an instance of this class.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
newBuilder
protected final GroupType groupType
protected final boolean isMember
protected final boolean isOwner
protected final boolean sameTeam
public GroupInfo(java.lang.String groupName, java.lang.String groupId, GroupManagementType groupManagementType, GroupType groupType, boolean isMember, boolean isOwner, boolean sameTeam, java.lang.String groupExternalId, java.lang.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
.isMember
- If the current user is a member of the group.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.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public GroupInfo(java.lang.String groupName, java.lang.String groupId, GroupManagementType groupManagementType, GroupType groupType, boolean isMember, 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
.isMember
- If the current user is a member of the group.isOwner
- If the current user is an owner of the group.sameTeam
- If the group is owned by the current user's team.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.lang.String getGroupName()
getGroupName
in class GroupSummary
null
.public java.lang.String getGroupId()
getGroupId
in class GroupSummary
null
.public GroupManagementType getGroupManagementType()
getGroupManagementType
in class GroupSummary
null
.public GroupType getGroupType()
null
.public boolean getIsMember()
public boolean getIsOwner()
public boolean getSameTeam()
public java.lang.String getGroupExternalId()
getGroupExternalId
in class GroupSummary
null
if not present.public java.lang.Long getMemberCount()
getMemberCount
in class GroupSummary
null
if not present.public static GroupInfo.Builder newBuilder(java.lang.String groupName, java.lang.String groupId, GroupManagementType groupManagementType, GroupType groupType, boolean isMember, 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
.isMember
- If the current user is a member of the group.isOwner
- If the current user is an owner of the group.sameTeam
- If the group is owned by the current user's team.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class GroupSummary
public boolean equals(java.lang.Object obj)
equals
in class GroupSummary
public java.lang.String toString()
toString
in class GroupSummary
public java.lang.String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class GroupSummary