Class: Rafflesia::SearchSegmentManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SearchSegmentManifest
- Defined in:
- lib/rafflesia/proteins/search_segment_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ algorithm: :algorithm, block_bytes: :block_bytes, block_count: :block_count, block_size_bytes: :block_size_bytes, blocks: :blocks, bundle_object: :bundle_object, content_sha256: :content_sha_256, created_at: :created_at, dataset_name: :dataset_name, dataset_version: :dataset_version, footer_length_bytes: :footer_length_bytes, footer_offset_bytes: :footer_offset_bytes, footer_sha256: :footer_sha_256, key_mode: :key_mode, kind: :kind, layout: :layout, manifest_version: :manifest_version, name: :name, record_count: :record_count, root_object: :root_object, root_sha256: :root_sha_256, segment_id: :segment_id, source_object: :source_object, tool_versions: :tool_versions, version: :version }.freeze
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#block_bytes ⇒ Object
Returns the value of attribute block_bytes.
-
#block_count ⇒ Object
Returns the value of attribute block_count.
-
#block_size_bytes ⇒ Object
Returns the value of attribute block_size_bytes.
-
#blocks ⇒ Object
Returns the value of attribute blocks.
-
#bundle_object ⇒ Object
Returns the value of attribute bundle_object.
-
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
-
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
-
#footer_length_bytes ⇒ Object
Returns the value of attribute footer_length_bytes.
-
#footer_offset_bytes ⇒ Object
Returns the value of attribute footer_offset_bytes.
-
#footer_sha_256 ⇒ Object
Returns the value of attribute footer_sha_256.
-
#key_mode ⇒ Object
Returns the value of attribute key_mode.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
-
#name ⇒ Object
Returns the value of attribute name.
-
#record_count ⇒ Object
Returns the value of attribute record_count.
-
#root_object ⇒ Object
Returns the value of attribute root_object.
-
#root_sha_256 ⇒ Object
Returns the value of attribute root_sha_256.
-
#segment_id ⇒ Object
Returns the value of attribute segment_id.
-
#source_object ⇒ Object
Returns the value of attribute source_object.
-
#tool_versions ⇒ Object
Returns the value of attribute tool_versions.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ SearchSegmentManifest
constructor
A new instance of SearchSegmentManifest.
Constructor Details
#initialize(json) ⇒ SearchSegmentManifest
Returns a new instance of SearchSegmentManifest.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 63 def initialize(json) super() hash = self.class.normalize(json) @algorithm = hash[:algorithm] @block_bytes = hash[:block_bytes] @block_count = hash[:block_count] @block_size_bytes = hash[:block_size_bytes] @blocks = (hash[:blocks] || []).map { |item| item ? Rafflesia::SearchSegmentBlock.new(item) : nil } @bundle_object = hash[:bundle_object] ? Rafflesia::ObjectRef.new(hash[:bundle_object]) : nil @content_sha_256 = hash[:content_sha256] @created_at = hash[:created_at] @dataset_name = hash[:dataset_name] @dataset_version = hash[:dataset_version] @footer_length_bytes = hash[:footer_length_bytes] @footer_offset_bytes = hash[:footer_offset_bytes] @footer_sha_256 = hash[:footer_sha256] @key_mode = hash[:key_mode] @kind = hash[:kind] @layout = hash[:layout] @manifest_version = hash[:manifest_version] @name = hash[:name] @record_count = hash[:record_count] @root_object = hash[:root_object] ? Rafflesia::ObjectRef.new(hash[:root_object]) : nil @root_sha_256 = hash[:root_sha256] @segment_id = hash[:segment_id] @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil @tool_versions = (hash[:tool_versions] || []).map { |item| item ? Rafflesia::ToolVersion.new(item) : nil } @version = hash[:version] end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def algorithm @algorithm end |
#block_bytes ⇒ Object
Returns the value of attribute block_bytes.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def block_bytes @block_bytes end |
#block_count ⇒ Object
Returns the value of attribute block_count.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def block_count @block_count end |
#block_size_bytes ⇒ Object
Returns the value of attribute block_size_bytes.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def block_size_bytes @block_size_bytes end |
#blocks ⇒ Object
Returns the value of attribute blocks.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def blocks @blocks end |
#bundle_object ⇒ Object
Returns the value of attribute bundle_object.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def bundle_object @bundle_object end |
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def content_sha_256 @content_sha_256 end |
#created_at ⇒ Object
Returns the value of attribute created_at.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def created_at @created_at end |
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def dataset_name @dataset_name end |
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def dataset_version @dataset_version end |
#footer_length_bytes ⇒ Object
Returns the value of attribute footer_length_bytes.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def @footer_length_bytes end |
#footer_offset_bytes ⇒ Object
Returns the value of attribute footer_offset_bytes.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def @footer_offset_bytes end |
#footer_sha_256 ⇒ Object
Returns the value of attribute footer_sha_256.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def @footer_sha_256 end |
#key_mode ⇒ Object
Returns the value of attribute key_mode.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def key_mode @key_mode end |
#kind ⇒ Object
Returns the value of attribute kind.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def kind @kind end |
#layout ⇒ Object
Returns the value of attribute layout.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def layout @layout end |
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def manifest_version @manifest_version end |
#name ⇒ Object
Returns the value of attribute name.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def name @name end |
#record_count ⇒ Object
Returns the value of attribute record_count.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def record_count @record_count end |
#root_object ⇒ Object
Returns the value of attribute root_object.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def root_object @root_object end |
#root_sha_256 ⇒ Object
Returns the value of attribute root_sha_256.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def root_sha_256 @root_sha_256 end |
#segment_id ⇒ Object
Returns the value of attribute segment_id.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def segment_id @segment_id end |
#source_object ⇒ Object
Returns the value of attribute source_object.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def source_object @source_object end |
#tool_versions ⇒ Object
Returns the value of attribute tool_versions.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def tool_versions @tool_versions end |
#version ⇒ Object
Returns the value of attribute version.
36 37 38 |
# File 'lib/rafflesia/proteins/search_segment_manifest.rb', line 36 def version @version end |