Class SharedLinkFileInfo

java.lang.Object
com.dropbox.core.v2.files.SharedLinkFileInfo

public class SharedLinkFileInfo extends Object
  • Field Details

    • url

      @Nonnull protected final String url
    • path

      @Nullable protected final String path
    • password

      @Nullable protected final String password
  • Constructor Details

    • SharedLinkFileInfo

      public SharedLinkFileInfo(@Nonnull String url, @Nullable String path, @Nullable String password)
      Use newBuilder(java.lang.String) to create instances of this class without specifying values for all optional fields.
      Parameters:
      url - The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for. Must not be null.
      path - The path corresponding to a file in a shared link to a folder. Required for shared links to folders.
      password - Password for the shared link. Required for password-protected shared links to files unless it can be read from a cookie.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • SharedLinkFileInfo

      public SharedLinkFileInfo(@Nonnull String url)
      None

      The default values for unset fields will be used.

      Parameters:
      url - The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getUrl

      @Nonnull public String getUrl()
      The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for.
      Returns:
      value for this field, never null.
    • getPath

      @Nullable public String getPath()
      The path corresponding to a file in a shared link to a folder. Required for shared links to folders.
      Returns:
      value for this field, or null if not present.
    • getPassword

      @Nullable public String getPassword()
      Password for the shared link. Required for password-protected shared links to files unless it can be read from a cookie.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static SharedLinkFileInfo.Builder newBuilder(String url)
      Returns a new builder for creating an instance of this class.
      Parameters:
      url - The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for. Must not be null.
      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