Package com.dropbox.core.v2.sharing
Class UserMembershipInfo.Builder
- java.lang.Object
-
- com.dropbox.core.v2.sharing.MembershipInfo.Builder
-
- com.dropbox.core.v2.sharing.UserMembershipInfo.Builder
-
- Direct Known Subclasses:
UserFileMembershipInfo.Builder
- Enclosing class:
- UserMembershipInfo
public static class UserMembershipInfo.Builder extends MembershipInfo.Builder
Builder forUserMembershipInfo
.
-
-
Field Summary
Fields Modifier and Type Field Description protected UserInfo
user
-
Fields inherited from class com.dropbox.core.v2.sharing.MembershipInfo.Builder
accessType, initials, isInherited, permissions
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(AccessLevel accessType, UserInfo user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserMembershipInfo
build()
Builds an instance ofUserMembershipInfo
configured with this builder's valuesUserMembershipInfo.Builder
withInitials(java.lang.String initials)
Set value for optional field.UserMembershipInfo.Builder
withIsInherited(java.lang.Boolean isInherited)
Set value for optional field.UserMembershipInfo.Builder
withPermissions(java.util.List<MemberPermission> permissions)
Set value for optional field.
-
-
-
Field Detail
-
user
protected final UserInfo user
-
-
Constructor Detail
-
Builder
protected Builder(AccessLevel accessType, UserInfo user)
-
-
Method Detail
-
withPermissions
public UserMembershipInfo.Builder withPermissions(java.util.List<MemberPermission> permissions)
Set value for optional field.- Overrides:
withPermissions
in classMembershipInfo.Builder
- 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 UserMembershipInfo.Builder withInitials(java.lang.String initials)
Set value for optional field.- Overrides:
withInitials
in classMembershipInfo.Builder
- Parameters:
initials
- Never set.- Returns:
- this builder
-
withIsInherited
public UserMembershipInfo.Builder withIsInherited(java.lang.Boolean isInherited)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Overrides:
withIsInherited
in classMembershipInfo.Builder
- Parameters:
isInherited
- True if the member has access from a parent folder. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
build
public UserMembershipInfo build()
Builds an instance ofUserMembershipInfo
configured with this builder's values- Overrides:
build
in classMembershipInfo.Builder
- Returns:
- new instance of
UserMembershipInfo
-
-