Class: Rafflesia::FoldSegmentCompactData

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

Constant Summary collapse

HASH_ATTRS =
{
  block_bytes: :block_bytes,
  block_count: :block_count,
  block_map: :block_map,
  block_map_content_sha256: :block_map_content_sha_256,
  block_map_object: :block_map_object,
  block_map_object_id: :block_map_object_id,
  dataset_name: :dataset_name,
  dataset_version: :dataset_version,
  deduplicated_record_count: :deduplicated_record_count,
  feature_content_sha256: :feature_content_sha_256,
  feature_object: :feature_object,
  manifest: :manifest,
  manifest_object: :manifest_object,
  manifest_object_id: :manifest_object_id,
  name: :name,
  published: :published,
  record_count: :record_count,
  ref: :ref,
  root: :root,
  segment_id: :segment_id,
  source_manifest_object_ids: :source_manifest_object_ids,
  source_segment_ids: :source_segment_ids,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldSegmentCompactData

Returns a new instance of FoldSegmentCompactData.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 59

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @block_bytes = hash[:block_bytes]
  @block_count = hash[:block_count]
  @block_map = hash[:block_map] ? Rafflesia::FoldSegmentBlockMap.new(hash[:block_map]) : nil
  @block_map_content_sha_256 = hash[:block_map_content_sha256]
  @block_map_object = hash[:block_map_object] ? Rafflesia::ObjectRef.new(hash[:block_map_object]) : nil
  @block_map_object_id = hash[:block_map_object_id]
  @dataset_name = hash[:dataset_name]
  @dataset_version = hash[:dataset_version]
  @deduplicated_record_count = hash[:deduplicated_record_count]
  @feature_content_sha_256 = hash[:feature_content_sha256]
  @feature_object = hash[:feature_object] ? Rafflesia::ObjectRef.new(hash[:feature_object]) : nil
  @manifest = hash[:manifest] ? Rafflesia::SearchSegmentManifest.new(hash[:manifest]) : nil
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_object_id = hash[:manifest_object_id]
  @name = hash[:name]
  @published = hash[:published] ? Rafflesia::FoldSegmentPublishData.new(hash[:published]) : nil
  @record_count = hash[:record_count]
  @ref = hash[:ref]
  @root = hash[:root] ? Rafflesia::SearchSegmentRoot.new(hash[:root]) : nil
  @segment_id = hash[:segment_id]
  @source_manifest_object_ids = (hash[:source_manifest_object_ids] || [])
  @source_segment_ids = (hash[:source_segment_ids] || [])
  @version = hash[:version]
end

Instance Attribute Details

#block_bytesObject

Returns the value of attribute block_bytes.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def block_bytes
  @block_bytes
end

#block_countObject

Returns the value of attribute block_count.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def block_count
  @block_count
end

#block_mapObject

Returns the value of attribute block_map.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def block_map
  @block_map
end

#block_map_content_sha_256Object

Returns the value of attribute block_map_content_sha_256.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def block_map_content_sha_256
  @block_map_content_sha_256
end

#block_map_objectObject

Returns the value of attribute block_map_object.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def block_map_object
  @block_map_object
end

#block_map_object_idObject

Returns the value of attribute block_map_object_id.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def block_map_object_id
  @block_map_object_id
end

#dataset_nameObject

Returns the value of attribute dataset_name.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def dataset_name
  @dataset_name
end

#dataset_versionObject

Returns the value of attribute dataset_version.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def dataset_version
  @dataset_version
end

#deduplicated_record_countObject

Returns the value of attribute deduplicated_record_count.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def deduplicated_record_count
  @deduplicated_record_count
end

#feature_content_sha_256Object

Returns the value of attribute feature_content_sha_256.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def feature_content_sha_256
  @feature_content_sha_256
end

#feature_objectObject

Returns the value of attribute feature_object.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def feature_object
  @feature_object
end

#manifestObject

Returns the value of attribute manifest.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def manifest
  @manifest
end

#manifest_objectObject

Returns the value of attribute manifest_object.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def manifest_object
  @manifest_object
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def manifest_object_id
  @manifest_object_id
end

#nameObject

Returns the value of attribute name.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def name
  @name
end

#publishedObject

Returns the value of attribute published.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def published
  @published
end

#record_countObject

Returns the value of attribute record_count.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def record_count
  @record_count
end

#refObject

Returns the value of attribute ref.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def ref
  @ref
end

#rootObject

Returns the value of attribute root.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def root
  @root
end

#segment_idObject

Returns the value of attribute segment_id.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def segment_id
  @segment_id
end

#source_manifest_object_idsObject

Returns the value of attribute source_manifest_object_ids.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def source_manifest_object_ids
  @source_manifest_object_ids
end

#source_segment_idsObject

Returns the value of attribute source_segment_ids.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def source_segment_ids
  @source_segment_ids
end

#versionObject

Returns the value of attribute version.



34
35
36
# File 'lib/rafflesia/proteins/fold_segment_compact_data.rb', line 34

def version
  @version
end