Class: Rafflesia::SearchSegmentBuildData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/search_segment_build_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  algorithm: :algorithm,
  block_bytes: :block_bytes,
  block_count: :block_count,
  block_size_bytes: :block_size_bytes,
  bundle_object: :bundle_object,
  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,
  manifest: :manifest,
  manifest_object: :manifest_object,
  name: :name,
  record_count: :record_count,
  root: :root,
  root_object: :root_object,
  segment_id: :segment_id,
  source_object: :source_object,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SearchSegmentBuildData

Returns a new instance of SearchSegmentBuildData.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 53

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]
  @bundle_object = hash[:bundle_object] ? Rafflesia::ObjectRef.new(hash[:bundle_object]) : nil
  @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]
  @manifest = hash[:manifest] ? Rafflesia::SearchSegmentManifest.new(hash[:manifest]) : nil
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @name = hash[:name]
  @record_count = hash[:record_count]
  @root = hash[:root] ? Rafflesia::SearchSegmentRoot.new(hash[:root]) : nil
  @root_object = hash[:root_object] ? Rafflesia::ObjectRef.new(hash[:root_object]) : nil
  @segment_id = hash[:segment_id]
  @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil
  @version = hash[:version]
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def algorithm
  @algorithm
end

#block_bytesObject

Returns the value of attribute block_bytes.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def block_bytes
  @block_bytes
end

#block_countObject

Returns the value of attribute block_count.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def block_count
  @block_count
end

#block_size_bytesObject

Returns the value of attribute block_size_bytes.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def block_size_bytes
  @block_size_bytes
end

#bundle_objectObject

Returns the value of attribute bundle_object.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def bundle_object
  @bundle_object
end

#dataset_nameObject

Returns the value of attribute dataset_name.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def dataset_name
  @dataset_name
end

#dataset_versionObject

Returns the value of attribute dataset_version.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def dataset_version
  @dataset_version
end

Returns the value of attribute footer_length_bytes.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def footer_length_bytes
  @footer_length_bytes
end

Returns the value of attribute footer_offset_bytes.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def footer_offset_bytes
  @footer_offset_bytes
end

Returns the value of attribute footer_sha_256.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def footer_sha_256
  @footer_sha_256
end

#key_modeObject

Returns the value of attribute key_mode.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def key_mode
  @key_mode
end

#manifestObject

Returns the value of attribute manifest.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def manifest
  @manifest
end

#manifest_objectObject

Returns the value of attribute manifest_object.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def manifest_object
  @manifest_object
end

#nameObject

Returns the value of attribute name.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def name
  @name
end

#record_countObject

Returns the value of attribute record_count.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def record_count
  @record_count
end

#rootObject

Returns the value of attribute root.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def root
  @root
end

#root_objectObject

Returns the value of attribute root_object.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def root_object
  @root_object
end

#segment_idObject

Returns the value of attribute segment_id.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def segment_id
  @segment_id
end

#source_objectObject

Returns the value of attribute source_object.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def source_object
  @source_object
end

#versionObject

Returns the value of attribute version.



31
32
33
# File 'lib/rafflesia/sequences/search_segment_build_data.rb', line 31

def version
  @version
end