Class: Rafflesia::ObjectArtifactMaterializedFile

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_nameObject

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_msObject

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

#objectObject

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

#pathObject

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

#roleObject

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_256Object

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_idObject

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_bytesObject

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_hitObject

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