Class: Moonbase::Models::MoonbaseFile

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/moonbase_file.rb

Overview

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:, associations:, created_at:, download_url:, filename:, name:, size:, updated_at:, type: :file) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::MoonbaseFile for more details.

The File object represents a file that has been uploaded to your library.

Parameters:

  • id (String)

    Unique identifier for the object.

  • associations (Array<Moonbase::Models::ItemPointer>)

    A list of items this file is associated with.

  • created_at (Time)

    Time at which the object was created, as an ISO 8601 timestamp in UTC.

  • download_url (String)

    A temporary, signed URL to download the file content. The URL expires after one

  • filename (String)

    The original filename of the uploaded file.

  • name (String)

    The display name of the file.

  • size (Float)

    The size of the file in bytes.

  • updated_at (Time)

    Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

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

    String representing the object’s type. Always ‘file` for this object.



# File 'lib/moonbase/models/moonbase_file.rb', line 62

Instance Attribute Details

#associationsArray<Moonbase::Models::ItemPointer>

A list of items this file is associated with.

Returns:



17
# File 'lib/moonbase/models/moonbase_file.rb', line 17

required :associations, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::ItemPointer] }

#created_atTime

Time at which the object was created, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


23
# File 'lib/moonbase/models/moonbase_file.rb', line 23

required :created_at, Time

#download_urlString

A temporary, signed URL to download the file content. The URL expires after one hour.

Returns:

  • (String)


30
# File 'lib/moonbase/models/moonbase_file.rb', line 30

required :download_url, String

#filenameString

The original filename of the uploaded file.

Returns:

  • (String)


36
# File 'lib/moonbase/models/moonbase_file.rb', line 36

required :filename, String

#idString

Unique identifier for the object.

Returns:

  • (String)


11
# File 'lib/moonbase/models/moonbase_file.rb', line 11

required :id, String

#nameString

The display name of the file.

Returns:

  • (String)


42
# File 'lib/moonbase/models/moonbase_file.rb', line 42

required :name, String

#sizeFloat

The size of the file in bytes.

Returns:

  • (Float)


48
# File 'lib/moonbase/models/moonbase_file.rb', line 48

required :size, Float

#typeSymbol, :file

String representing the object’s type. Always ‘file` for this object.

Returns:

  • (Symbol, :file)


54
# File 'lib/moonbase/models/moonbase_file.rb', line 54

required :type, const: :file

#updated_atTime

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


60
# File 'lib/moonbase/models/moonbase_file.rb', line 60

required :updated_at, Time