Class: Rafflesia::ProteinFoldCandidateSearchData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/protein_fold_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,
  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,
  provenance: :provenance,
  query_id: :query_id,
  read_budget: :read_budget,
  timeout_ms: :timeout_ms
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ProteinFoldCandidateSearchData

Returns a new instance of ProteinFoldCandidateSearchData.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 47

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::ProteinFoldCandidateHit.new(item) : nil }
  @index_generation = hash[:index_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]
  @provenance = hash[:provenance]
  @query_id = hash[:query_id]
  @read_budget = hash[:read_budget] ? Rafflesia::SequenceSeedIndexObjectReadBudget.new(hash[:read_budget]) : nil
  @timeout_ms = hash[:timeout_ms]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def backend
  @backend
end

#candidate_countObject

Returns the value of attribute candidate_count.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def candidate_count
  @candidate_count
end

#engineObject

Returns the value of attribute engine.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def engine
  @engine
end

#engine_elapsed_msObject

Returns the value of attribute engine_elapsed_ms.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def engine_elapsed_ms
  @engine_elapsed_ms
end

#engine_protocol_versionObject

Returns the value of attribute engine_protocol_version.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def engine_protocol_version
  @engine_protocol_version
end

#hitsObject

Returns the value of attribute hits.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def hits
  @hits
end

#index_generationObject

Returns the value of attribute index_generation.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def index_generation
  @index_generation
end

#materialized_database_bytesObject

Returns the value of attribute materialized_database_bytes.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def materialized_database_bytes
  @materialized_database_bytes
end

#max_hitsObject

Returns the value of attribute max_hits.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def max_hits
  @max_hits
end

#namespaceObject

Returns the value of attribute namespace.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def namespace
  @namespace
end

#object_bytes_fetchedObject

Returns the value of attribute object_bytes_fetched.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def object_bytes_fetched
  @object_bytes_fetched
end

#object_read_countObject

Returns the value of attribute object_read_count.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def object_read_count
  @object_read_count
end

#object_store_rootObject

Returns the value of attribute object_store_root.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def object_store_root
  @object_store_root
end

#provenanceObject

Returns the value of attribute provenance.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def provenance
  @provenance
end

#query_idObject

Returns the value of attribute query_id.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def query_id
  @query_id
end

#read_budgetObject

Returns the value of attribute read_budget.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def read_budget
  @read_budget
end

#timeout_msObject

Returns the value of attribute timeout_ms.



28
29
30
# File 'lib/rafflesia/proteins/protein_fold_candidate_search_data.rb', line 28

def timeout_ms
  @timeout_ms
end