Package com.dropbox.core.v2.sharing
Class SharedLinkSettings.Builder
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedLinkSettings.Builder
-
- Enclosing class:
- SharedLinkSettings
public static class SharedLinkSettings.Builder extends java.lang.Object
Builder forSharedLinkSettings
.
-
-
Field Summary
Fields Modifier and Type Field Description protected RequestedLinkAccessLevel
access
protected LinkAudience
audience
protected java.util.Date
expires
protected java.lang.String
linkPassword
protected RequestedVisibility
requestedVisibility
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedLinkSettings
build()
Builds an instance ofSharedLinkSettings
configured with this builder's valuesSharedLinkSettings.Builder
withAccess(RequestedLinkAccessLevel access)
Set value for optional field.SharedLinkSettings.Builder
withAudience(LinkAudience audience)
Set value for optional field.SharedLinkSettings.Builder
withExpires(java.util.Date expires)
Set value for optional field.SharedLinkSettings.Builder
withLinkPassword(java.lang.String linkPassword)
Set value for optional field.SharedLinkSettings.Builder
withRequestedVisibility(RequestedVisibility requestedVisibility)
Set value for optional field.
-
-
-
Field Detail
-
requestedVisibility
protected RequestedVisibility requestedVisibility
-
linkPassword
protected java.lang.String linkPassword
-
expires
protected java.util.Date expires
-
audience
protected LinkAudience audience
-
access
protected RequestedLinkAccessLevel access
-
-
Method Detail
-
withRequestedVisibility
public SharedLinkSettings.Builder withRequestedVisibility(RequestedVisibility requestedVisibility)
Set value for optional field.- Parameters:
requestedVisibility
- The requested access for this shared link.- Returns:
- this builder
-
withLinkPassword
public SharedLinkSettings.Builder withLinkPassword(java.lang.String linkPassword)
Set value for optional field.- Parameters:
linkPassword
- IfSharedLinkSettings.getRequestedVisibility()
isRequestedVisibility.PASSWORD
this is needed to specify the password to access the link.- Returns:
- this builder
-
withExpires
public SharedLinkSettings.Builder withExpires(java.util.Date expires)
Set value for optional field.- Parameters:
expires
- Expiration time of the shared link. By default the link won't expire.- Returns:
- this builder
-
withAudience
public SharedLinkSettings.Builder withAudience(LinkAudience audience)
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
public SharedLinkSettings.Builder withAccess(RequestedLinkAccessLevel access)
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
-
build
public SharedLinkSettings build()
Builds an instance ofSharedLinkSettings
configured with this builder's values- Returns:
- new instance of
SharedLinkSettings
-
-