Class: Rafflesia::FoldCollectionDistributedSearchPlan
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldCollectionDistributedSearchPlan
- Defined in:
- lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb
Constant Summary collapse
- HASH_ATTRS =
{ collection_id: :collection_id, created_at: :created_at, distributed: :distributed, kind: :kind, max_workers: :max_workers, plan_id: :plan_id, query_id: :query_id, ref: :ref, require_complete: :require_complete, routing_plan: :routing_plan, schema_version: :schema_version, snapshot_ref: :snapshot_ref, task_count: :task_count, tasks: :tasks }.freeze
Instance Attribute Summary collapse
-
#collection_id ⇒ Object
Returns the value of attribute collection_id.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#distributed ⇒ Object
Returns the value of attribute distributed.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#max_workers ⇒ Object
Returns the value of attribute max_workers.
-
#plan_id ⇒ Object
Returns the value of attribute plan_id.
-
#query_id ⇒ Object
Returns the value of attribute query_id.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#require_complete ⇒ Object
Returns the value of attribute require_complete.
-
#routing_plan ⇒ Object
Returns the value of attribute routing_plan.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
-
#snapshot_ref ⇒ Object
Returns the value of attribute snapshot_ref.
-
#task_count ⇒ Object
Returns the value of attribute task_count.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldCollectionDistributedSearchPlan
constructor
A new instance of FoldCollectionDistributedSearchPlan.
Constructor Details
#initialize(json) ⇒ FoldCollectionDistributedSearchPlan
Returns a new instance of FoldCollectionDistributedSearchPlan.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @collection_id = hash[:collection_id] @created_at = hash[:created_at] @distributed = hash[:distributed] @kind = hash[:kind] @max_workers = hash[:max_workers] @plan_id = hash[:plan_id] @query_id = hash[:query_id] @ref = hash[:ref] @require_complete = hash[:require_complete] @routing_plan = hash[:routing_plan] ? Rafflesia::FoldCollectionRoutingPlan.new(hash[:routing_plan]) : nil @schema_version = hash[:schema_version] @snapshot_ref = hash[:snapshot_ref] @task_count = hash[:task_count] @tasks = (hash[:tasks] || []).map { |item| item ? Rafflesia::FoldCollectionSearchWorkerTask.new(item) : nil } end |
Instance Attribute Details
#collection_id ⇒ Object
Returns the value of attribute collection_id.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def collection_id @collection_id end |
#created_at ⇒ Object
Returns the value of attribute created_at.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def created_at @created_at end |
#distributed ⇒ Object
Returns the value of attribute distributed.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def distributed @distributed end |
#kind ⇒ Object
Returns the value of attribute kind.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def kind @kind end |
#max_workers ⇒ Object
Returns the value of attribute max_workers.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def max_workers @max_workers end |
#plan_id ⇒ Object
Returns the value of attribute plan_id.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def plan_id @plan_id end |
#query_id ⇒ Object
Returns the value of attribute query_id.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def query_id @query_id end |
#ref ⇒ Object
Returns the value of attribute ref.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def ref @ref end |
#require_complete ⇒ Object
Returns the value of attribute require_complete.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def require_complete @require_complete end |
#routing_plan ⇒ Object
Returns the value of attribute routing_plan.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def routing_plan @routing_plan end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def schema_version @schema_version end |
#snapshot_ref ⇒ Object
Returns the value of attribute snapshot_ref.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def snapshot_ref @snapshot_ref end |
#task_count ⇒ Object
Returns the value of attribute task_count.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def task_count @task_count end |
#tasks ⇒ Object
Returns the value of attribute tasks.
25 26 27 |
# File 'lib/rafflesia/proteins/fold_collection_distributed_search_plan.rb', line 25 def tasks @tasks end |