Class: Rafflesia::ObjectArtifactImportedFile
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactImportedFile
- Defined in:
- lib/rafflesia/objects/object_artifact_imported_file.rb
Constant Summary collapse
- HASH_ATTRS =
{ content_type: :content_type, local_name: :local_name, object: :object, path: :path, relative_path: :relative_path, role: :role, sha256: :sha_256, shard_id: :shard_id, size_bytes: :size_bytes }.freeze
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#local_name ⇒ Object
Returns the value of attribute local_name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#path ⇒ Object
Returns the value of attribute path.
-
#relative_path ⇒ Object
Returns the value of attribute relative_path.
-
#role ⇒ Object
Returns the value of attribute role.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#shard_id ⇒ Object
Returns the value of attribute shard_id.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactImportedFile
constructor
A new instance of ObjectArtifactImportedFile.
Constructor Details
#initialize(json) ⇒ ObjectArtifactImportedFile
Returns a new instance of ObjectArtifactImportedFile.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @content_type = hash[:content_type] @local_name = hash[:local_name] @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @path = hash[:path] @relative_path = hash[:relative_path] @role = hash[:role] @sha_256 = hash[:sha256] @shard_id = hash[:shard_id] @size_bytes = hash[:size_bytes] end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def content_type @content_type end |
#local_name ⇒ Object
Returns the value of attribute local_name.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def local_name @local_name end |
#object ⇒ Object
Returns the value of attribute object.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def object @object end |
#path ⇒ Object
Returns the value of attribute path.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def path @path end |
#relative_path ⇒ Object
Returns the value of attribute relative_path.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def relative_path @relative_path end |
#role ⇒ Object
Returns the value of attribute role.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def role @role end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def sha_256 @sha_256 end |
#shard_id ⇒ Object
Returns the value of attribute shard_id.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def shard_id @shard_id end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
20 21 22 |
# File 'lib/rafflesia/objects/object_artifact_imported_file.rb', line 20 def size_bytes @size_bytes end |