Class BetaFileMetadata
-
- All Implemented Interfaces:
public final class BetaFileMetadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaFileMetadata.BuilderA builder for BetaFileMetadata.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique object identifier. final OffsetDateTimecreatedAt()RFC 3339 datetime string representing when the file was created. final Stringfilename()Original filename of the uploaded file. final StringmimeType()MIME type of the file. final LongsizeBytes()Size of the file in bytes. final Optional<Boolean>downloadable()Whether the file can be downloaded. final Optional<OffsetDateTime>expiresAt()RFC 3339 datetime string representing when the file will expire and become unavailable for download. final Optional<BetaFileScope>scope()The scope of this file, indicating the context in which it was created (e.g., a session). final JsonValue_type()Object type. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<String>_filename()Returns the raw JSON value of filename. final JsonField<String>_mimeType()Returns the raw JSON value of mimeType. final JsonField<Long>_sizeBytes()Returns the raw JSON value of sizeBytes. final JsonField<Boolean>_downloadable()Returns the raw JSON value of downloadable. final JsonField<OffsetDateTime>_expiresAt()Returns the raw JSON value of expiresAt. final JsonField<BetaFileScope>_scope()Returns the raw JSON value of scope. final Map<String, JsonValue>_additionalProperties()final BetaFileMetadata.BuildertoBuilder()final BetaFileMetadatavalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaFileMetadata.Builderbuilder()Returns a mutable builder for constructing an instance of BetaFileMetadata. -
-
Method Detail
-
createdAt
final OffsetDateTime createdAt()
RFC 3339 datetime string representing when the file was created.
-
downloadable
final Optional<Boolean> downloadable()
Whether the file can be downloaded.
-
expiresAt
final Optional<OffsetDateTime> expiresAt()
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with
expires_in_seconds, this is the upload time plus that value.
-
scope
final Optional<BetaFileScope> scope()
The scope of this file, indicating the context in which it was created (e.g., a session).
-
_type
final JsonValue _type()
Object type.
For files, this 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).
-
_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.
-
_createdAt
final JsonField<OffsetDateTime> _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.
-
_mimeType
final JsonField<String> _mimeType()
Returns the raw JSON value of mimeType.
Unlike mimeType, this method doesn't throw if the JSON field has an unexpected type.
-
_sizeBytes
final JsonField<Long> _sizeBytes()
Returns the raw JSON value of sizeBytes.
Unlike sizeBytes, this method doesn't throw if the JSON field has an unexpected type.
-
_downloadable
final JsonField<Boolean> _downloadable()
Returns the raw JSON value of downloadable.
Unlike downloadable, this method doesn't throw if the JSON field has an unexpected type.
-
_expiresAt
final JsonField<OffsetDateTime> _expiresAt()
Returns the raw JSON value of expiresAt.
Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.
-
_scope
final JsonField<BetaFileScope> _scope()
Returns the raw JSON value of scope.
Unlike scope, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaFileMetadata.Builder toBuilder()
-
validate
final BetaFileMetadata validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaFileMetadata.Builder builder()
Returns a mutable builder for constructing an instance of BetaFileMetadata.
The following fields are required:
.id() .createdAt() .filename() .mimeType() .sizeBytes()
-
-
-
-