Class FileObject
-
- All Implemented Interfaces:
public final class FileObject
The
File
object represents a document that has been uploaded to OpenAI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
FileObject.Builder
A builder for FileObject.
public final class
FileObject.Purpose
The intended purpose of the file. Supported values are
assistants
,assistants_output
,batch
,batch_output
,fine-tune
,fine-tune-results
andvision
.public final class
FileObject.Status
Deprecated. The current status of the file, which can be either
uploaded
,processed
, orerror
.
-
Method Summary
Modifier and Type Method Description final String
id()
The file identifier, which can be referenced in the API endpoints. final Long
bytes()
The size of the file, in bytes. final Long
createdAt()
The Unix timestamp (in seconds) for when the file was created. final String
filename()
The name of the file. final JsonValue
_object_()
The object type, which is always file
.final FileObject.Purpose
purpose()
The intended purpose of the file. final FileObject.Status
status()
Deprecated. final Optional<Long>
expiresAt()
The Unix timestamp (in seconds) for when the file will expire. final Optional<String>
statusDetails()
Deprecated. final JsonField<String>
_id()
Returns the raw JSON value of id. final JsonField<Long>
_bytes()
Returns the raw JSON value of bytes. final JsonField<Long>
_createdAt()
Returns the raw JSON value of createdAt. final JsonField<String>
_filename()
Returns the raw JSON value of filename. final JsonField<FileObject.Purpose>
_purpose()
Returns the raw JSON value of purpose. final JsonField<FileObject.Status>
_status()
Returns the raw JSON value of status. final JsonField<Long>
_expiresAt()
Returns the raw JSON value of expiresAt. final JsonField<String>
_statusDetails()
Returns the raw JSON value of statusDetails. final Map<String, JsonValue>
_additionalProperties()
final FileObject.Builder
toBuilder()
final FileObject
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static FileObject.Builder
builder()
Returns a mutable builder for constructing an instance of FileObject. -
-
Method Detail
-
_object_
final JsonValue _object_()
The object type, which is always
file
.Expected to always return the following:
JsonValue.from("file")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
purpose
final FileObject.Purpose purpose()
The intended purpose of the file. Supported values are
assistants
,assistants_output
,batch
,batch_output
,fine-tune
,fine-tune-results
andvision
.
-
status
@Deprecated(message = "deprecated") final FileObject.Status status()
Deprecated. The current status of the file, which can be either
uploaded
,processed
, orerror
.
-
expiresAt
final Optional<Long> expiresAt()
The Unix timestamp (in seconds) for when the file will expire.
-
statusDetails
@Deprecated(message = "deprecated") final Optional<String> statusDetails()
Deprecated. For details on why a fine-tuning training file failed validation, see the
error
field onfine_tuning.job
.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_createdAt
final JsonField<Long> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, 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.
-
_purpose
final JsonField<FileObject.Purpose> _purpose()
Returns the raw JSON value of purpose.
Unlike purpose, this method doesn't throw if the JSON field has an unexpected type.
-
_status
@Deprecated(message = "deprecated") final JsonField<FileObject.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_expiresAt
final JsonField<Long> _expiresAt()
Returns the raw JSON value of expiresAt.
Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.
-
_statusDetails
@Deprecated(message = "deprecated") final JsonField<String> _statusDetails()
Returns the raw JSON value of statusDetails.
Unlike statusDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final FileObject.Builder toBuilder()
-
validate
final FileObject validate()
-
builder
final static FileObject.Builder builder()
Returns a mutable builder for constructing an instance of FileObject.
The following fields are required:
.id() .bytes() .createdAt() .filename() .purpose() .status()
-
-
-
-