Class MinimalFileLinkMetadata

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

public class MinimalFileLinkMetadata extends Object
  • Field Details

    • url

      @Nonnull protected final String url
    • id

      @Nullable protected final String id
    • path

      @Nullable protected final String path
    • rev

      @Nonnull protected final String rev
  • Constructor Details

    • MinimalFileLinkMetadata

      public MinimalFileLinkMetadata(@Nonnull String url, @Nonnull String rev, @Nullable String id, @Nullable String path)
      Use newBuilder(java.lang.String,java.lang.String) to create instances of this class without specifying values for all optional fields.
      Parameters:
      url - URL of the shared link. Must not be null.
      rev - A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. Must have length of at least 9, match pattern "[0-9a-f]+", and not be null.
      id - Unique identifier for the linked file. Must have length of at least 1.
      path - Full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's Dropbox.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • MinimalFileLinkMetadata

      public MinimalFileLinkMetadata(@Nonnull String url, @Nonnull String rev)
      None

      The default values for unset fields will be used.

      Parameters:
      url - URL of the shared link. Must not be null.
      rev - A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. Must have length of at least 9, match pattern "[0-9a-f]+", and 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.
    • getRev

      @Nonnull public String getRev()
      A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.
      Returns:
      value for this field, never null.
    • getId

      @Nullable public String getId()
      Unique identifier for the linked file.
      Returns:
      value for this field, or null if not present.
    • getPath

      @Nullable public String getPath()
      Full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's Dropbox.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static MinimalFileLinkMetadata.Builder newBuilder(String url, String rev)
      Returns a new builder for creating an instance of this class.
      Parameters:
      url - URL of the shared link. Must not be null.
      rev - A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. Must have length of at least 9, match pattern "[0-9a-f]+", and 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