Class UploadConstraints
-
- All Implemented Interfaces:
public final class UploadConstraintsConstraints applied to a file upload, returned alongside the upload URL so clients can validate before uploading
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUploadConstraints.BuilderA builder for UploadConstraints.
-
Method Summary
Modifier and Type Method Description final List<String>acceptedMimeTypes()MIME types accepted for the upload final LongmaxSizeBytes()Maximum accepted file size, in bytes final JsonField<List<String>>_acceptedMimeTypes()Returns the raw JSON value of acceptedMimeTypes. final JsonField<Long>_maxSizeBytes()Returns the raw JSON value of maxSizeBytes. final Map<String, JsonValue>_additionalProperties()final UploadConstraints.BuildertoBuilder()final UploadConstraintsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static UploadConstraints.Builderbuilder()Returns a mutable builder for constructing an instance of UploadConstraints. -
-
Method Detail
-
acceptedMimeTypes
final List<String> acceptedMimeTypes()
MIME types accepted for the upload
-
maxSizeBytes
final Long maxSizeBytes()
Maximum accepted file size, in bytes
-
_acceptedMimeTypes
final JsonField<List<String>> _acceptedMimeTypes()
Returns the raw JSON value of acceptedMimeTypes.
Unlike acceptedMimeTypes, this method doesn't throw if the JSON field has an unexpected type.
-
_maxSizeBytes
final JsonField<Long> _maxSizeBytes()
Returns the raw JSON value of maxSizeBytes.
Unlike maxSizeBytes, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final UploadConstraints.Builder toBuilder()
-
validate
final UploadConstraints 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 UploadConstraints.Builder builder()
Returns a mutable builder for constructing an instance of UploadConstraints.
The following fields are required:
.acceptedMimeTypes() .maxSizeBytes()
-
-
-
-