Class: Rafflesia::SequenceCandidateSearchData

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

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  candidate_count: :candidate_count,
  engine: :engine,
  engine_elapsed_ms: :engine_elapsed_ms,
  engine_protocol_version: :engine_protocol_version,
  hits: :hits,
  index_generation: :index_generation,
  manifest_generation: :manifest_generation,
  materialized_database_bytes: :materialized_database_bytes,
  max_hits: :max_hits,
  namespace: :namespace,
  object_bytes_fetched: :object_bytes_fetched,
  object_read_count: :object_read_count,
  object_store_root: :object_store_root,
  query: :query,
  query_mode: :query_mode,
  query_token_count: :query_token_count,
  read_budget: :read_budget,
  timeout_ms: :timeout_ms,
  unindexed_tail_record_count: :unindexed_tail_record_count,
  warnings: :warnings
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SequenceCandidateSearchData

Returns a new instance of SequenceCandidateSearchData.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @candidate_count = hash[:candidate_count]
  @engine = hash[:engine]
  @engine_elapsed_ms = hash[:engine_elapsed_ms]
  @engine_protocol_version = hash[:engine_protocol_version]
  @hits = (hash[:hits] || []).map { |item| item ? Rafflesia::SequenceCandidateHit.new(item) : nil }
  @index_generation = hash[:index_generation]
  @manifest_generation = hash[:manifest_generation]
  @materialized_database_bytes = hash[:materialized_database_bytes]
  @max_hits = hash[:max_hits]
  @namespace = hash[:namespace]
  @object_bytes_fetched = hash[:object_bytes_fetched]
  @object_read_count = hash[:object_read_count]
  @object_store_root = hash[:object_store_root]
  @query = hash[:query]
  @query_mode = hash[:query_mode]
  @query_token_count = hash[:query_token_count]
  @read_budget = hash[:read_budget] ? Rafflesia::SequenceSeedIndexObjectReadBudget.new(hash[:read_budget]) : nil
  @timeout_ms = hash[:timeout_ms]
  @unindexed_tail_record_count = hash[:unindexed_tail_record_count]
  @warnings = (hash[:warnings] || [])
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def backend
  @backend
end

#candidate_countObject

Returns the value of attribute candidate_count.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def candidate_count
  @candidate_count
end

#engineObject

Returns the value of attribute engine.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def engine
  @engine
end

#engine_elapsed_msObject

Returns the value of attribute engine_elapsed_ms.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def engine_elapsed_ms
  @engine_elapsed_ms
end

#engine_protocol_versionObject

Returns the value of attribute engine_protocol_version.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def engine_protocol_version
  @engine_protocol_version
end

#hitsObject

Returns the value of attribute hits.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def hits
  @hits
end

#index_generationObject

Returns the value of attribute index_generation.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def index_generation
  @index_generation
end

#manifest_generationObject

Returns the value of attribute manifest_generation.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def manifest_generation
  @manifest_generation
end

#materialized_database_bytesObject

Returns the value of attribute materialized_database_bytes.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def materialized_database_bytes
  @materialized_database_bytes
end

#max_hitsObject

Returns the value of attribute max_hits.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def max_hits
  @max_hits
end

#namespaceObject

Returns the value of attribute namespace.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def namespace
  @namespace
end

#object_bytes_fetchedObject

Returns the value of attribute object_bytes_fetched.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def object_bytes_fetched
  @object_bytes_fetched
end

#object_read_countObject

Returns the value of attribute object_read_count.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def object_read_count
  @object_read_count
end

#object_store_rootObject

Returns the value of attribute object_store_root.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def object_store_root
  @object_store_root
end

#queryObject

Returns the value of attribute query.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def query
  @query
end

#query_modeObject

Returns the value of attribute query_mode.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def query_mode
  @query_mode
end

#query_token_countObject

Returns the value of attribute query_token_count.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def query_token_count
  @query_token_count
end

#read_budgetObject

Returns the value of attribute read_budget.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def read_budget
  @read_budget
end

#timeout_msObject

Returns the value of attribute timeout_ms.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def timeout_ms
  @timeout_ms
end

#unindexed_tail_record_countObject

Returns the value of attribute unindexed_tail_record_count.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def unindexed_tail_record_count
  @unindexed_tail_record_count
end

#warningsObject

Returns the value of attribute warnings.



32
33
34
# File 'lib/rafflesia/sequences/sequence_candidate_search_data.rb', line 32

def warnings
  @warnings
end