Package com.dropbox.core.v2.sharing
Class SharedFolderMetadata.Builder
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedFolderMetadataBase.Builder
-
- com.dropbox.core.v2.sharing.SharedFolderMetadata.Builder
-
- Enclosing class:
- SharedFolderMetadata
public static class SharedFolderMetadata.Builder extends SharedFolderMetadataBase.Builder
Builder forSharedFolderMetadata
.
-
-
Field Summary
Fields Modifier and Type Field 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
-
Fields inherited from class com.dropbox.core.v2.sharing.SharedFolderMetadataBase.Builder
accessType, isInsideTeamFolder, isTeamFolder, ownerDisplayNames, ownerTeam, parentFolderName, parentSharedFolderId, pathLower
-
-
Constructor Summary
Constructors Modifier Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedFolderMetadata
build()
Builds an instance ofSharedFolderMetadata
configured with this builder's valuesSharedFolderMetadata.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.
-
-
-
Field Detail
-
name
protected final java.lang.String name
-
policy
protected final FolderPolicy policy
-
previewUrl
protected final java.lang.String previewUrl
-
sharedFolderId
protected final java.lang.String sharedFolderId
-
timeInvited
protected final java.util.Date timeInvited
-
linkMetadata
protected SharedContentLinkMetadata linkMetadata
-
permissions
protected java.util.List<FolderPermission> permissions
-
accessInheritance
protected AccessInheritance accessInheritance
-
-
Constructor Detail
-
Builder
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)
-
-
Method Detail
-
withLinkMetadata
public SharedFolderMetadata.Builder withLinkMetadata(SharedContentLinkMetadata linkMetadata)
Set value for optional field.- Parameters:
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.- Returns:
- this builder
-
withPermissions
public SharedFolderMetadata.Builder withPermissions(java.util.List<FolderPermission> permissions)
Set value for optional field.- Parameters:
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 anull
item.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withAccessInheritance
public SharedFolderMetadata.Builder withAccessInheritance(AccessInheritance accessInheritance)
Set value for optional field.If left unset or set to
null
, defaults toAccessInheritance.INHERIT
.- Parameters:
accessInheritance
- Whether the folder inherits its members from its parent. Must not benull
. Defaults toAccessInheritance.INHERIT
when set tonull
.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withOwnerDisplayNames
public SharedFolderMetadata.Builder withOwnerDisplayNames(java.util.List<java.lang.String> ownerDisplayNames)
Set value for optional field.- Overrides:
withOwnerDisplayNames
in classSharedFolderMetadataBase.Builder
- Parameters:
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 anull
item.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withOwnerTeam
public SharedFolderMetadata.Builder withOwnerTeam(Team ownerTeam)
Set value for optional field.- Overrides:
withOwnerTeam
in classSharedFolderMetadataBase.Builder
- Parameters:
ownerTeam
- The team that owns the folder. This field is not present if the folder is not owned by a team.- Returns:
- this builder
-
withParentSharedFolderId
public SharedFolderMetadata.Builder withParentSharedFolderId(java.lang.String parentSharedFolderId)
Set value for optional field.- Overrides:
withParentSharedFolderId
in classSharedFolderMetadataBase.Builder
- Parameters:
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:]+
".- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withPathLower
public SharedFolderMetadata.Builder withPathLower(java.lang.String pathLower)
Set value for optional field.- Overrides:
withPathLower
in classSharedFolderMetadataBase.Builder
- Parameters:
pathLower
- The lower-cased full path of this shared folder. Absent for unmounted folders.- Returns:
- this builder
-
withParentFolderName
public SharedFolderMetadata.Builder withParentFolderName(java.lang.String parentFolderName)
Set value for optional field.- Overrides:
withParentFolderName
in classSharedFolderMetadataBase.Builder
- Parameters:
parentFolderName
- Display name for the parent folder.- Returns:
- this builder
-
build
public SharedFolderMetadata build()
Builds an instance ofSharedFolderMetadata
configured with this builder's values- Overrides:
build
in classSharedFolderMetadataBase.Builder
- Returns:
- new instance of
SharedFolderMetadata
-
-