public class MembershipInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MembershipInfo.Builder
Builder for
MembershipInfo . |
Modifier and Type | Field and Description |
---|---|
protected AccessLevel |
accessType |
protected java.lang.String |
initials |
protected boolean |
isInherited |
protected java.util.List<MemberPermission> |
permissions |
Constructor and Description |
---|
MembershipInfo(AccessLevel accessType)
The information about a member of the shared content.
|
MembershipInfo(AccessLevel accessType,
java.util.List<MemberPermission> permissions,
java.lang.String initials,
boolean isInherited)
The information about a member of the shared content.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
AccessLevel |
getAccessType()
The access type for this member.
|
java.lang.String |
getInitials()
Never set.
|
boolean |
getIsInherited()
True if the member has access from a parent folder.
|
java.util.List<MemberPermission> |
getPermissions()
The permissions that requesting user has on this member.
|
int |
hashCode() |
static MembershipInfo.Builder |
newBuilder(AccessLevel accessType)
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.
|
protected final AccessLevel accessType
protected final java.util.List<MemberPermission> permissions
protected final java.lang.String initials
protected final boolean isInherited
public MembershipInfo(AccessLevel accessType, java.util.List<MemberPermission> permissions, java.lang.String initials, boolean isInherited)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
accessType
- The access type for this member. It contains inherited
access type from parent folder, and acquired access type from this
folder. Must not be null
.permissions
- The permissions that requesting user has on this
member. The set of permissions corresponds to the MemberActions in
the request. Must not contain a null
item.initials
- Never set.isInherited
- True if the member has access from a parent folder.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public MembershipInfo(AccessLevel accessType)
The default values for unset fields will be used.
accessType
- The access type for this member. It contains inherited
access type from parent folder, and acquired access type from this
folder. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public AccessLevel getAccessType()
null
.public java.util.List<MemberPermission> getPermissions()
null
if not present.public java.lang.String getInitials()
null
if not present.public boolean getIsInherited()
null
if not present. Defaults to
false.public static MembershipInfo.Builder newBuilder(AccessLevel accessType)
accessType
- The access type for this member. It contains inherited
access type from parent folder, and acquired access type from this
folder. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.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.