Class: Rafflesia::BlastSearchPlanData

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

Constant Summary collapse

HASH_ATTRS =
{
  budget: :budget,
  distribution: :distribution,
  effective_shards: :effective_shards,
  execution: :execution,
  pack_access_mode: :pack_access_mode,
  pack_access_requested: :pack_access_requested,
  reasons: :reasons,
  remote_artifact_count: :remote_artifact_count,
  remote_range_eligible: :remote_range_eligible,
  remote_total_size_bytes: :remote_total_size_bytes,
  selection: :selection,
  shard_count: :shard_count,
  total_size_bytes: :total_size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastSearchPlanData

Returns a new instance of BlastSearchPlanData.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @budget = hash[:budget] ? Rafflesia::SearchPhysicalPlanBudget.new(hash[:budget]) : nil
  @distribution = hash[:distribution]
  @effective_shards = hash[:effective_shards]
  @execution = hash[:execution]
  @pack_access_mode = hash[:pack_access_mode]
  @pack_access_requested = hash[:pack_access_requested]
  @reasons = (hash[:reasons] || [])
  @remote_artifact_count = hash[:remote_artifact_count]
  @remote_range_eligible = hash[:remote_range_eligible]
  @remote_total_size_bytes = hash[:remote_total_size_bytes]
  @selection = hash[:selection]
  @shard_count = hash[:shard_count]
  @total_size_bytes = hash[:total_size_bytes]
end

Instance Attribute Details

#budgetObject

Returns the value of attribute budget.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def budget
  @budget
end

#distributionObject

Returns the value of attribute distribution.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def distribution
  @distribution
end

#effective_shardsObject

Returns the value of attribute effective_shards.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def effective_shards
  @effective_shards
end

#executionObject

Returns the value of attribute execution.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def execution
  @execution
end

#pack_access_modeObject

Returns the value of attribute pack_access_mode.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def pack_access_mode
  @pack_access_mode
end

#pack_access_requestedObject

Returns the value of attribute pack_access_requested.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def pack_access_requested
  @pack_access_requested
end

#reasonsObject

Returns the value of attribute reasons.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def reasons
  @reasons
end

#remote_artifact_countObject

Returns the value of attribute remote_artifact_count.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def remote_artifact_count
  @remote_artifact_count
end

#remote_range_eligibleObject

Returns the value of attribute remote_range_eligible.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def remote_range_eligible
  @remote_range_eligible
end

#remote_total_size_bytesObject

Returns the value of attribute remote_total_size_bytes.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def remote_total_size_bytes
  @remote_total_size_bytes
end

#selectionObject

Returns the value of attribute selection.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def selection
  @selection
end

#shard_countObject

Returns the value of attribute shard_count.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def shard_count
  @shard_count
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_plan_data.rb', line 24

def total_size_bytes
  @total_size_bytes
end