Package com.dropbox.core.v2.sharing
Class SharedLinkMetadata.Builder
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedLinkMetadata.Builder
-
- Direct Known Subclasses:
FileLinkMetadata.Builder
,FolderLinkMetadata.Builder
- Enclosing class:
- SharedLinkMetadata
public static class SharedLinkMetadata.Builder extends java.lang.Object
Builder forSharedLinkMetadata
.
-
-
Field Summary
Fields Modifier and Type Field Description protected Team
contentOwnerTeamInfo
protected java.util.Date
expires
protected java.lang.String
id
protected LinkPermissions
linkPermissions
protected java.lang.String
name
protected java.lang.String
pathLower
protected TeamMemberInfo
teamMemberInfo
protected java.lang.String
url
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedLinkMetadata
build()
Builds an instance ofSharedLinkMetadata
configured with this builder's valuesSharedLinkMetadata.Builder
withContentOwnerTeamInfo(Team contentOwnerTeamInfo)
Set value for optional field.SharedLinkMetadata.Builder
withExpires(java.util.Date expires)
Set value for optional field.SharedLinkMetadata.Builder
withId(java.lang.String id)
Set value for optional field.SharedLinkMetadata.Builder
withPathLower(java.lang.String pathLower)
Set value for optional field.SharedLinkMetadata.Builder
withTeamMemberInfo(TeamMemberInfo teamMemberInfo)
Set value for optional field.
-
-
-
Field Detail
-
url
protected final java.lang.String url
-
name
protected final java.lang.String name
-
linkPermissions
protected final LinkPermissions linkPermissions
-
id
protected java.lang.String id
-
expires
protected java.util.Date expires
-
pathLower
protected java.lang.String pathLower
-
teamMemberInfo
protected TeamMemberInfo teamMemberInfo
-
contentOwnerTeamInfo
protected Team contentOwnerTeamInfo
-
-
Constructor Detail
-
Builder
protected Builder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions)
-
-
Method Detail
-
withId
public SharedLinkMetadata.Builder withId(java.lang.String id)
Set value for optional field.- 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 SharedLinkMetadata.Builder withExpires(java.util.Date expires)
Set value for optional field.- Parameters:
expires
- Expiration time, if set. By default the link won't expire.- Returns:
- this builder
-
withPathLower
public SharedLinkMetadata.Builder withPathLower(java.lang.String pathLower)
Set value for optional field.- 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 SharedLinkMetadata.Builder withTeamMemberInfo(TeamMemberInfo teamMemberInfo)
Set value for optional field.- 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 SharedLinkMetadata.Builder withContentOwnerTeamInfo(Team contentOwnerTeamInfo)
Set value for optional field.- 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 SharedLinkMetadata build()
Builds an instance ofSharedLinkMetadata
configured with this builder's values- Returns:
- new instance of
SharedLinkMetadata
-
-