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