Class Upload.Builder
-
- All Implemented Interfaces:
public final class Upload.Builder
A builder for Upload.
-
-
Method Summary
Modifier and Type Method Description final Upload.Builder
id(String id)
The Upload unique identifier, which can be referenced in API endpoints. final Upload.Builder
id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value. final Upload.Builder
bytes(Long bytes)
The intended number of bytes to be uploaded. final Upload.Builder
bytes(JsonField<Long> bytes)
Sets Builder.bytes to an arbitrary JSON value. final Upload.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the Upload was created. final Upload.Builder
createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value. final Upload.Builder
expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the Upload will expire. final Upload.Builder
expiresAt(JsonField<Long> expiresAt)
Sets Builder.expiresAt to an arbitrary JSON value. final Upload.Builder
filename(String filename)
The name of the file to be uploaded. final Upload.Builder
filename(JsonField<String> filename)
Sets Builder.filename to an arbitrary JSON value. final Upload.Builder
object_(JsonValue object_)
Sets the field to an arbitrary JSON value. final Upload.Builder
purpose(String purpose)
The intended purpose of the file. final Upload.Builder
purpose(JsonField<String> purpose)
Sets Builder.purpose to an arbitrary JSON value. final Upload.Builder
status(Upload.Status status)
The status of the Upload. final Upload.Builder
status(JsonField<Upload.Status> status)
Sets Builder.status to an arbitrary JSON value. final Upload.Builder
file(FileObject file)
The File
object represents a document that has been uploaded to OpenAI.final Upload.Builder
file(Optional<FileObject> file)
Alias for calling Builder.file with file.orElse(null)
.final Upload.Builder
file(JsonField<FileObject> file)
Sets Builder.file to an arbitrary JSON value. final Upload.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final Upload.Builder
putAdditionalProperty(String key, JsonValue value)
final Upload.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final Upload.Builder
removeAdditionalProperty(String key)
final Upload.Builder
removeAllAdditionalProperties(Set<String> keys)
final Upload
build()
Returns an immutable instance of Upload. -
-
Method Detail
-
id
final Upload.Builder id(String id)
The Upload unique identifier, which can be referenced in API endpoints.
-
id
final Upload.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
bytes
final Upload.Builder bytes(Long bytes)
The intended number of bytes to be uploaded.
-
bytes
final Upload.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.
-
createdAt
final Upload.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the Upload was created.
-
createdAt
final Upload.Builder createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiresAt
final Upload.Builder expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the Upload will expire.
-
expiresAt
final Upload.Builder expiresAt(JsonField<Long> expiresAt)
Sets Builder.expiresAt to an arbitrary JSON value.
You should usually call Builder.expiresAt 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 Upload.Builder filename(String filename)
The name of the file to be uploaded.
-
filename
final Upload.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.
-
object_
final Upload.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("upload")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
purpose
final Upload.Builder purpose(String purpose)
The intended purpose of the file. Please refer here for acceptable values.
-
purpose
final Upload.Builder purpose(JsonField<String> purpose)
Sets Builder.purpose to an arbitrary JSON value.
You should usually call Builder.purpose with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final Upload.Builder status(Upload.Status status)
The status of the Upload.
-
status
final Upload.Builder status(JsonField<Upload.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
file
final Upload.Builder file(FileObject file)
The
File
object represents a document that has been uploaded to OpenAI.
-
file
final Upload.Builder file(Optional<FileObject> file)
Alias for calling Builder.file with
file.orElse(null)
.
-
file
final Upload.Builder file(JsonField<FileObject> file)
Sets Builder.file to an arbitrary JSON value.
You should usually call Builder.file with a well-typed FileObject value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final Upload.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Upload.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Upload.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Upload.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Upload.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-