Package com.dropbox.core.v2.clouddocs
Class UserPermissions.Builder
- java.lang.Object
-
- com.dropbox.core.v2.clouddocs.UserPermissions.Builder
-
- Enclosing class:
- UserPermissions
public static class UserPermissions.Builder extends java.lang.Object
Builder forUserPermissions
.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
canComment
protected boolean
canDownload
protected boolean
canEdit
protected boolean
canRename
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserPermissions
build()
Builds an instance ofUserPermissions
configured with this builder's valuesUserPermissions.Builder
withCanComment(java.lang.Boolean canComment)
Set value for optional field.UserPermissions.Builder
withCanDownload(java.lang.Boolean canDownload)
Set value for optional field.UserPermissions.Builder
withCanEdit(java.lang.Boolean canEdit)
Set value for optional field.UserPermissions.Builder
withCanRename(java.lang.Boolean canRename)
Set value for optional field.
-
-
-
Method Detail
-
withCanEdit
public UserPermissions.Builder withCanEdit(java.lang.Boolean canEdit)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
canEdit
- true if the user can edit the content of this document. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
withCanRename
public UserPermissions.Builder withCanRename(java.lang.Boolean canRename)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
canRename
- true if the user can edit the title of this document. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
withCanComment
public UserPermissions.Builder withCanComment(java.lang.Boolean canComment)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
canComment
- true if the user can comment on this document. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
withCanDownload
public UserPermissions.Builder withCanDownload(java.lang.Boolean canDownload)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
canDownload
- true if the user can download the contents of this document. currently always true if the user has view access to the document. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
build
public UserPermissions build()
Builds an instance ofUserPermissions
configured with this builder's values- Returns:
- new instance of
UserPermissions
-
-