Class: Rafflesia::FoldIndexRoutingManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexRoutingManifest
- Defined in:
- lib/rafflesia/proteins/fold_index_routing_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifacts: :artifacts, build_command: :build_command, db_base: :db_base, representative_count: :representative_count, representative_selection: :representative_selection, representatives_per_shard: :representatives_per_shard, segment_id: :segment_id, selection_metrics: :selection_metrics, strategy: :strategy, target_to_shard: :target_to_shard }.freeze
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#build_command ⇒ Object
Returns the value of attribute build_command.
-
#db_base ⇒ Object
Returns the value of attribute db_base.
-
#representative_count ⇒ Object
Returns the value of attribute representative_count.
-
#representative_selection ⇒ Object
Returns the value of attribute representative_selection.
-
#representatives_per_shard ⇒ Object
Returns the value of attribute representatives_per_shard.
-
#segment_id ⇒ Object
Returns the value of attribute segment_id.
-
#selection_metrics ⇒ Object
Returns the value of attribute selection_metrics.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
-
#target_to_shard ⇒ Object
Returns the value of attribute target_to_shard.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexRoutingManifest
constructor
A new instance of FoldIndexRoutingManifest.
Constructor Details
#initialize(json) ⇒ FoldIndexRoutingManifest
Returns a new instance of FoldIndexRoutingManifest.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::FoldIndexArtifact.new(item) : nil } @build_command = (hash[:build_command] || []) @db_base = hash[:db_base] @representative_count = hash[:representative_count] @representative_selection = hash[:representative_selection] @representatives_per_shard = hash[:representatives_per_shard] @segment_id = hash[:segment_id] @selection_metrics = (hash[:selection_metrics] || []).map { |item| item ? Rafflesia::FoldIndexRoutingShardSelectionMetric.new(item) : nil } @strategy = hash[:strategy] @target_to_shard = hash[:target_to_shard] || {} end |
Instance Attribute Details
#artifacts ⇒ Object
Returns the value of attribute artifacts.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def artifacts @artifacts end |
#build_command ⇒ Object
Returns the value of attribute build_command.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def build_command @build_command end |
#db_base ⇒ Object
Returns the value of attribute db_base.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def db_base @db_base end |
#representative_count ⇒ Object
Returns the value of attribute representative_count.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def representative_count @representative_count end |
#representative_selection ⇒ Object
Returns the value of attribute representative_selection.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def representative_selection @representative_selection end |
#representatives_per_shard ⇒ Object
Returns the value of attribute representatives_per_shard.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def representatives_per_shard @representatives_per_shard end |
#segment_id ⇒ Object
Returns the value of attribute segment_id.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def segment_id @segment_id end |
#selection_metrics ⇒ Object
Returns the value of attribute selection_metrics.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def selection_metrics @selection_metrics end |
#strategy ⇒ Object
Returns the value of attribute strategy.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def strategy @strategy end |
#target_to_shard ⇒ Object
Returns the value of attribute target_to_shard.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_routing_manifest.rb', line 21 def target_to_shard @target_to_shard end |