public static class SharedFolderMetadata.Builder extends SharedFolderMetadataBase.Builder
SharedFolderMetadata
.Modifier and Type | Field and Description |
---|---|
protected AccessInheritance |
accessInheritance |
protected SharedContentLinkMetadata |
linkMetadata |
protected java.lang.String |
name |
protected java.util.List<FolderPermission> |
permissions |
protected FolderPolicy |
policy |
protected java.lang.String |
previewUrl |
protected java.lang.String |
sharedFolderId |
protected java.util.Date |
timeInvited |
accessType, isInsideTeamFolder, isTeamFolder, ownerDisplayNames, ownerTeam, parentFolderName, parentSharedFolderId, pathLower
Modifier | Constructor and Description |
---|---|
protected |
Builder(AccessLevel accessType,
boolean isInsideTeamFolder,
boolean isTeamFolder,
java.lang.String name,
FolderPolicy policy,
java.lang.String previewUrl,
java.lang.String sharedFolderId,
java.util.Date timeInvited) |
Modifier and Type | Method and Description |
---|---|
SharedFolderMetadata |
build()
Builds an instance of
SharedFolderMetadata configured with
this builder's values |
SharedFolderMetadata.Builder |
withAccessInheritance(AccessInheritance accessInheritance)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withLinkMetadata(SharedContentLinkMetadata linkMetadata)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withOwnerDisplayNames(java.util.List<java.lang.String> ownerDisplayNames)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withOwnerTeam(Team ownerTeam)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withParentFolderName(java.lang.String parentFolderName)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withParentSharedFolderId(java.lang.String parentSharedFolderId)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withPathLower(java.lang.String pathLower)
Set value for optional field.
|
SharedFolderMetadata.Builder |
withPermissions(java.util.List<FolderPermission> permissions)
Set value for optional field.
|
protected final java.lang.String name
protected final FolderPolicy policy
protected final java.lang.String previewUrl
protected final java.lang.String sharedFolderId
protected final java.util.Date timeInvited
protected SharedContentLinkMetadata linkMetadata
protected java.util.List<FolderPermission> permissions
protected AccessInheritance accessInheritance
protected Builder(AccessLevel accessType, boolean isInsideTeamFolder, boolean isTeamFolder, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl, java.lang.String sharedFolderId, java.util.Date timeInvited)
public SharedFolderMetadata.Builder withLinkMetadata(SharedContentLinkMetadata linkMetadata)
linkMetadata
- The metadata of the shared content link to this
shared folder. Absent if there is no link on the folder. This is
for an unreleased feature so it may not be returned yet.public SharedFolderMetadata.Builder withPermissions(java.util.List<FolderPermission> permissions)
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.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFolderMetadata.Builder withAccessInheritance(AccessInheritance accessInheritance)
If left unset or set to null
, defaults to AccessInheritance.INHERIT
.
accessInheritance
- Whether the folder inherits its members
from its parent. Must not be null
. Defaults to AccessInheritance.INHERIT
when set to null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFolderMetadata.Builder withOwnerDisplayNames(java.util.List<java.lang.String> ownerDisplayNames)
withOwnerDisplayNames
in class SharedFolderMetadataBase.Builder
ownerDisplayNames
- The display names of the users that own the
folder. If the folder is part of a team folder, the display names
of the team admins are also included. Absent if the owner display
names cannot be fetched. Must not contain a null
item.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFolderMetadata.Builder withOwnerTeam(Team ownerTeam)
withOwnerTeam
in class SharedFolderMetadataBase.Builder
ownerTeam
- The team that owns the folder. This field is not
present if the folder is not owned by a team.public SharedFolderMetadata.Builder withParentSharedFolderId(java.lang.String parentSharedFolderId)
withParentSharedFolderId
in class SharedFolderMetadataBase.Builder
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:]+
".java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFolderMetadata.Builder withPathLower(java.lang.String pathLower)
withPathLower
in class SharedFolderMetadataBase.Builder
pathLower
- The lower-cased full path of this shared folder.
Absent for unmounted folders.public SharedFolderMetadata.Builder withParentFolderName(java.lang.String parentFolderName)
withParentFolderName
in class SharedFolderMetadataBase.Builder
parentFolderName
- Display name for the parent folder.public SharedFolderMetadata build()
SharedFolderMetadata
configured with
this builder's valuesbuild
in class SharedFolderMetadataBase.Builder
SharedFolderMetadata