Class: Rafflesia::ObjectGcCandidate

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/objects/object_gc_candidate.rb

Constant Summary collapse

HASH_ATTRS =
{
  delete_eligible: :delete_eligible,
  deleted: :deleted,
  is_live: :is_live,
  live_reference_count: :live_reference_count,
  modified_at: :modified_at,
  object_id: :object_id,
  object_key: :object_key,
  path: :path,
  retain_reasons: :retain_reasons,
  sha256: :sha_256,
  size_bytes: :size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectGcCandidate

Returns a new instance of ObjectGcCandidate.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @delete_eligible = hash[:delete_eligible]
  @deleted = hash[:deleted]
  @is_live = hash[:is_live]
  @live_reference_count = hash[:live_reference_count]
  @modified_at = hash[:modified_at]
  @object_id = hash[:object_id]
  @object_key = hash[:object_key]
  @path = hash[:path]
  @retain_reasons = (hash[:retain_reasons] || [])
  @sha_256 = hash[:sha256]
  @size_bytes = hash[:size_bytes]
end

Instance Attribute Details

#delete_eligibleObject

Returns the value of attribute delete_eligible.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def delete_eligible
  @delete_eligible
end

#deletedObject

Returns the value of attribute deleted.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def deleted
  @deleted
end

#is_liveObject

Returns the value of attribute is_live.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def is_live
  @is_live
end

#live_reference_countObject

Returns the value of attribute live_reference_count.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def live_reference_count
  @live_reference_count
end

#modified_atObject

Returns the value of attribute modified_at.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def modified_at
  @modified_at
end

#object_idObject

Returns the value of attribute object_id.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def object_id
  @object_id
end

#object_keyObject

Returns the value of attribute object_key.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def object_key
  @object_key
end

#pathObject

Returns the value of attribute path.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def path
  @path
end

#retain_reasonsObject

Returns the value of attribute retain_reasons.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def retain_reasons
  @retain_reasons
end

#sha_256Object

Returns the value of attribute sha_256.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def sha_256
  @sha_256
end

#size_bytesObject

Returns the value of attribute size_bytes.



22
23
24
# File 'lib/rafflesia/objects/object_gc_candidate.rb', line 22

def size_bytes
  @size_bytes
end