Class: Google::Apis::ContainerV1beta1::ReservationAffinity

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ReservationAffinity

Returns a new instance of ReservationAffinity.



3261
3262
3263
# File 'generated/google/apis/container_v1beta1/classes.rb', line 3261

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)


3249
3250
3251
# File 'generated/google/apis/container_v1beta1/classes.rb', line 3249

def consume_reservation_type
  @consume_reservation_type
end

#keyString

Corresponds to the label key of reservation resource. Corresponds to the JSON property key

Returns:

  • (String)


3254
3255
3256
# File 'generated/google/apis/container_v1beta1/classes.rb', line 3254

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>)


3259
3260
3261
# File 'generated/google/apis/container_v1beta1/classes.rb', line 3259

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3266
3267
3268
3269
3270
# File 'generated/google/apis/container_v1beta1/classes.rb', line 3266

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