Class: Google::Apis::ContainerV1::ReservationAffinity

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

Overview

ReservationAffinity is the configuration of desired reservation which instances could take capacity from.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReservationAffinity

Returns a new instance of ReservationAffinity.



4388
4389
4390
# File 'lib/google/apis/container_v1/classes.rb', line 4388

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

Instance Attribute Details

#consume_reservation_typeString

Corresponds to the type of reservation consumption. Corresponds to the JSON property consumeReservationType

Returns:

  • (String)


4374
4375
4376
# File 'lib/google/apis/container_v1/classes.rb', line 4374

def consume_reservation_type
  @consume_reservation_type
end

#keyString

Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. Corresponds to the JSON property key

Returns:

  • (String)


4381
4382
4383
# File 'lib/google/apis/container_v1/classes.rb', line 4381

def key
  @key
end

#valuesArray<String>

Corresponds to the label value(s) of reservation resource(s). Corresponds to the JSON property values

Returns:

  • (Array<String>)


4386
4387
4388
# File 'lib/google/apis/container_v1/classes.rb', line 4386

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4393
4394
4395
4396
4397
# File 'lib/google/apis/container_v1/classes.rb', line 4393

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