Package com.dropbox.core.v2.sharing
Class FileLinkMetadata.Builder
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedLinkMetadata.Builder
-
- com.dropbox.core.v2.sharing.FileLinkMetadata.Builder
-
- Enclosing class:
- FileLinkMetadata
public static class FileLinkMetadata.Builder extends SharedLinkMetadata.Builder
Builder forFileLinkMetadata
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Date
clientModified
protected java.lang.String
rev
protected java.util.Date
serverModified
protected long
size
-
Fields inherited from class com.dropbox.core.v2.sharing.SharedLinkMetadata.Builder
contentOwnerTeamInfo, expires, id, linkPermissions, name, pathLower, teamMemberInfo, url
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileLinkMetadata
build()
Builds an instance ofFileLinkMetadata
configured with this builder's valuesFileLinkMetadata.Builder
withContentOwnerTeamInfo(Team contentOwnerTeamInfo)
Set value for optional field.FileLinkMetadata.Builder
withExpires(java.util.Date expires)
Set value for optional field.FileLinkMetadata.Builder
withId(java.lang.String id)
Set value for optional field.FileLinkMetadata.Builder
withPathLower(java.lang.String pathLower)
Set value for optional field.FileLinkMetadata.Builder
withTeamMemberInfo(TeamMemberInfo teamMemberInfo)
Set value for optional field.
-
-
-
Constructor Detail
-
Builder
protected Builder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)
-
-
Method Detail
-
withId
public FileLinkMetadata.Builder withId(java.lang.String id)
Set value for optional field.- Overrides:
withId
in classSharedLinkMetadata.Builder
- Parameters:
id
- A unique identifier for the linked file. Must have length of at least 1.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withExpires
public FileLinkMetadata.Builder withExpires(java.util.Date expires)
Set value for optional field.- Overrides:
withExpires
in classSharedLinkMetadata.Builder
- Parameters:
expires
- Expiration time, if set. By default the link won't expire.- Returns:
- this builder
-
withPathLower
public FileLinkMetadata.Builder withPathLower(java.lang.String pathLower)
Set value for optional field.- Overrides:
withPathLower
in classSharedLinkMetadata.Builder
- Parameters:
pathLower
- The lowercased full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's dropbox.- Returns:
- this builder
-
withTeamMemberInfo
public FileLinkMetadata.Builder withTeamMemberInfo(TeamMemberInfo teamMemberInfo)
Set value for optional field.- Overrides:
withTeamMemberInfo
in classSharedLinkMetadata.Builder
- Parameters:
teamMemberInfo
- The team membership information of the link's owner. This field will only be present if the link's owner is a team member.- Returns:
- this builder
-
withContentOwnerTeamInfo
public FileLinkMetadata.Builder withContentOwnerTeamInfo(Team contentOwnerTeamInfo)
Set value for optional field.- Overrides:
withContentOwnerTeamInfo
in classSharedLinkMetadata.Builder
- Parameters:
contentOwnerTeamInfo
- The team information of the content's owner. This field will only be present if the content's owner is a team member and the content's owner team is different from the link's owner team.- Returns:
- this builder
-
build
public FileLinkMetadata build()
Builds an instance ofFileLinkMetadata
configured with this builder's values- Overrides:
build
in classSharedLinkMetadata.Builder
- Returns:
- new instance of
FileLinkMetadata
-
-