Class UploadCreateParams.Body
-
- All Implemented Interfaces:
public final class UploadCreateParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
UploadCreateParams.Body.Builder
A builder for Body.
-
Method Summary
Modifier and Type Method Description final Long
bytes()
The number of bytes in the file you are uploading. final String
filename()
The name of the file to upload. final String
mimeType()
The MIME type of the file. final FilePurpose
purpose()
The intended purpose of the uploaded file. final JsonField<Long>
_bytes()
Returns the raw JSON value of bytes. final JsonField<String>
_filename()
Returns the raw JSON value of filename. final JsonField<String>
_mimeType()
Returns the raw JSON value of mimeType. final JsonField<FilePurpose>
_purpose()
Returns the raw JSON value of purpose. final Map<String, JsonValue>
_additionalProperties()
final UploadCreateParams.Body.Builder
toBuilder()
final UploadCreateParams.Body
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static UploadCreateParams.Body.Builder
builder()
Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
mimeType
final String mimeType()
The MIME type of the file.
This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.
-
purpose
final FilePurpose purpose()
The intended purpose of the uploaded file.
See the documentation on File purposes.
-
_bytes
final JsonField<Long> _bytes()
Returns the raw JSON value of bytes.
Unlike bytes, this method doesn't throw if the JSON field has an unexpected type.
-
_filename
final JsonField<String> _filename()
Returns the raw JSON value of filename.
Unlike filename, this method doesn't throw if the JSON field has an unexpected type.
-
_mimeType
final JsonField<String> _mimeType()
Returns the raw JSON value of mimeType.
Unlike mimeType, this method doesn't throw if the JSON field has an unexpected type.
-
_purpose
final JsonField<FilePurpose> _purpose()
Returns the raw JSON value of purpose.
Unlike purpose, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final UploadCreateParams.Body.Builder toBuilder()
-
validate
final UploadCreateParams.Body validate()
-
builder
final static UploadCreateParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.bytes() .filename() .mimeType() .purpose()
-
-
-
-