Package com.dropbox.core.v2.sharing
Class SharedFileMetadata.Builder
- java.lang.Object
- 
- com.dropbox.core.v2.sharing.SharedFileMetadata.Builder
 
- 
- Enclosing class:
- SharedFileMetadata
 
 public static class SharedFileMetadata.Builder extends java.lang.ObjectBuilder forSharedFileMetadata.
- 
- 
Field SummaryFields Modifier and Type Field Description protected AccessLevelaccessTypeprotected ExpectedSharedContentLinkMetadataexpectedLinkMetadataprotected java.lang.Stringidprotected SharedContentLinkMetadatalinkMetadataprotected java.lang.Stringnameprotected java.util.List<java.lang.String>ownerDisplayNamesprotected TeamownerTeamprotected java.lang.StringparentSharedFolderIdprotected java.lang.StringpathDisplayprotected java.lang.StringpathLowerprotected java.util.List<FilePermission>permissionsprotected FolderPolicypolicyprotected java.lang.StringpreviewUrlprotected java.util.DatetimeInvited
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedBuilder(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedFileMetadatabuild()Builds an instance ofSharedFileMetadataconfigured with this builder's valuesSharedFileMetadata.BuilderwithAccessType(AccessLevel accessType)Set value for optional field.SharedFileMetadata.BuilderwithExpectedLinkMetadata(ExpectedSharedContentLinkMetadata expectedLinkMetadata)Set value for optional field.SharedFileMetadata.BuilderwithLinkMetadata(SharedContentLinkMetadata linkMetadata)Set value for optional field.SharedFileMetadata.BuilderwithOwnerDisplayNames(java.util.List<java.lang.String> ownerDisplayNames)Set value for optional field.SharedFileMetadata.BuilderwithOwnerTeam(Team ownerTeam)Set value for optional field.SharedFileMetadata.BuilderwithParentSharedFolderId(java.lang.String parentSharedFolderId)Set value for optional field.SharedFileMetadata.BuilderwithPathDisplay(java.lang.String pathDisplay)Set value for optional field.SharedFileMetadata.BuilderwithPathLower(java.lang.String pathLower)Set value for optional field.SharedFileMetadata.BuilderwithPermissions(java.util.List<FilePermission> permissions)Set value for optional field.SharedFileMetadata.BuilderwithTimeInvited(java.util.Date timeInvited)Set value for optional field.
 
- 
- 
- 
Field Detail- 
idprotected final java.lang.String id 
 - 
nameprotected final java.lang.String name 
 - 
policyprotected final FolderPolicy policy 
 - 
previewUrlprotected final java.lang.String previewUrl 
 - 
accessTypeprotected AccessLevel accessType 
 - 
expectedLinkMetadataprotected ExpectedSharedContentLinkMetadata expectedLinkMetadata 
 - 
linkMetadataprotected SharedContentLinkMetadata linkMetadata 
 - 
ownerDisplayNamesprotected java.util.List<java.lang.String> ownerDisplayNames 
 - 
ownerTeamprotected Team ownerTeam 
 - 
parentSharedFolderIdprotected java.lang.String parentSharedFolderId 
 - 
pathDisplayprotected java.lang.String pathDisplay 
 - 
pathLowerprotected java.lang.String pathLower 
 - 
permissionsprotected java.util.List<FilePermission> permissions 
 - 
timeInvitedprotected java.util.Date timeInvited 
 
- 
 - 
Constructor Detail- 
Builderprotected Builder(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl)
 
- 
 - 
Method Detail- 
withAccessTypepublic SharedFileMetadata.Builder withAccessType(AccessLevel accessType) Set value for optional field.- Parameters:
- accessType- The current user's access level for this shared file.
- Returns:
- this builder
 
 - 
withExpectedLinkMetadatapublic SharedFileMetadata.Builder withExpectedLinkMetadata(ExpectedSharedContentLinkMetadata expectedLinkMetadata) Set value for optional field.- Parameters:
- expectedLinkMetadata- The expected metadata of the link associated for the file when it is first shared. Absent if the link already exists. This is for an unreleased feature so it may not be returned yet.
- Returns:
- this builder
 
 - 
withLinkMetadatapublic SharedFileMetadata.Builder withLinkMetadata(SharedContentLinkMetadata linkMetadata) Set value for optional field.- Parameters:
- linkMetadata- The metadata of the link associated for the file. This is for an unreleased feature so it may not be returned yet.
- Returns:
- this builder
 
 - 
withOwnerDisplayNamespublic SharedFileMetadata.Builder withOwnerDisplayNames(java.util.List<java.lang.String> ownerDisplayNames) Set value for optional field.- Parameters:
- ownerDisplayNames- The display names of the users that own the file. If the file 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- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withOwnerTeampublic SharedFileMetadata.Builder withOwnerTeam(Team ownerTeam) Set value for optional field.- Parameters:
- ownerTeam- The team that owns the file. This field is not present if the file is not owned by a team.
- Returns:
- this builder
 
 - 
withParentSharedFolderIdpublic SharedFileMetadata.Builder withParentSharedFolderId(java.lang.String parentSharedFolderId) Set value for optional field.- Parameters:
- parentSharedFolderId- The ID of the parent shared folder. This field is present only if the file is contained within a shared folder. Must match pattern "- [-_0-9a-zA-Z:]+".
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withPathDisplaypublic SharedFileMetadata.Builder withPathDisplay(java.lang.String pathDisplay) Set value for optional field.- Parameters:
- pathDisplay- The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1. Absent for unmounted files.
- Returns:
- this builder
 
 - 
withPathLowerpublic SharedFileMetadata.Builder withPathLower(java.lang.String pathLower) Set value for optional field.- Parameters:
- pathLower- The lower-case full path of this file. Absent for unmounted files.
- Returns:
- this builder
 
 - 
withPermissionspublic SharedFileMetadata.Builder withPermissions(java.util.List<FilePermission> permissions) Set value for optional field.- Parameters:
- permissions- The sharing permissions that requesting user has on this file. This corresponds to the entries given in the- actionsargument to- DbxUserSharingRequests.getFileMetadataBatch(List,List)or the- actionsargument to- DbxUserSharingRequests.getFileMetadata(String,List). Must not contain a- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withTimeInvitedpublic SharedFileMetadata.Builder withTimeInvited(java.util.Date timeInvited) Set value for optional field.- Parameters:
- timeInvited- Timestamp indicating when the current user was invited to this shared file. If the user was not invited to the shared file, the timestamp will indicate when the user was invited to the parent shared folder. This value may be absent.
- Returns:
- this builder
 
 - 
buildpublic SharedFileMetadata build() Builds an instance ofSharedFileMetadataconfigured with this builder's values- Returns:
- new instance of SharedFileMetadata
 
 
- 
 
-