Class: Rafflesia::FoldSegmentBlockMapEntry

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_segment_block_map_entry.rb

Constant Summary collapse

HASH_ATTRS =
{
  block_id: :block_id,
  block_index: :block_index,
  end_key: :end_key,
  object: :object,
  object_id: :object_id,
  object_key: :object_key,
  offset_bytes: :offset_bytes,
  sha256: :sha_256,
  size_bytes: :size_bytes,
  start_key: :start_key,
  storage_backend: :storage_backend
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldSegmentBlockMapEntry

Returns a new instance of FoldSegmentBlockMapEntry.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @block_id = hash[:block_id]
  @block_index = hash[:block_index]
  @end_key = hash[:end_key]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @object_id = hash[:object_id]
  @object_key = hash[:object_key]
  @offset_bytes = hash[:offset_bytes]
  @sha_256 = hash[:sha256]
  @size_bytes = hash[:size_bytes]
  @start_key = hash[:start_key]
  @storage_backend = hash[:storage_backend]
end

Instance Attribute Details

#block_idObject

Returns the value of attribute block_id.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def block_id
  @block_id
end

#block_indexObject

Returns the value of attribute block_index.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def block_index
  @block_index
end

#end_keyObject

Returns the value of attribute end_key.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def end_key
  @end_key
end

#objectObject

Returns the value of attribute object.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def object
  @object
end

#object_idObject

Returns the value of attribute object_id.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def object_id
  @object_id
end

#object_keyObject

Returns the value of attribute object_key.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def object_key
  @object_key
end

#offset_bytesObject

Returns the value of attribute offset_bytes.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def offset_bytes
  @offset_bytes
end

#sha_256Object

Returns the value of attribute sha_256.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def sha_256
  @sha_256
end

#size_bytesObject

Returns the value of attribute size_bytes.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def size_bytes
  @size_bytes
end

#start_keyObject

Returns the value of attribute start_key.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def start_key
  @start_key
end

#storage_backendObject

Returns the value of attribute storage_backend.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_block_map_entry.rb', line 22

def storage_backend
  @storage_backend
end