Class: Api2Convert::Model::OutputFile
- Inherits:
-
Object
- Object
- Api2Convert::Model::OutputFile
- Defined in:
- lib/api2convert/model/output_file.rb
Overview
A produced output file.
#uri is a self-contained download URL (no auth), valid for a limited time (24h by default).
Instance Attribute Summary collapse
-
#checksum ⇒ Object
readonly
Returns the value of attribute checksum.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: nil, uri: "", filename: nil, size: nil, status: nil, content_type: nil, checksum: nil, metadata: {}) ⇒ OutputFile
constructor
A new instance of OutputFile.
Constructor Details
#initialize(id: nil, uri: "", filename: nil, size: nil, status: nil, content_type: nil, checksum: nil, metadata: {}) ⇒ OutputFile
Returns a new instance of OutputFile.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/api2convert/model/output_file.rb', line 12 def initialize(id: nil, uri: "", filename: nil, size: nil, status: nil, content_type: nil, checksum: nil, metadata: {}) @id = id @uri = uri @filename = filename @size = size @status = status @content_type = content_type @checksum = checksum @metadata = freeze end |
Instance Attribute Details
#checksum ⇒ Object (readonly)
Returns the value of attribute checksum.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def checksum @checksum end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def content_type @content_type end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def filename @filename end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def @metadata end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def size @size end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def status @status end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/api2convert/model/output_file.rb', line 10 def uri @uri end |
Class Method Details
.from_hash(data) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/api2convert/model/output_file.rb', line 25 def self.from_hash(data) d = Support::Data.as_object(data) new( id: Support::Data.nullable_str(d["id"]), uri: Support::Data.as_str(d["uri"]), filename: Support::Data.nullable_str(d["filename"]), size: Support::Data.nullable_int(d["size"]), status: Support::Data.nullable_str(d["status"]), content_type: Support::Data.nullable_str(d["content_type"]), checksum: Support::Data.nullable_str(d["checksum"]), metadata: Support::Data.as_object(d["metadata"]) ) end |