Class UploadCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class UploadCreateParams.Body.Builder
A builder for Body.
-
-
Method Summary
-
-
Method Detail
-
bytes
final UploadCreateParams.Body.Builder bytes(Long bytes)
The number of bytes in the file you are uploading.
-
bytes
final UploadCreateParams.Body.Builder bytes(JsonField<Long> bytes)
Sets Builder.bytes to an arbitrary JSON value.
You should usually call Builder.bytes with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
filename
final UploadCreateParams.Body.Builder filename(String filename)
The name of the file to upload.
-
filename
final UploadCreateParams.Body.Builder filename(JsonField<String> filename)
Sets Builder.filename to an arbitrary JSON value.
You should usually call Builder.filename with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
mimeType
final UploadCreateParams.Body.Builder mimeType(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.
-
mimeType
final UploadCreateParams.Body.Builder mimeType(JsonField<String> mimeType)
Sets Builder.mimeType to an arbitrary JSON value.
You should usually call Builder.mimeType with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
purpose
final UploadCreateParams.Body.Builder purpose(FilePurpose purpose)
The intended purpose of the uploaded file.
See the documentation on File purposes.
-
purpose
final UploadCreateParams.Body.Builder purpose(JsonField<FilePurpose> purpose)
Sets Builder.purpose to an arbitrary JSON value.
You should usually call Builder.purpose with a well-typed FilePurpose value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final UploadCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final UploadCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final UploadCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final UploadCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final UploadCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final UploadCreateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.bytes() .filename() .mimeType() .purpose()
-
-
-
-