Class ExpectedSharedContentLinkMetadata


  • public class ExpectedSharedContentLinkMetadata
    extends SharedContentLinkMetadataBase
    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.
    • Constructor Detail

      • ExpectedSharedContentLinkMetadata

        public ExpectedSharedContentLinkMetadata​(@Nonnull
                                                 java.util.List<LinkAudience> audienceOptions,
                                                 @Nonnull
                                                 LinkAudience currentAudience,
                                                 @Nonnull
                                                 java.util.List<LinkPermission> linkPermissions,
                                                 boolean passwordProtected,
                                                 @Nullable
                                                 AccessLevel accessLevel,
                                                 @Nullable
                                                 AudienceRestrictingSharedFolder audienceRestrictingSharedFolder,
                                                 @Nullable
                                                 java.util.Date expiry)
        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.

        Use newBuilder(java.util.List<com.dropbox.core.v2.sharing.LinkAudience>,com.dropbox.core.v2.sharing.LinkAudience,java.util.List<com.dropbox.core.v2.sharing.LinkPermission>,boolean) to create instances of this class without specifying values for all optional fields.

        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 a null item and not be null.
        currentAudience - The current audience of the link. Must not be null.
        linkPermissions - A list of permissions for actions you can perform on the link. Must not contain a null item and not be null.
        passwordProtected - Whether the link is protected by a password.
        accessLevel - The access level on the link for this file.
        audienceRestrictingSharedFolder - The shared folder that prevents the link audience for this link from being more restrictive.
        expiry - 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.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • ExpectedSharedContentLinkMetadata

        public ExpectedSharedContentLinkMetadata​(@Nonnull
                                                 java.util.List<LinkAudience> audienceOptions,
                                                 @Nonnull
                                                 LinkAudience currentAudience,
                                                 @Nonnull
                                                 java.util.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 a null item and not be null.
        currentAudience - The current audience of the link. Must not be null.
        linkPermissions - A list of permissions for actions you can perform on the link. Must not contain a null item and not be null.
        passwordProtected - Whether the link is protected by a password.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getAudienceOptions

        @Nonnull
        public java.util.List<LinkAudience> 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:
        getAudienceOptions in class SharedContentLinkMetadataBase
        Returns:
        value for this field, never null.
      • getExpiry

        @Nullable
        public java.util.Date 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:
        getExpiry in class SharedContentLinkMetadataBase
        Returns:
        value for this field, or null if not present.
      • newBuilder

        public static ExpectedSharedContentLinkMetadata.Builder newBuilder​(java.util.List<LinkAudience> audienceOptions,
                                                                           LinkAudience currentAudience,
                                                                           java.util.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 a null item and not be null.
        currentAudience - The current audience of the link. Must not be null.
        linkPermissions - A list of permissions for actions you can perform on the link. Must not contain a null item and not be null.
        passwordProtected - Whether the link is protected by a password.
        Returns:
        builder for this class.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Overrides:
        toStringMultiline in class SharedContentLinkMetadataBase
        Returns:
        Formatted, multiline String representation of this object