Package com.dropbox.core.v2.files
Class ThumbnailArg.Builder
- java.lang.Object
-
- com.dropbox.core.v2.files.ThumbnailArg.Builder
-
- Enclosing class:
- ThumbnailArg
public static class ThumbnailArg.Builder extends java.lang.ObjectBuilder forThumbnailArg.
-
-
Field Summary
Fields Modifier and Type Field Description protected ThumbnailFormatformatprotected ThumbnailModemodeprotected java.lang.Stringpathprotected ThumbnailSizesize
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThumbnailArgbuild()Builds an instance ofThumbnailArgconfigured with this builder's valuesThumbnailArg.BuilderwithFormat(ThumbnailFormat format)Set value for optional field.ThumbnailArg.BuilderwithMode(ThumbnailMode mode)Set value for optional field.ThumbnailArg.BuilderwithSize(ThumbnailSize size)Set value for optional field.
-
-
-
Field Detail
-
path
protected final java.lang.String path
-
format
protected ThumbnailFormat format
-
size
protected ThumbnailSize size
-
mode
protected ThumbnailMode mode
-
-
Method Detail
-
withFormat
public ThumbnailArg.Builder withFormat(ThumbnailFormat format)
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) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts. Must not benull. Defaults toThumbnailFormat.JPEGwhen set tonull.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
withSize
public ThumbnailArg.Builder withSize(ThumbnailSize size)
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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
withMode
public ThumbnailArg.Builder withMode(ThumbnailMode mode)
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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
build
public ThumbnailArg build()
Builds an instance ofThumbnailArgconfigured with this builder's values- Returns:
- new instance of
ThumbnailArg
-
-