Class: Google::Apis::RunV1::WorkerPoolSpec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/run_v1/classes.rb,
lib/google/apis/run_v1/representations.rb,
lib/google/apis/run_v1/representations.rb

Overview

WorkerPoolSpec holds the desired state of the WorkerPool's template and instance splits.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkerPoolSpec

Returns a new instance of WorkerPoolSpec.



6578
6579
6580
# File 'lib/google/apis/run_v1/classes.rb', line 6578

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#instance_splitsArray<Google::Apis::RunV1::InstanceSplit>

Specifies how to distribute instances over a collection of Revisions. Corresponds to the JSON property instanceSplits



6570
6571
6572
# File 'lib/google/apis/run_v1/classes.rb', line 6570

def instance_splits
  @instance_splits
end

#templateGoogle::Apis::RunV1::RevisionTemplate

RevisionTemplateSpec describes the data a revision should have when created from a template. Corresponds to the JSON property template



6576
6577
6578
# File 'lib/google/apis/run_v1/classes.rb', line 6576

def template
  @template
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6583
6584
6585
6586
# File 'lib/google/apis/run_v1/classes.rb', line 6583

def update!(**args)
  @instance_splits = args[:instance_splits] if args.key?(:instance_splits)
  @template = args[:template] if args.key?(:template)
end