Class LinkMetadata

java.lang.Object
com.dropbox.core.v2.sharing.LinkMetadata
Direct Known Subclasses:
CollectionLinkMetadata, PathLinkMetadata

public class LinkMetadata extends Object
Metadata for a shared link. This can be either a PathLinkMetadata or CollectionLinkMetadata.
  • Field Details

    • url

      @Nonnull protected final String url
    • visibility

      @Nonnull protected final Visibility visibility
    • expires

      @Nullable protected final Date expires
  • Constructor Details

    • LinkMetadata

      public LinkMetadata(@Nonnull String url, @Nonnull Visibility visibility, @Nullable Date expires)
      Metadata for a shared link. This can be either a PathLinkMetadata or CollectionLinkMetadata.
      Parameters:
      url - URL of the shared link. Must not be null.
      visibility - Who can access the link. Must not be null.
      expires - Expiration time, if set. By default the link won't expire.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • LinkMetadata

      public LinkMetadata(@Nonnull String url, @Nonnull Visibility visibility)
      Metadata for a shared link. This can be either a PathLinkMetadata or CollectionLinkMetadata.

      The default values for unset fields will be used.

      Parameters:
      url - URL of the shared link. Must not be null.
      visibility - Who can access the link. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getUrl

      @Nonnull public String getUrl()
      URL of the shared link.
      Returns:
      value for this field, never null.
    • getVisibility

      @Nonnull public Visibility getVisibility()
      Who can access the link.
      Returns:
      value for this field, never null.
    • getExpires

      @Nullable public Date getExpires()
      Expiration time, if set. By default the link won't expire.
      Returns:
      value for this field, or null if not present.
    • 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