Class: Rafflesia::BlastSearchExplainData

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

Constant Summary collapse

HASH_ATTRS =
{
  cache_decision: :cache_decision,
  plan: :plan,
  reasons: :reasons,
  routing: :routing,
  search: :search,
  workload_profile: :workload_profile
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastSearchExplainData

Returns a new instance of BlastSearchExplainData.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cache_decision = hash[:cache_decision]
  @plan = hash[:plan] ? Rafflesia::BlastSearchPlanData.new(hash[:plan]) : nil
  @reasons = (hash[:reasons] || [])
  @routing = hash[:routing] ? Rafflesia::BlastSearchRoutingData.new(hash[:routing]) : nil
  @search = hash[:search] ? Rafflesia::BlastSearchData.new(hash[:search]) : nil
  @workload_profile = hash[:workload_profile] ? Rafflesia::ServerlessWorkloadProfile.new(hash[:workload_profile]) : nil
end

Instance Attribute Details

#cache_decisionObject

Returns the value of attribute cache_decision.



17
18
19
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 17

def cache_decision
  @cache_decision
end

#planObject

Returns the value of attribute plan.



17
18
19
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 17

def plan
  @plan
end

#reasonsObject

Returns the value of attribute reasons.



17
18
19
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 17

def reasons
  @reasons
end

#routingObject

Returns the value of attribute routing.



17
18
19
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 17

def routing
  @routing
end

#searchObject

Returns the value of attribute search.



17
18
19
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 17

def search
  @search
end

#workload_profileObject

Returns the value of attribute workload_profile.



17
18
19
# File 'lib/rafflesia/sequences/blast_search_explain_data.rb', line 17

def workload_profile
  @workload_profile
end