Class: Rafflesia::FoldSearchPlanData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_search_plan_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  budget: :budget,
  cost: :cost,
  distribution: :distribution,
  effective_shards: :effective_shards,
  execution: :execution,
  monitoring: :monitoring,
  nprobe: :nprobe,
  policy: :policy,
  reasons: :reasons,
  segment_roles: :segment_roles,
  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) ⇒ FoldSearchPlanData

Returns a new instance of FoldSearchPlanData.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @budget = hash[:budget] ? Rafflesia::SearchPhysicalPlanBudget.new(hash[:budget]) : nil
  @cost = hash[:cost] ? Rafflesia::FoldSearchCostEvidence.new(hash[:cost]) : nil
  @distribution = hash[:distribution]
  @effective_shards = hash[:effective_shards]
  @execution = hash[:execution]
  @monitoring = hash[:monitoring] ? Rafflesia::FoldSearchMonitoring.new(hash[:monitoring]) : nil
  @nprobe = hash[:nprobe]
  @policy = hash[:policy] ? Rafflesia::FoldSearchPolicyData.new(hash[:policy]) : nil
  @reasons = (hash[:reasons] || [])
  @segment_roles = (hash[:segment_roles] || [])
  @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/proteins/fold_search_plan_data.rb', line 24

def budget
  @budget
end

#costObject

Returns the value of attribute cost.



24
25
26
# File 'lib/rafflesia/proteins/fold_search_plan_data.rb', line 24

def cost
  @cost
end

#distributionObject

Returns the value of attribute distribution.



24
25
26
# File 'lib/rafflesia/proteins/fold_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/proteins/fold_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/proteins/fold_search_plan_data.rb', line 24

def execution
  @execution
end

#monitoringObject

Returns the value of attribute monitoring.



24
25
26
# File 'lib/rafflesia/proteins/fold_search_plan_data.rb', line 24

def monitoring
  @monitoring
end

#nprobeObject

Returns the value of attribute nprobe.



24
25
26
# File 'lib/rafflesia/proteins/fold_search_plan_data.rb', line 24

def nprobe
  @nprobe
end

#policyObject

Returns the value of attribute policy.



24
25
26
# File 'lib/rafflesia/proteins/fold_search_plan_data.rb', line 24

def policy
  @policy
end

#reasonsObject

Returns the value of attribute reasons.



24
25
26
# File 'lib/rafflesia/proteins/fold_search_plan_data.rb', line 24

def reasons
  @reasons
end

#segment_rolesObject

Returns the value of attribute segment_roles.



24
25
26
# File 'lib/rafflesia/proteins/fold_search_plan_data.rb', line 24

def segment_roles
  @segment_roles
end

#selectionObject

Returns the value of attribute selection.



24
25
26
# File 'lib/rafflesia/proteins/fold_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/proteins/fold_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/proteins/fold_search_plan_data.rb', line 24

def total_size_bytes
  @total_size_bytes
end