Class ThumbnailArg

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

public class ThumbnailArg extends Object
  • Field Details

  • Constructor Details

    • ThumbnailArg

      public ThumbnailArg(@Nonnull String path, @Nonnull ThumbnailFormat format, @Nonnull ThumbnailSize size, @Nonnull ThumbnailMode mode, @Nonnull ThumbnailQuality quality, @Nullable Boolean excludeMediaInfo)
      Use newBuilder(java.lang.String) to create instances of this class without specifying values for all optional fields.
      Parameters:
      path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not be null.
      format - The format for the thumbnail image, jpeg (default), png, or webp. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts, and web for compression. Must not be null.
      size - The size for the thumbnail image. Must not be null.
      mode - How to resize and crop the image to achieve the desired size. Must not be null.
      quality - Quality of the thumbnail image. Must not be null.
      excludeMediaInfo - Normally, FileMetadata.getMediaInfo() is set for photo and video. When this flag is true, FileMetadata.getMediaInfo() is not populated. This improves latency for use cases where `media_info` is not needed.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • ThumbnailArg

      public ThumbnailArg(@Nonnull String path)
      None

      The default values for unset fields will be used.

      Parameters:
      path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getPath

      @Nonnull public String getPath()
      The path to the image file you want to thumbnail.
      Returns:
      value for this field, never null.
    • getFormat

      @Nonnull public ThumbnailFormat getFormat()
      The format for the thumbnail image, jpeg (default), png, or webp. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts, and web for compression.
      Returns:
      value for this field, or null if not present. Defaults to ThumbnailFormat.JPEG.
    • getSize

      @Nonnull public ThumbnailSize getSize()
      The size for the thumbnail image.
      Returns:
      value for this field, or null if not present. Defaults to ThumbnailSize.W64H64.
    • getMode

      @Nonnull public ThumbnailMode getMode()
      How to resize and crop the image to achieve the desired size.
      Returns:
      value for this field, or null if not present. Defaults to ThumbnailMode.STRICT.
    • getQuality

      @Nonnull public ThumbnailQuality getQuality()
      Quality of the thumbnail image.
      Returns:
      value for this field, or null if not present. Defaults to ThumbnailQuality.QUALITY_80.
    • getExcludeMediaInfo

      @Nullable public Boolean getExcludeMediaInfo()
      Normally, FileMetadata.getMediaInfo() is set for photo and video. When this flag is true, FileMetadata.getMediaInfo() is not populated. This improves latency for use cases where `media_info` is not needed.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static ThumbnailArg.Builder newBuilder(String path)
      Returns a new builder for creating an instance of this class.
      Parameters:
      path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)" 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