Package com.dropbox.core.v2.sharing
Class MembershipInfo.Builder
- java.lang.Object
-
- com.dropbox.core.v2.sharing.MembershipInfo.Builder
-
- Direct Known Subclasses:
GroupMembershipInfo.Builder
,InviteeMembershipInfo.Builder
,UserMembershipInfo.Builder
- Enclosing class:
- MembershipInfo
public static class MembershipInfo.Builder extends java.lang.Object
Builder forMembershipInfo
.
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessLevel
accessType
protected java.lang.String
initials
protected boolean
isInherited
protected java.util.List<MemberPermission>
permissions
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(AccessLevel accessType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MembershipInfo
build()
Builds an instance ofMembershipInfo
configured with this builder's valuesMembershipInfo.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.
-
-
-
Field Detail
-
accessType
protected final AccessLevel accessType
-
permissions
protected java.util.List<MemberPermission> permissions
-
initials
protected java.lang.String initials
-
isInherited
protected boolean isInherited
-
-
Constructor Detail
-
Builder
protected Builder(AccessLevel accessType)
-
-
Method Detail
-
withPermissions
public MembershipInfo.Builder withPermissions(java.util.List<MemberPermission> permissions)
Set value for optional field.- Parameters:
permissions
- The permissions that requesting user has on this member. The set of permissions corresponds to the MemberActions in the request. Must not contain anull
item.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withInitials
public MembershipInfo.Builder withInitials(java.lang.String initials)
Set value for optional field.- Parameters:
initials
- Never set.- Returns:
- this builder
-
withIsInherited
public MembershipInfo.Builder withIsInherited(java.lang.Boolean isInherited)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
isInherited
- True if the member has access from a parent folder. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
build
public MembershipInfo build()
Builds an instance ofMembershipInfo
configured with this builder's values- Returns:
- new instance of
MembershipInfo
-
-