Class: Google::Apis::RunV2::GoogleCloudRunV2InstanceSplit
- Inherits:
-
Object
- Object
- Google::Apis::RunV2::GoogleCloudRunV2InstanceSplit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v2/classes.rb,
lib/google/apis/run_v2/representations.rb,
lib/google/apis/run_v2/representations.rb
Overview
Holds a single instance split entry for the Worker. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.
Instance Attribute Summary collapse
-
#percent ⇒ Fixnum
Specifies percent of the instance split to this Revision.
-
#revision ⇒ String
Revision to which to assign this portion of instances, if split allocation is by revision.
-
#type ⇒ String
The allocation type for this instance split.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRunV2InstanceSplit
constructor
A new instance of GoogleCloudRunV2InstanceSplit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRunV2InstanceSplit
Returns a new instance of GoogleCloudRunV2InstanceSplit.
1241 1242 1243 |
# File 'lib/google/apis/run_v2/classes.rb', line 1241 def initialize(**args) update!(**args) end |
Instance Attribute Details
#percent ⇒ Fixnum
Specifies percent of the instance split to this Revision. This defaults to
zero if unspecified.
Corresponds to the JSON property percent
1228 1229 1230 |
# File 'lib/google/apis/run_v2/classes.rb', line 1228 def percent @percent end |
#revision ⇒ String
Revision to which to assign this portion of instances, if split allocation is
by revision.
Corresponds to the JSON property revision
1234 1235 1236 |
# File 'lib/google/apis/run_v2/classes.rb', line 1234 def revision @revision end |
#type ⇒ String
The allocation type for this instance split.
Corresponds to the JSON property type
1239 1240 1241 |
# File 'lib/google/apis/run_v2/classes.rb', line 1239 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1246 1247 1248 1249 1250 |
# File 'lib/google/apis/run_v2/classes.rb', line 1246 def update!(**args) @percent = args[:percent] if args.key?(:percent) @revision = args[:revision] if args.key?(:revision) @type = args[:type] if args.key?(:type) end |