Class: Rafflesia::SearchSegmentDescribeData

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

Constant Summary collapse

HASH_ATTRS =
{
  algorithm: :algorithm,
  block_bytes: :block_bytes,
  block_count: :block_count,
  key_mode: :key_mode,
  manifest: :manifest,
  manifest_object_id: :manifest_object_id,
  name: :name,
  record_count: :record_count,
  root: :root,
  segment_id: :segment_id,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SearchSegmentDescribeData

Returns a new instance of SearchSegmentDescribeData.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @algorithm = hash[:algorithm]
  @block_bytes = hash[:block_bytes]
  @block_count = hash[:block_count]
  @key_mode = hash[:key_mode]
  @manifest = hash[:manifest] ? Rafflesia::SearchSegmentManifest.new(hash[:manifest]) : nil
  @manifest_object_id = hash[:manifest_object_id]
  @name = hash[:name]
  @record_count = hash[:record_count]
  @root = hash[:root] ? Rafflesia::SearchSegmentRoot.new(hash[:root]) : nil
  @segment_id = hash[:segment_id]
  @version = hash[:version]
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def algorithm
  @algorithm
end

#block_bytesObject

Returns the value of attribute block_bytes.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def block_bytes
  @block_bytes
end

#block_countObject

Returns the value of attribute block_count.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def block_count
  @block_count
end

#key_modeObject

Returns the value of attribute key_mode.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def key_mode
  @key_mode
end

#manifestObject

Returns the value of attribute manifest.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def manifest
  @manifest
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def manifest_object_id
  @manifest_object_id
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def name
  @name
end

#record_countObject

Returns the value of attribute record_count.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def record_count
  @record_count
end

#rootObject

Returns the value of attribute root.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def root
  @root
end

#segment_idObject

Returns the value of attribute segment_id.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def segment_id
  @segment_id
end

#versionObject

Returns the value of attribute version.



22
23
24
# File 'lib/rafflesia/sequences/search_segment_describe_data.rb', line 22

def version
  @version
end