Class: Google::Apis::RunV2::GoogleCloudRunV2InstanceSplit

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#percentFixnum

Specifies percent of the instance split to this Revision. This defaults to zero if unspecified. Corresponds to the JSON property percent

Returns:

  • (Fixnum)


1228
1229
1230
# File 'lib/google/apis/run_v2/classes.rb', line 1228

def percent
  @percent
end

#revisionString

Revision to which to assign this portion of instances, if split allocation is by revision. Corresponds to the JSON property revision

Returns:

  • (String)


1234
1235
1236
# File 'lib/google/apis/run_v2/classes.rb', line 1234

def revision
  @revision
end

#typeString

The allocation type for this instance split. Corresponds to the JSON property type

Returns:

  • (String)


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