Package com.dropbox.core.v2.sharing
Class SharedLinkSettings.Builder
java.lang.Object
com.dropbox.core.v2.sharing.SharedLinkSettings.Builder
- Enclosing class:
SharedLinkSettings
Builder for
SharedLinkSettings.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RequestedLinkAccessLevelprotected Booleanprotected LinkAudienceprotected Dateprotected Stringprotected RequestedVisibilityprotected Boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance ofSharedLinkSettingsconfigured with this builder's valueswithAccess(RequestedLinkAccessLevel access) Set value for optional field.withAllowDownload(Boolean allowDownload) Set value for optional field.withAudience(LinkAudience audience) Set value for optional field.withExpires(Date expires) Set value for optional field.withLinkPassword(String linkPassword) Set value for optional field.withRequestedVisibility(RequestedVisibility requestedVisibility) Deprecated.withRequirePassword(Boolean requirePassword) Set value for optional field.
-
Field Details
-
requirePassword
-
linkPassword
-
expires
-
audience
-
access
-
requestedVisibility
-
allowDownload
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
withRequirePassword
Set value for optional field.- Parameters:
requirePassword- Boolean flag to enable or disable password protection.- Returns:
- this builder
-
withLinkPassword
Set value for optional field.- Parameters:
linkPassword- IfSharedLinkSettings.getRequirePassword()is true, this is needed to specify the password to access the link.- Returns:
- this builder
-
withExpires
Set value for optional field.- Parameters:
expires- Expiration time of the shared link. By default the link won't expire.- Returns:
- this builder
-
withAudience
Set value for optional field.- Parameters:
audience- The new audience who can benefit from the access level specified by the link's access level specified in the `link_access_level` field of `LinkPermissions`. This is used in conjunction with team policies and shared folder policies to determine the final effective audience type in the `effective_audience` field of `LinkPermissions.- Returns:
- this builder
-
withAccess
Set value for optional field.- Parameters:
access- Requested access level you want the audience to gain from this link. Note, modifying access level for an existing link is not supported.- Returns:
- this builder
-
withRequestedVisibility
@Deprecated public SharedLinkSettings.Builder withRequestedVisibility(RequestedVisibility requestedVisibility) Deprecated.Set value for optional field.- Parameters:
requestedVisibility- Field is deprecated. UseSharedLinkSettings.getAudience()instead. The requested access for this shared link.- Returns:
- this builder
-
withAllowDownload
Set value for optional field.- Parameters:
allowDownload- Boolean flag to allow or not download capabilities for shared links.- Returns:
- this builder
-
build
Builds an instance ofSharedLinkSettingsconfigured with this builder's values- Returns:
- new instance of
SharedLinkSettings
-