Package com.dropbox.core.v2.files
Class ThumbnailArg
java.lang.Object
com.dropbox.core.v2.files.ThumbnailArg
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Booleanprotected final ThumbnailFormatprotected final ThumbnailModeprotected final Stringprotected final ThumbnailQualityprotected final ThumbnailSize -
Constructor Summary
ConstructorsConstructorDescriptionThumbnailArg(String path) NoneThumbnailArg(String path, ThumbnailFormat format, ThumbnailSize size, ThumbnailMode mode, ThumbnailQuality quality, Boolean excludeMediaInfo) UsenewBuilder(java.lang.String)to create instances of this class without specifying values for all optional fields. -
Method Summary
Modifier and TypeMethodDescriptionbooleanNormally,FileMetadata.getMediaInfo()is set for photo and video.The format for the thumbnail image, jpeg (default), png, or webp.getMode()How to resize and crop the image to achieve the desired size.getPath()The path to the image file you want to thumbnail.Quality of the thumbnail image.getSize()The size for the thumbnail image.inthashCode()static ThumbnailArg.BuildernewBuilder(String path) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
path
-
format
-
size
-
mode
-
quality
-
excludeMediaInfo
-
-
Constructor Details
-
ThumbnailArg
public ThumbnailArg(@Nonnull String path, @Nonnull ThumbnailFormat format, @Nonnull ThumbnailSize size, @Nonnull ThumbnailMode mode, @Nonnull ThumbnailQuality quality, @Nullable Boolean excludeMediaInfo) UsenewBuilder(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 benull.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 benull.size- The size for the thumbnail image. Must not benull.mode- How to resize and crop the image to achieve the desired size. Must not benull.quality- Quality of the thumbnail image. Must not benull.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
NoneThe 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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Details
-
getPath
The path to the image file you want to thumbnail.- Returns:
- value for this field, never
null.
-
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
nullif not present. Defaults to ThumbnailFormat.JPEG.
-
getSize
The size for the thumbnail image.- Returns:
- value for this field, or
nullif not present. Defaults to ThumbnailSize.W64H64.
-
getMode
How to resize and crop the image to achieve the desired size.- Returns:
- value for this field, or
nullif not present. Defaults to ThumbnailMode.STRICT.
-
getQuality
Quality of the thumbnail image.- Returns:
- value for this field, or
nullif not present. Defaults to ThumbnailQuality.QUALITY_80.
-
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
nullif not present.
-
newBuilder
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 benull.- Returns:
- builder for this class.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-