Class FileObject
-
- All Implemented Interfaces:
public final class FileObjectThe
Fileobject represents a document that has been uploaded to OpenAI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classFileObject.BuilderA builder for FileObject.
public final classFileObject.PurposeThe intended purpose of the file. Supported values are
assistants,assistants_output,batch,batch_output,fine-tune,fine-tune-results,vision, anduser_data.public final classFileObject.StatusDeprecated. The current status of the file, which can be either
uploaded,processed, orerror.
-
Method Summary
Modifier and Type Method Description final Stringid()The file identifier, which can be referenced in the API endpoints. final Longbytes()The size of the file, in bytes. final LongcreatedAt()The Unix timestamp (in seconds) for when the file was created. final Stringfilename()The name of the file. final JsonValue_object_()The object type, which is always file.final FileObject.Purposepurpose()The intended purpose of the file. final FileObject.Statusstatus()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.BuildertoBuilder()final FileObjectvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static FileObject.Builderbuilder()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,vision, anduser_data.
-
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
errorfield 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()
-
-
-
-