public class UserPermissions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UserPermissions.Builder
Builder for
UserPermissions . |
Modifier and Type | Field and Description |
---|---|
protected boolean |
canComment |
protected boolean |
canDownload |
protected boolean |
canEdit |
protected boolean |
canRename |
Constructor and Description |
---|
UserPermissions()
None
|
UserPermissions(boolean canEdit,
boolean canRename,
boolean canComment,
boolean canDownload)
Use
newBuilder to create instances of this class without
specifying values for all optional fields. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
getCanComment()
true if the user can comment on this document
|
boolean |
getCanDownload()
true if the user can download the contents of this document.
|
boolean |
getCanEdit()
true if the user can edit the content of this document
|
boolean |
getCanRename()
true if the user can edit the title of this document
|
int |
hashCode() |
static UserPermissions.Builder |
newBuilder()
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 boolean canEdit
protected final boolean canRename
protected final boolean canComment
protected final boolean canDownload
public UserPermissions(boolean canEdit, boolean canRename, boolean canComment, boolean canDownload)
newBuilder
to create instances of this class without
specifying values for all optional fields.canEdit
- true if the user can edit the content of this document.canRename
- true if the user can edit the title of this document.canComment
- true if the user can comment on this document.canDownload
- true if the user can download the contents of this
document. currently always true if the user has view access to the
document.public UserPermissions()
The default values for unset fields will be used.
public boolean getCanEdit()
null
if not present. Defaults to
false.public boolean getCanRename()
null
if not present. Defaults to
false.public boolean getCanComment()
null
if not present. Defaults to
false.public boolean getCanDownload()
null
if not present. Defaults to
false.public static UserPermissions.Builder newBuilder()
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.