Class FileObject.Builder
-
- All Implemented Interfaces:
public final class FileObject.Builder
A builder for FileObject.
-
-
Method Summary
Modifier and Type Method Description final FileObject.Builder
id(String id)
The file identifier, which can be referenced in the API endpoints. final FileObject.Builder
id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value. final FileObject.Builder
bytes(Long bytes)
The size of the file, in bytes. final FileObject.Builder
bytes(JsonField<Long> bytes)
Sets Builder.bytes to an arbitrary JSON value. final FileObject.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the file was created. final FileObject.Builder
createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value. final FileObject.Builder
filename(String filename)
The name of the file. final FileObject.Builder
filename(JsonField<String> filename)
Sets Builder.filename to an arbitrary JSON value. final FileObject.Builder
object_(JsonValue object_)
Sets the field to an arbitrary JSON value. final FileObject.Builder
purpose(FileObject.Purpose purpose)
The intended purpose of the file. final FileObject.Builder
purpose(JsonField<FileObject.Purpose> purpose)
Sets Builder.purpose to an arbitrary JSON value. final FileObject.Builder
status(FileObject.Status status)
Deprecated. final FileObject.Builder
status(JsonField<FileObject.Status> status)
Sets Builder.status to an arbitrary JSON value. final FileObject.Builder
expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the file will expire. final FileObject.Builder
expiresAt(JsonField<Long> expiresAt)
Sets Builder.expiresAt to an arbitrary JSON value. final FileObject.Builder
statusDetails(String statusDetails)
Deprecated. final FileObject.Builder
statusDetails(JsonField<String> statusDetails)
Sets Builder.statusDetails to an arbitrary JSON value. final FileObject.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final FileObject.Builder
putAdditionalProperty(String key, JsonValue value)
final FileObject.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final FileObject.Builder
removeAdditionalProperty(String key)
final FileObject.Builder
removeAllAdditionalProperties(Set<String> keys)
final FileObject
build()
Returns an immutable instance of FileObject. -
-
Method Detail
-
id
final FileObject.Builder id(String id)
The file identifier, which can be referenced in the API endpoints.
-
id
final FileObject.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 FileObject.Builder bytes(Long bytes)
The size of the file, in bytes.
-
bytes
final FileObject.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 FileObject.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the file was created.
-
createdAt
final FileObject.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.
-
filename
final FileObject.Builder filename(String filename)
The name of the file.
-
filename
final FileObject.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 FileObject.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("file")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
purpose
final FileObject.Builder purpose(FileObject.Purpose purpose)
The intended purpose of the file. Supported values are
assistants
,assistants_output
,batch
,batch_output
,fine-tune
,fine-tune-results
andvision
.
-
purpose
final FileObject.Builder purpose(JsonField<FileObject.Purpose> purpose)
Sets Builder.purpose to an arbitrary JSON value.
You should usually call Builder.purpose with a well-typed Purpose value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
@Deprecated(message = "deprecated") final FileObject.Builder status(FileObject.Status status)
Deprecated. The current status of the file, which can be either
uploaded
,processed
, orerror
.
-
status
@Deprecated(message = "deprecated") final FileObject.Builder status(JsonField<FileObject.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.
-
expiresAt
final FileObject.Builder expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the file will expire.
-
expiresAt
final FileObject.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.
-
statusDetails
@Deprecated(message = "deprecated") final FileObject.Builder statusDetails(String statusDetails)
Deprecated. For details on why a fine-tuning training file failed validation, see the
error
field onfine_tuning.job
.
-
statusDetails
@Deprecated(message = "deprecated") final FileObject.Builder statusDetails(JsonField<String> statusDetails)
Sets Builder.statusDetails to an arbitrary JSON value.
You should usually call Builder.statusDetails with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final FileObject.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final FileObject.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final FileObject.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final FileObject.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final FileObject.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final FileObject build()
Returns an immutable instance of FileObject.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .bytes() .createdAt() .filename() .purpose() .status()
-
-
-
-