public static class SharedFileMetadata.Builder extends Object
SharedFileMetadata
.Modifier and Type | Field and Description |
---|---|
protected String |
id |
protected String |
name |
protected Team |
ownerTeam |
protected String |
parentSharedFolderId |
protected String |
pathDisplay |
protected String |
pathLower |
protected List<FilePermission> |
permissions |
protected FolderPolicy |
policy |
protected String |
previewUrl |
protected Date |
timeInvited |
Modifier | Constructor and Description |
---|---|
protected |
Builder(FolderPolicy policy,
String previewUrl,
String name,
String id) |
Modifier and Type | Method and Description |
---|---|
SharedFileMetadata |
build()
Builds an instance of
SharedFileMetadata configured with this
builder's values |
SharedFileMetadata.Builder |
withOwnerTeam(Team ownerTeam)
Set value for optional field.
|
SharedFileMetadata.Builder |
withParentSharedFolderId(String parentSharedFolderId)
Set value for optional field.
|
SharedFileMetadata.Builder |
withPathDisplay(String pathDisplay)
Set value for optional field.
|
SharedFileMetadata.Builder |
withPathLower(String pathLower)
Set value for optional field.
|
SharedFileMetadata.Builder |
withPermissions(List<FilePermission> permissions)
Set value for optional field.
|
SharedFileMetadata.Builder |
withTimeInvited(Date timeInvited)
Set value for optional field.
|
protected final FolderPolicy policy
protected final String previewUrl
protected final String name
protected final String id
protected List<FilePermission> permissions
protected Team ownerTeam
protected String parentSharedFolderId
protected String pathLower
protected String pathDisplay
protected Date timeInvited
protected Builder(FolderPolicy policy, String previewUrl, String name, String id)
public SharedFileMetadata.Builder withPermissions(List<FilePermission> permissions)
permissions
- The sharing permissions that requesting user has
on this file. This corresponds to the entries given in the actions
argument to DbxUserSharingRequests.getFileMetadataBatch(List,List)
or the
actions
argument to DbxUserSharingRequests.getFileMetadata(String,List)
. Must not
contain a null
item.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFileMetadata.Builder withOwnerTeam(Team ownerTeam)
ownerTeam
- The team that owns the file. This field is not
present if the file is not owned by a team.public SharedFileMetadata.Builder withParentSharedFolderId(String parentSharedFolderId)
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:]+
".IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFileMetadata.Builder withPathLower(String pathLower)
pathLower
- The lower-case full path of this file. Absent for
unmounted files.public SharedFileMetadata.Builder withPathDisplay(String pathDisplay)
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.public SharedFileMetadata.Builder withTimeInvited(Date timeInvited)
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.public SharedFileMetadata build()
SharedFileMetadata
configured with this
builder's valuesSharedFileMetadata