Class FileUploadParams.Body
-
- All Implemented Interfaces:
public final class FileUploadParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classFileUploadParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final InputStreamfile()The file to upload. final Optional<Long>expiresInSeconds()Seconds from upload until the file expires and its bytes become permanently unavailable. final MultipartField<InputStream>_file()Returns the raw multipart value of file. final MultipartField<Long>_expiresInSeconds()Returns the raw multipart value of expiresInSeconds. final Map<String, JsonValue>_additionalProperties()final FileUploadParams.Body.BuildertoBuilder()final FileUploadParams.Bodyvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static FileUploadParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. final static FileUploadParams.Bodyof(InputStream file)Returns an immutable instance of Body with the required file set to the given value. -
-
Method Detail
-
file
final InputStream file()
The file to upload. Only the final path component of the part's
filenameis kept; an absent or emptyfilenameis replaced withunnamedplus the extension for the file's storedmime_type, when known.
-
expiresInSeconds
final Optional<Long> expiresInSeconds()
Seconds from upload until the file expires and its bytes become permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).
-
_file
final MultipartField<InputStream> _file()
Returns the raw multipart value of file.
Unlike file, this method doesn't throw if the multipart field has an unexpected type.
-
_expiresInSeconds
final MultipartField<Long> _expiresInSeconds()
Returns the raw multipart value of expiresInSeconds.
Unlike expiresInSeconds, this method doesn't throw if the multipart field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final FileUploadParams.Body.Builder toBuilder()
-
validate
final FileUploadParams.Body validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static FileUploadParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.file()
-
of
final static FileUploadParams.Body of(InputStream file)
-
-
-
-