public class FolderSharingInfo extends SharingInfo
Modifier and Type | Class and Description |
---|---|
static class |
FolderSharingInfo.Builder
Builder for
FolderSharingInfo . |
Modifier and Type | Field and Description |
---|---|
protected boolean |
noAccess |
protected String |
parentSharedFolderId |
protected String |
sharedFolderId |
protected boolean |
traverseOnly |
readOnly
Constructor and Description |
---|
FolderSharingInfo(boolean readOnly)
Sharing info for a folder which is contained in a shared folder or is a
shared folder mount point.
|
FolderSharingInfo(boolean readOnly,
String parentSharedFolderId,
String sharedFolderId,
boolean traverseOnly,
boolean noAccess)
Sharing info for a folder which is contained in a shared folder or is a
shared folder mount point.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
getNoAccess()
Specifies that the folder cannot be accessed by the user.
|
String |
getParentSharedFolderId()
Set if the folder is contained by a shared folder.
|
boolean |
getReadOnly()
True if the file or folder is inside a read-only shared folder.
|
String |
getSharedFolderId()
If this folder is a shared folder mount point, the ID of the shared
folder mounted at this location.
|
boolean |
getTraverseOnly()
Specifies that the folder can only be traversed and the user can only see
a limited subset of the contents of this folder because they don't have
read access to this folder.
|
int |
hashCode() |
static FolderSharingInfo.Builder |
newBuilder(boolean readOnly)
Returns a new builder for creating an instance of this class.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final String parentSharedFolderId
protected final String sharedFolderId
protected final boolean traverseOnly
protected final boolean noAccess
public FolderSharingInfo(boolean readOnly, String parentSharedFolderId, String sharedFolderId, boolean traverseOnly, boolean noAccess)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
readOnly
- True if the file or folder is inside a read-only shared
folder.parentSharedFolderId
- Set if the folder is contained by a shared
folder. Must match pattern "[-_0-9a-zA-Z:]+
".sharedFolderId
- If this folder is a shared folder mount point, the
ID of the shared folder mounted at this location. Must match pattern
"[-_0-9a-zA-Z:]+
".traverseOnly
- Specifies that the folder can only be traversed and
the user can only see a limited subset of the contents of this folder
because they don't have read access to this folder. They do, however,
have access to some sub folder.noAccess
- Specifies that the folder cannot be accessed by the
user.IllegalArgumentException
- If any argument does not meet its
preconditions.public FolderSharingInfo(boolean readOnly)
The default values for unset fields will be used.
readOnly
- True if the file or folder is inside a read-only shared
folder.public boolean getReadOnly()
getReadOnly
in class SharingInfo
public String getParentSharedFolderId()
null
if not present.public String getSharedFolderId()
null
if not present.public boolean getTraverseOnly()
null
if not present. Defaults to
false.public boolean getNoAccess()
null
if not present. Defaults to
false.public static FolderSharingInfo.Builder newBuilder(boolean readOnly)
readOnly
- True if the file or folder is inside a read-only shared
folder.public int hashCode()
hashCode
in class SharingInfo
public boolean equals(Object obj)
equals
in class SharingInfo
public String toString()
toString
in class SharingInfo
public String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class SharingInfo