public static class MembershipInfo.Builder
extends java.lang.Object
MembershipInfo
.Modifier and Type | Field and Description |
---|---|
protected AccessLevel |
accessType |
protected java.lang.String |
initials |
protected boolean |
isInherited |
protected java.util.List<MemberPermission> |
permissions |
Modifier | Constructor and Description |
---|---|
protected |
Builder(AccessLevel accessType) |
Modifier and Type | Method and Description |
---|---|
MembershipInfo |
build()
Builds an instance of
MembershipInfo configured with this
builder's values |
MembershipInfo.Builder |
withInitials(java.lang.String initials)
Set value for optional field.
|
MembershipInfo.Builder |
withIsInherited(java.lang.Boolean isInherited)
Set value for optional field.
|
MembershipInfo.Builder |
withPermissions(java.util.List<MemberPermission> permissions)
Set value for optional field.
|
protected final AccessLevel accessType
protected java.util.List<MemberPermission> permissions
protected java.lang.String initials
protected boolean isInherited
protected Builder(AccessLevel accessType)
public MembershipInfo.Builder withPermissions(java.util.List<MemberPermission> permissions)
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.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public MembershipInfo.Builder withInitials(java.lang.String initials)
initials
- Never set.public MembershipInfo.Builder withIsInherited(java.lang.Boolean isInherited)
If left unset or set to null
, defaults to false
.
isInherited
- True if the member has access from a parent
folder. Defaults to false
when set to null
.public MembershipInfo build()
MembershipInfo
configured with this
builder's valuesMembershipInfo