Class: Api2Convert::Model::InputFile
- Inherits:
-
Object
- Object
- Api2Convert::Model::InputFile
- Defined in:
- lib/api2convert/model/input_file.rb
Overview
An input file attached to a job.
Instance Attribute Summary collapse
-
#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.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: nil, type: "", source: nil, status: nil, filename: nil, size: nil, content_type: nil, options: {}) ⇒ InputFile
constructor
A new instance of InputFile.
Constructor Details
#initialize(id: nil, type: "", source: nil, status: nil, filename: nil, size: nil, content_type: nil, options: {}) ⇒ InputFile
Returns a new instance of InputFile.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/api2convert/model/input_file.rb', line 9 def initialize(id: nil, type: "", source: nil, status: nil, filename: nil, size: nil, content_type: nil, options: {}) @id = id @type = type @source = source @status = status @filename = filename @size = size @content_type = content_type @options = freeze end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def content_type @content_type end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def filename @filename end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def id @id end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def @options end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def size @size end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/api2convert/model/input_file.rb', line 7 def type @type end |
Class Method Details
.from_hash(data) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/api2convert/model/input_file.rb', line 22 def self.from_hash(data) d = Support::Data.as_object(data) new( id: Support::Data.nullable_str(d["id"]), type: Support::Data.as_str(d["type"]), source: Support::Data.nullable_str(d["source"]), status: Support::Data.nullable_str(d["status"]), filename: Support::Data.nullable_str(d["filename"]), size: Support::Data.nullable_int(d["size"]), content_type: Support::Data.nullable_str(d["content_type"]), options: Support::Data.as_object(d["options"]) ) end |