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.



1614
1615
1616
# File 'lib/google/apis/run_v2/classes.rb', line 1614

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)


1601
1602
1603
# File 'lib/google/apis/run_v2/classes.rb', line 1601

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)


1607
1608
1609
# File 'lib/google/apis/run_v2/classes.rb', line 1607

def revision
  @revision
end

#typeString

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

Returns:

  • (String)


1612
1613
1614
# File 'lib/google/apis/run_v2/classes.rb', line 1612

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1619
1620
1621
1622
1623
# File 'lib/google/apis/run_v2/classes.rb', line 1619

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