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 |
previewUrl |
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,
String previewUrl)
The metadata which includes basic information about the shared folder.
|
SharedFolderMetadata(AccessLevel accessType,
boolean isTeamFolder,
FolderPolicy policy,
String name,
String sharedFolderId,
Date timeInvited,
String previewUrl,
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) |
AccessLevel |
getAccessType()
The current user's access level for this shared folder.
|
boolean |
getIsTeamFolder()
Whether this folder is a team folder.
|
String |
getName()
The name of the this shared folder.
|
Team |
getOwnerTeam()
The team that owns the folder.
|
String |
getParentSharedFolderId()
The ID of the parent 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.
|
FolderPolicy |
getPolicy()
Policies governing this shared folder.
|
String |
getPreviewUrl()
URL for displaying a web preview of the shared folder.
|
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,
String previewUrl)
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.
|
newBuilder
protected final String pathLower
protected final String name
protected final String sharedFolderId
protected final List<FolderPermission> permissions
protected final Date timeInvited
protected final String previewUrl
public SharedFolderMetadata(AccessLevel accessType, boolean isTeamFolder, FolderPolicy policy, String name, String sharedFolderId, Date timeInvited, String previewUrl, 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
.previewUrl
- URL for displaying a web preview of the 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, String previewUrl)
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
.previewUrl
- URL for displaying a web preview of the shared folder.
Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public AccessLevel getAccessType()
getAccessType
in class SharedFolderMetadataBase
null
.public boolean getIsTeamFolder()
getIsTeamFolder
in class SharedFolderMetadataBase
public FolderPolicy getPolicy()
getPolicy
in class SharedFolderMetadataBase
null
.public String getName()
null
.public String getSharedFolderId()
null
.public Date getTimeInvited()
null
.public String getPreviewUrl()
null
.public Team getOwnerTeam()
getOwnerTeam
in class SharedFolderMetadataBase
null
if not present.public String getParentSharedFolderId()
getParentSharedFolderId
in class SharedFolderMetadataBase
null
if not present.public String getPathLower()
null
if not present.public List<FolderPermission> getPermissions()
null
if not present.public static SharedFolderMetadata.Builder newBuilder(AccessLevel accessType, boolean isTeamFolder, FolderPolicy policy, String name, String sharedFolderId, Date timeInvited, String previewUrl)
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
.previewUrl
- URL for displaying a web preview of the 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