Package com.dropbox.core.v2.sharing
Class ExpectedSharedContentLinkMetadata
java.lang.Object
com.dropbox.core.v2.sharing.SharedContentLinkMetadataBase
com.dropbox.core.v2.sharing.ExpectedSharedContentLinkMetadata
The expected metadata of a shared link for a file or folder when a link is
first created for the content. Absent if the link already exists.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.dropbox.core.v2.sharing.SharedContentLinkMetadataBase
accessLevel, audienceOptions, audienceRestrictingSharedFolder, currentAudience, expiry, linkPermissions, passwordProtected -
Constructor Summary
ConstructorsConstructorDescriptionExpectedSharedContentLinkMetadata(List<LinkAudience> audienceOptions, LinkAudience currentAudience, List<LinkPermission> linkPermissions, boolean passwordProtected) The expected metadata of a shared link for a file or folder when a link is first created for the content.ExpectedSharedContentLinkMetadata(List<LinkAudience> audienceOptions, LinkAudience currentAudience, List<LinkPermission> linkPermissions, boolean passwordProtected, AccessLevel accessLevel, AudienceRestrictingSharedFolder audienceRestrictingSharedFolder, Date expiry) The expected metadata of a shared link for a file or folder when a link is first created for the content. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe access level on the link for this file.The audience options that are available for the content.The shared folder that prevents the link audience for this link from being more restrictive.The current audience of the link.Whether the link has an expiry set on it.A list of permissions for actions you can perform on the link.booleanWhether the link is protected by a password.inthashCode()newBuilder(List<LinkAudience> audienceOptions, LinkAudience currentAudience, List<LinkPermission> linkPermissions, boolean passwordProtected) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.
-
Constructor Details
-
ExpectedSharedContentLinkMetadata
public ExpectedSharedContentLinkMetadata(@Nonnull List<LinkAudience> audienceOptions, @Nonnull LinkAudience currentAudience, @Nonnull List<LinkPermission> linkPermissions, boolean passwordProtected) The expected metadata of a shared link for a file or folder when a link is first created for the content. Absent if the link already exists.The default values for unset fields will be used.
- Parameters:
audienceOptions- The audience options that are available for the content. Some audience options may be unavailable. For example, team_only may be unavailable if the content is not owned by a user on a team. The 'default' audience option is always available if the user can modify link settings. Must not contain anullitem and not benull.currentAudience- The current audience of the link. Must not benull.linkPermissions- A list of permissions for actions you can perform on the link. Must not contain anullitem and not benull.passwordProtected- Whether the link is protected by a password.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
Method Details
-
getAudienceOptions
The audience options that are available for the content. Some audience options may be unavailable. For example, team_only may be unavailable if the content is not owned by a user on a team. The 'default' audience option is always available if the user can modify link settings.- Overrides:
getAudienceOptionsin classSharedContentLinkMetadataBase- Returns:
- value for this field, never
null.
-
getCurrentAudience
The current audience of the link.- Overrides:
getCurrentAudiencein classSharedContentLinkMetadataBase- Returns:
- value for this field, never
null.
-
getLinkPermissions
A list of permissions for actions you can perform on the link.- Overrides:
getLinkPermissionsin classSharedContentLinkMetadataBase- Returns:
- value for this field, never
null.
-
getPasswordProtected
public boolean getPasswordProtected()Whether the link is protected by a password.- Overrides:
getPasswordProtectedin classSharedContentLinkMetadataBase- Returns:
- value for this field.
-
getAccessLevel
The access level on the link for this file.- Overrides:
getAccessLevelin classSharedContentLinkMetadataBase- Returns:
- value for this field, or
nullif not present.
-
getExpiry
Whether the link has an expiry set on it. A link with an expiry will have its audience changed to members when the expiry is reached.- Overrides:
getExpiryin classSharedContentLinkMetadataBase- Returns:
- value for this field, or
nullif not present.
-
newBuilder
public static ExpectedSharedContentLinkMetadata.Builder newBuilder(List<LinkAudience> audienceOptions, LinkAudience currentAudience, List<LinkPermission> linkPermissions, boolean passwordProtected) Returns a new builder for creating an instance of this class.- Parameters:
audienceOptions- The audience options that are available for the content. Some audience options may be unavailable. For example, team_only may be unavailable if the content is not owned by a user on a team. The 'default' audience option is always available if the user can modify link settings. Must not contain anullitem and not benull.currentAudience- The current audience of the link. Must not benull.linkPermissions- A list of permissions for actions you can perform on the link. Must not contain anullitem and not benull.passwordProtected- Whether the link is protected by a password.- Returns:
- builder for this class.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()- Overrides:
hashCodein classSharedContentLinkMetadataBase
-
equals
- Overrides:
equalsin classSharedContentLinkMetadataBase
-
toString
- Overrides:
toStringin classSharedContentLinkMetadataBase
-
toStringMultiline
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Overrides:
toStringMultilinein classSharedContentLinkMetadataBase- Returns:
- Formatted, multiline String representation of this object
-