Class: Rafflesia::ObjectArtifactCacheInspectData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  error_count: :error_count,
  file_count: :file_count,
  files: :files,
  manifest: :manifest,
  mismatched_count: :mismatched_count,
  missing_count: :missing_count,
  stale_count: :stale_count,
  target_dir: :target_dir,
  total_size_bytes: :total_size_bytes,
  verified_count: :verified_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectArtifactCacheInspectData

Returns a new instance of ObjectArtifactCacheInspectData.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 33

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @error_count = hash[:error_count]
  @file_count = hash[:file_count]
  @files = (hash[:files] || []).map { |item| item ? Rafflesia::ObjectArtifactCacheFileState.new(item) : nil }
  @manifest = hash[:manifest] ? Rafflesia::ObjectArtifactManifestSummary.new(hash[:manifest]) : nil
  @mismatched_count = hash[:mismatched_count]
  @missing_count = hash[:missing_count]
  @stale_count = hash[:stale_count]
  @target_dir = hash[:target_dir]
  @total_size_bytes = hash[:total_size_bytes]
  @verified_count = hash[:verified_count]
end

Instance Attribute Details

#error_countObject

Returns the value of attribute error_count.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def error_count
  @error_count
end

#file_countObject

Returns the value of attribute file_count.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def file_count
  @file_count
end

#filesObject

Returns the value of attribute files.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def files
  @files
end

#manifestObject

Returns the value of attribute manifest.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def manifest
  @manifest
end

#mismatched_countObject

Returns the value of attribute mismatched_count.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def mismatched_count
  @mismatched_count
end

#missing_countObject

Returns the value of attribute missing_count.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def missing_count
  @missing_count
end

#stale_countObject

Returns the value of attribute stale_count.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def stale_count
  @stale_count
end

#target_dirObject

Returns the value of attribute target_dir.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def target_dir
  @target_dir
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def total_size_bytes
  @total_size_bytes
end

#verified_countObject

Returns the value of attribute verified_count.



21
22
23
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21

def verified_count
  @verified_count
end