Class: Anthropic::Models::Beta::BetaFileMetadata
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaFileMetadata
- Defined in:
- lib/anthropic/models/beta/beta_file_metadata.rb,
sig/anthropic/models/beta/beta_file_metadata.rbs
Overview
Instance Attribute Summary collapse
-
#created_at ⇒ Time
RFC 3339 datetime string representing when the file was created.
-
#downloadable ⇒ Boolean?
Whether the file can be downloaded.
-
#expires_at ⇒ Time?
RFC 3339 datetime string representing when the file will expire and become unavailable for download.
-
#filename ⇒ String
Original filename of the uploaded file.
-
#id ⇒ String
Unique object identifier.
-
#mime_type ⇒ String
MIME type of the file.
-
#scope ⇒ Anthropic::Models::Beta::BetaFileScope?
The scope of this file, indicating the context in which it was created (e.g., a session).
-
#size_bytes ⇒ Integer
Size of the file in bytes.
-
#type ⇒ Symbol, :file
Object type.
Instance Method Summary collapse
-
#initialize ⇒ BetaFileMetadata
constructor
A new instance of BetaFileMetadata.
- #to_hash ⇒ { id: String, created_at: Time, filename: String, mime_type: String, size_bytes: Integer, type: :file, downloadable: bool, expires_at: Time?, scope: Anthropic::Beta::BetaFileScope? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize ⇒ BetaFileMetadata
Returns a new instance of BetaFileMetadata.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'sig/anthropic/models/beta/beta_file_metadata.rbs', line 40
def initialize: (
id: String,
created_at: Time,
filename: String,
mime_type: String,
size_bytes: Integer,
?downloadable: bool,
?expires_at: Time?,
?scope: Anthropic::Beta::BetaFileScope?,
?type: :file
) -> void
|
Instance Attribute Details
#created_at ⇒ Time
RFC 3339 datetime string representing when the file was created.
20 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 20 required :created_at, Time |
#downloadable ⇒ Boolean?
Whether the file can be downloaded.
52 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 52 optional :downloadable, Anthropic::Internal::Type::Boolean |
#expires_at ⇒ Time?
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.
60 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 60 optional :expires_at, Time, nil?: true |
#filename ⇒ String
Original filename of the uploaded file.
26 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 26 required :filename, String |
#id ⇒ String
Unique object identifier.
The format and length of IDs may change over time.
14 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 14 required :id, String |
#mime_type ⇒ String
MIME type of the file.
32 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 32 required :mime_type, String |
#scope ⇒ Anthropic::Models::Beta::BetaFileScope?
The scope of this file, indicating the context in which it was created (e.g., a session).
67 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 67 optional :scope, -> { Anthropic::Beta::BetaFileScope }, nil?: true |
#size_bytes ⇒ Integer
Size of the file in bytes.
38 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 38 required :size_bytes, Integer |
#type ⇒ Symbol, :file
Object type.
For files, this is always "file".
46 |
# File 'lib/anthropic/models/beta/beta_file_metadata.rb', line 46 required :type, const: :file |
Instance Method Details
#to_hash ⇒ { id: String, created_at: Time, filename: String, mime_type: String, size_bytes: Integer, type: :file, downloadable: bool, expires_at: Time?, scope: Anthropic::Beta::BetaFileScope? }
52 53 54 55 56 57 58 59 60 61 62 |
# File 'sig/anthropic/models/beta/beta_file_metadata.rbs', line 52
def to_hash: -> {
id: String,
created_at: Time,
filename: String,
mime_type: String,
size_bytes: Integer,
type: :file,
downloadable: bool,
expires_at: Time?,
scope: Anthropic::Beta::BetaFileScope?
}
|