Package com.dropbox.core.v2.files
Class ThumbnailArg.Builder
java.lang.Object
com.dropbox.core.v2.files.ThumbnailArg.Builder
- Enclosing class:
ThumbnailArg
Builder for
ThumbnailArg.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Booleanprotected ThumbnailFormatprotected ThumbnailModeprotected final Stringprotected ThumbnailQualityprotected ThumbnailSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance ofThumbnailArgconfigured with this builder's valueswithExcludeMediaInfo(Boolean excludeMediaInfo) Set value for optional field.withFormat(ThumbnailFormat format) Set value for optional field.withMode(ThumbnailMode mode) Set value for optional field.withQuality(ThumbnailQuality quality) Set value for optional field.withSize(ThumbnailSize size) Set value for optional field.
-
Field Details
-
path
-
format
-
size
-
mode
-
quality
-
excludeMediaInfo
-
-
Constructor Details
-
Builder
-
-
Method Details
-
withFormat
Set value for optional field.If left unset or set to
null, defaults toThumbnailFormat.JPEG.- Parameters:
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. Defaults toThumbnailFormat.JPEGwhen set tonull.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withSize
Set value for optional field.If left unset or set to
null, defaults toThumbnailSize.W64H64.- Parameters:
size- The size for the thumbnail image. Must not benull. Defaults toThumbnailSize.W64H64when set tonull.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withMode
Set value for optional field.If left unset or set to
null, defaults toThumbnailMode.STRICT.- Parameters:
mode- How to resize and crop the image to achieve the desired size. Must not benull. Defaults toThumbnailMode.STRICTwhen set tonull.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withQuality
Set value for optional field.If left unset or set to
null, defaults toThumbnailQuality.QUALITY_80.- Parameters:
quality- Quality of the thumbnail image. Must not benull. Defaults toThumbnailQuality.QUALITY_80when set tonull.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withExcludeMediaInfo
Set value for optional field.- Parameters:
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.- Returns:
- this builder
-
build
Builds an instance ofThumbnailArgconfigured with this builder's values- Returns:
- new instance of
ThumbnailArg
-