Class SharedContentLinkMetadataBase

java.lang.Object
com.dropbox.core.v2.sharing.SharedContentLinkMetadataBase
Direct Known Subclasses:
ExpectedSharedContentLinkMetadata, SharedContentLinkMetadata

public class SharedContentLinkMetadataBase extends Object
  • Field Details

    • accessLevel

      @Nullable protected final AccessLevel accessLevel
    • audienceOptions

      @Nonnull protected final List<LinkAudience> audienceOptions
    • audienceRestrictingSharedFolder

      @Nullable protected final AudienceRestrictingSharedFolder audienceRestrictingSharedFolder
    • currentAudience

      @Nonnull protected final LinkAudience currentAudience
    • expiry

      @Nullable protected final Date expiry
    • linkPermissions

      @Nonnull protected final List<LinkPermission> linkPermissions
    • passwordProtected

      protected final boolean passwordProtected
  • Constructor Details

    • SharedContentLinkMetadataBase

      public SharedContentLinkMetadataBase(@Nonnull List<LinkAudience> audienceOptions, @Nonnull LinkAudience currentAudience, @Nonnull List<LinkPermission> linkPermissions, boolean passwordProtected, @Nullable AccessLevel accessLevel, @Nullable AudienceRestrictingSharedFolder audienceRestrictingSharedFolder, @Nullable Date expiry)
      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:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • SharedContentLinkMetadataBase

      public SharedContentLinkMetadataBase(@Nonnull List<LinkAudience> audienceOptions, @Nonnull LinkAudience currentAudience, @Nonnull List<LinkPermission> linkPermissions, boolean passwordProtected)
      None

      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:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getAudienceOptions

      @Nonnull public 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.
      Returns:
      value for this field, never null.
    • getCurrentAudience

      @Nonnull public LinkAudience getCurrentAudience()
      The current audience of the link.
      Returns:
      value for this field, never null.
    • getLinkPermissions

      @Nonnull public List<LinkPermission> getLinkPermissions()
      A list of permissions for actions you can perform on the link.
      Returns:
      value for this field, never null.
    • getPasswordProtected

      public boolean getPasswordProtected()
      Whether the link is protected by a password.
      Returns:
      value for this field.
    • getAccessLevel

      @Nullable public AccessLevel getAccessLevel()
      The access level on the link for this file.
      Returns:
      value for this field, or null if not present.
    • getAudienceRestrictingSharedFolder

      @Nullable public AudienceRestrictingSharedFolder getAudienceRestrictingSharedFolder()
      The shared folder that prevents the link audience for this link from being more restrictive.
      Returns:
      value for this field, or null if not present.
    • getExpiry

      @Nullable public 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.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static SharedContentLinkMetadataBase.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 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:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

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

      The returned String may contain newlines.

      Returns:
      Formatted, multiline String representation of this object