Class: Rafflesia::ObjectArtifactCacheFileState
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactCacheFileState
- Defined in:
- lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb
Constant Summary collapse
- HASH_ATTRS =
{ error: :error, exists: :exists, expected_sha256: :expected_sha_256, expected_size_bytes: :expected_size_bytes, is_stale: :is_stale, local_name: :local_name, object: :object, path: :path, role: :role, sha256: :sha_256, shard_id: :shard_id, size_bytes: :size_bytes, status: :status, verified: :verified }.freeze
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#exists ⇒ Object
Returns the value of attribute exists.
-
#expected_sha_256 ⇒ Object
Returns the value of attribute expected_sha_256.
-
#expected_size_bytes ⇒ Object
Returns the value of attribute expected_size_bytes.
-
#is_stale ⇒ Object
Returns the value of attribute is_stale.
-
#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.
-
#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.
-
#status ⇒ Object
Returns the value of attribute status.
-
#verified ⇒ Object
Returns the value of attribute verified.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactCacheFileState
constructor
A new instance of ObjectArtifactCacheFileState.
Constructor Details
#initialize(json) ⇒ ObjectArtifactCacheFileState
Returns a new instance of ObjectArtifactCacheFileState.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @error = hash[:error] @exists = hash[:exists] @expected_sha_256 = hash[:expected_sha256] @expected_size_bytes = hash[:expected_size_bytes] @is_stale = hash[:is_stale] @local_name = hash[:local_name] @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] @status = hash[:status] @verified = hash[:verified] end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def error @error end |
#exists ⇒ Object
Returns the value of attribute exists.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def exists @exists end |
#expected_sha_256 ⇒ Object
Returns the value of attribute expected_sha_256.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def expected_sha_256 @expected_sha_256 end |
#expected_size_bytes ⇒ Object
Returns the value of attribute expected_size_bytes.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def expected_size_bytes @expected_size_bytes end |
#is_stale ⇒ Object
Returns the value of attribute is_stale.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def is_stale @is_stale end |
#local_name ⇒ Object
Returns the value of attribute local_name.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def local_name @local_name end |
#object ⇒ Object
Returns the value of attribute object.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def object @object end |
#path ⇒ Object
Returns the value of attribute path.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def path @path end |
#role ⇒ Object
Returns the value of attribute role.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def role @role end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def sha_256 @sha_256 end |
#shard_id ⇒ Object
Returns the value of attribute shard_id.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def shard_id @shard_id end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def size_bytes @size_bytes end |
#status ⇒ Object
Returns the value of attribute status.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def status @status end |
#verified ⇒ Object
Returns the value of attribute verified.
25 26 27 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_file_state.rb', line 25 def verified @verified end |