Class: Rafflesia::FoldSegmentBlockMap

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

Constant Summary collapse

HASH_ATTRS =
{
  algorithm: :algorithm,
  block_bytes: :block_bytes,
  block_count: :block_count,
  block_map_sha256: :block_map_sha_256,
  blocks: :blocks,
  created_at: :created_at,
  dataset_name: :dataset_name,
  dataset_version: :dataset_version,
  kind: :kind,
  manifest_object_id: :manifest_object_id,
  name: :name,
  record_count: :record_count,
  root_object_id: :root_object_id,
  schema_version: :schema_version,
  segment_id: :segment_id,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldSegmentBlockMap

Returns a new instance of FoldSegmentBlockMap.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 45

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @algorithm = hash[:algorithm]
  @block_bytes = hash[:block_bytes]
  @block_count = hash[:block_count]
  @block_map_sha_256 = hash[:block_map_sha256]
  @blocks = (hash[:blocks] || []).map { |item| item ? Rafflesia::FoldSegmentBlockMapEntry.new(item) : nil }
  @created_at = hash[:created_at]
  @dataset_name = hash[:dataset_name]
  @dataset_version = hash[:dataset_version]
  @kind = hash[:kind]
  @manifest_object_id = hash[:manifest_object_id]
  @name = hash[:name]
  @record_count = hash[:record_count]
  @root_object_id = hash[:root_object_id]
  @schema_version = hash[:schema_version]
  @segment_id = hash[:segment_id]
  @version = hash[:version]
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def algorithm
  @algorithm
end

#block_bytesObject

Returns the value of attribute block_bytes.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def block_bytes
  @block_bytes
end

#block_countObject

Returns the value of attribute block_count.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def block_count
  @block_count
end

#block_map_sha_256Object

Returns the value of attribute block_map_sha_256.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def block_map_sha_256
  @block_map_sha_256
end

#blocksObject

Returns the value of attribute blocks.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def blocks
  @blocks
end

#created_atObject

Returns the value of attribute created_at.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def created_at
  @created_at
end

#dataset_nameObject

Returns the value of attribute dataset_name.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def dataset_name
  @dataset_name
end

#dataset_versionObject

Returns the value of attribute dataset_version.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def dataset_version
  @dataset_version
end

#kindObject

Returns the value of attribute kind.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def kind
  @kind
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def manifest_object_id
  @manifest_object_id
end

#nameObject

Returns the value of attribute name.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def name
  @name
end

#record_countObject

Returns the value of attribute record_count.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def record_count
  @record_count
end

#root_object_idObject

Returns the value of attribute root_object_id.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def root_object_id
  @root_object_id
end

#schema_versionObject

Returns the value of attribute schema_version.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def schema_version
  @schema_version
end

#segment_idObject

Returns the value of attribute segment_id.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def segment_id
  @segment_id
end

#versionObject

Returns the value of attribute version.



27
28
29
# File 'lib/rafflesia/proteins/fold_segment_block_map.rb', line 27

def version
  @version
end