Package com.dropbox.core.v2.files
Class ThumbnailArg
- java.lang.Object
-
- com.dropbox.core.v2.files.ThumbnailArg
-
public class ThumbnailArg extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThumbnailArg.Builder
Builder forThumbnailArg
.
-
Field Summary
Fields Modifier and Type Field Description protected ThumbnailFormat
format
protected ThumbnailMode
mode
protected java.lang.String
path
protected ThumbnailSize
size
-
Constructor Summary
Constructors Constructor Description ThumbnailArg(java.lang.String path)
NoneThumbnailArg(java.lang.String path, ThumbnailFormat format, ThumbnailSize size, ThumbnailMode mode)
UsenewBuilder(java.lang.String)
to create instances of this class without specifying values for all optional fields.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
ThumbnailFormat
getFormat()
The format for the thumbnail image, jpeg (default) or png.ThumbnailMode
getMode()
How to resize and crop the image to achieve the desired size.java.lang.String
getPath()
The path to the image file you want to thumbnail.ThumbnailSize
getSize()
The size for the thumbnail image.int
hashCode()
static ThumbnailArg.Builder
newBuilder(java.lang.String path)
Returns a new builder for creating an instance of this class.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
path
protected final java.lang.String path
-
format
protected final ThumbnailFormat format
-
size
protected final ThumbnailSize size
-
mode
protected final ThumbnailMode mode
-
-
Constructor Detail
-
ThumbnailArg
public ThumbnailArg(java.lang.String path, ThumbnailFormat format, ThumbnailSize size, ThumbnailMode mode)
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]+(/.*)?)
" and not benull
.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
.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
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
ThumbnailArg
public ThumbnailArg(java.lang.String path)
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]+(/.*)?)
" and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getPath
public java.lang.String getPath()
The path to the image file you want to thumbnail.- Returns:
- value for this field, never
null
.
-
getFormat
public ThumbnailFormat getFormat()
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.- Returns:
- value for this field, or
null
if not present. Defaults to ThumbnailFormat.JPEG.
-
getSize
public ThumbnailSize getSize()
The size for the thumbnail image.- Returns:
- value for this field, or
null
if not present. Defaults to ThumbnailSize.W64H64.
-
getMode
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.
-
newBuilder
public static ThumbnailArg.Builder newBuilder(java.lang.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]+(/.*)?)
" and not benull
.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public java.lang.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
-
-