public class SharedFolderMetadata extends SharedFolderMetadataBase
Modifier and Type | Class and Description |
---|---|
static class |
SharedFolderMetadata.Builder
Builder for
SharedFolderMetadata . |
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected String |
pathLower |
protected List<FolderPermission> |
permissions |
protected String |
sharedFolderId |
protected Date |
timeInvited |
accessType, isTeamFolder, ownerTeam, parentSharedFolderId, policy
Constructor and Description |
---|
SharedFolderMetadata(AccessLevel accessType,
boolean isTeamFolder,
FolderPolicy policy,
String name,
String sharedFolderId,
Date timeInvited)
The metadata which includes basic information about the shared folder.
|
SharedFolderMetadata(AccessLevel accessType,
boolean isTeamFolder,
FolderPolicy policy,
String name,
String sharedFolderId,
Date timeInvited,
Team ownerTeam,
String parentSharedFolderId,
String pathLower,
List<FolderPermission> permissions)
The metadata which includes basic information about the shared folder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getName()
The name of the this shared folder.
|
String |
getPathLower()
The lower-cased full path of this shared folder.
|
List<FolderPermission> |
getPermissions()
Actions the current user may perform on the folder and its contents.
|
String |
getSharedFolderId()
The ID of the shared folder.
|
Date |
getTimeInvited()
Timestamp indicating when the current user was invited to this shared
folder.
|
int |
hashCode() |
static SharedFolderMetadata.Builder |
newBuilder(AccessLevel accessType,
boolean isTeamFolder,
FolderPolicy policy,
String name,
String sharedFolderId,
Date timeInvited)
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.
|
getAccessType, getIsTeamFolder, getOwnerTeam, getParentSharedFolderId, getPolicy, newBuilder
protected final String pathLower
protected final String name
protected final String sharedFolderId
protected final List<FolderPermission> permissions
protected final Date timeInvited
public SharedFolderMetadata(AccessLevel accessType, boolean isTeamFolder, FolderPolicy policy, String name, String sharedFolderId, Date timeInvited, Team ownerTeam, String parentSharedFolderId, String pathLower, List<FolderPermission> permissions)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
accessType
- The current user's access level for this shared
folder. Must not be null
.isTeamFolder
- Whether this folder is a team folder.policy
- Policies governing this shared folder. Must not be null
.name
- The name of the this shared folder. Must not be null
.sharedFolderId
- The ID of the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.timeInvited
- Timestamp indicating when the current user was
invited to this shared folder. Must not be null
.ownerTeam
- The team that owns the folder. This field is not
present if the folder is not owned by a team.parentSharedFolderId
- The ID of the parent shared folder. This
field is present only if the folder is contained within another
shared folder. Must match pattern "[-_0-9a-zA-Z:]+
".pathLower
- The lower-cased full path of this shared folder. Absent
for unmounted folders.permissions
- Actions the current user may perform on the folder
and its contents. The set of permissions corresponds to the
FolderActions in the request. Must not contain a null
item.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFolderMetadata(AccessLevel accessType, boolean isTeamFolder, FolderPolicy policy, String name, String sharedFolderId, Date timeInvited)
The default values for unset fields will be used.
accessType
- The current user's access level for this shared
folder. Must not be null
.isTeamFolder
- Whether this folder is a team folder.policy
- Policies governing this shared folder. Must not be null
.name
- The name of the this shared folder. Must not be null
.sharedFolderId
- The ID of the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.timeInvited
- Timestamp indicating when the current user was
invited to this shared folder. Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getPathLower()
null
if not present.public String getName()
null
.public String getSharedFolderId()
null
.public List<FolderPermission> getPermissions()
null
if not present.public Date getTimeInvited()
null
.public static SharedFolderMetadata.Builder newBuilder(AccessLevel accessType, boolean isTeamFolder, FolderPolicy policy, String name, String sharedFolderId, Date timeInvited)
accessType
- The current user's access level for this shared
folder. Must not be null
.isTeamFolder
- Whether this folder is a team folder.policy
- Policies governing this shared folder. Must not be null
.name
- The name of the this shared folder. Must not be null
.sharedFolderId
- The ID of the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.timeInvited
- Timestamp indicating when the current user was
invited to this shared folder. Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class SharedFolderMetadataBase
public boolean equals(Object obj)
equals
in class SharedFolderMetadataBase
public String toString()
toString
in class SharedFolderMetadataBase
public String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class SharedFolderMetadataBase