Class: Anthropic::Models::FileMetadata

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/file_metadata.rb,
sig/anthropic/models/file_metadata.rbs

Overview

See Also:

  • Anthropic::Resources::Files#list

Instance Attribute Summary collapse

Instance Method Summary collapse

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(id:, created_at:, filename:, mime_type:, size_bytes:, downloadable: nil, expires_at: nil, type: :file) ⇒ Object

Some parameter documentations has been truncated, see Anthropic::Models::FileMetadata for more details.

Parameters:

  • id (String)

    Unique object identifier.

  • created_at (Time)

    RFC 3339 datetime string representing when the file was created.

  • filename (String)

    Original filename of the uploaded file.

  • mime_type (String)

    MIME type of the file.

  • size_bytes (Integer)

    Size of the file in bytes.

  • downloadable (Boolean) (defaults to: nil)

    Whether the file can be downloaded.

  • expires_at (Time, nil) (defaults to: nil)

    RFC 3339 datetime string representing when the file will expire and become unava

  • type (Symbol, :file) (defaults to: :file)

    Object type.



# File 'lib/anthropic/models/file_metadata.rb', line 61

Instance Attribute Details

#created_atTime

RFC 3339 datetime string representing when the file was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


19
# File 'lib/anthropic/models/file_metadata.rb', line 19

required :created_at, Time

#downloadableBoolean?

Whether the file can be downloaded.

Parameters:

Returns:



51
# File 'lib/anthropic/models/file_metadata.rb', line 51

optional :downloadable, Anthropic::Internal::Type::Boolean

#expires_atTime?

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


59
# File 'lib/anthropic/models/file_metadata.rb', line 59

optional :expires_at, Time, nil?: true

#filenameString

Original filename of the uploaded file.

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/anthropic/models/file_metadata.rb', line 25

required :filename, String

#idString

Unique object identifier.

The format and length of IDs may change over time.

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/anthropic/models/file_metadata.rb', line 13

required :id, String

#mime_typeString

MIME type of the file.

Parameters:

  • value (String)

Returns:

  • (String)


31
# File 'lib/anthropic/models/file_metadata.rb', line 31

required :mime_type, String

#size_bytesInteger

Size of the file in bytes.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


37
# File 'lib/anthropic/models/file_metadata.rb', line 37

required :size_bytes, Integer

#typeSymbol, :file

Object type.

For files, this is always "file".

Parameters:

  • value (:file)

Returns:

  • (Symbol, :file)


45
# File 'lib/anthropic/models/file_metadata.rb', line 45

required :type, const: :file

Instance Method Details

#to_hash{

Returns:

  • ({)


45
# File 'sig/anthropic/models/file_metadata.rbs', line 45

def to_hash: -> {