Class: Rafflesia::FoldSegmentExplainData

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

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  cache_decision: :cache_decision,
  manifest_object_id: :manifest_object_id,
  manifest_path: :manifest_path,
  plan: :plan,
  query: :query,
  query_id: :query_id,
  reads: :reads,
  reasons: :reasons,
  ref: :ref,
  workload_profile: :workload_profile
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldSegmentExplainData

Returns a new instance of FoldSegmentExplainData.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @cache_decision = hash[:cache_decision]
  @manifest_object_id = hash[:manifest_object_id]
  @manifest_path = hash[:manifest_path]
  @plan = hash[:plan] ? Rafflesia::SearchSegmentPlanData.new(hash[:plan]) : nil
  @query = hash[:query] ? Rafflesia::FoldSegmentQueryFeature.new(hash[:query]) : nil
  @query_id = hash[:query_id]
  @reads = (hash[:reads] || []).map { |item| item ? Rafflesia::SearchSegmentObjectReadPlan.new(item) : nil }
  @reasons = (hash[:reasons] || [])
  @ref = hash[:ref]
  @workload_profile = hash[:workload_profile] ? Rafflesia::ServerlessWorkloadProfile.new(hash[:workload_profile]) : nil
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def backend
  @backend
end

#cache_decisionObject

Returns the value of attribute cache_decision.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def cache_decision
  @cache_decision
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def manifest_path
  @manifest_path
end

#planObject

Returns the value of attribute plan.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def plan
  @plan
end

#queryObject

Returns the value of attribute query.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def query
  @query
end

#query_idObject

Returns the value of attribute query_id.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def query_id
  @query_id
end

#readsObject

Returns the value of attribute reads.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def reads
  @reads
end

#reasonsObject

Returns the value of attribute reasons.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def reasons
  @reasons
end

#refObject

Returns the value of attribute ref.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def ref
  @ref
end

#workload_profileObject

Returns the value of attribute workload_profile.



22
23
24
# File 'lib/rafflesia/proteins/fold_segment_explain_data.rb', line 22

def workload_profile
  @workload_profile
end