Class: Google::Apis::ComputeAlpha::ReservationAffinity

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

Overview

AllocationAffinity is the configuration of desired allocation which this instance 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



23679
23680
23681
# File 'generated/google/apis/compute_alpha/classes.rb', line 23679

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

Instance Attribute Details

#consume_reservation_typeString

Corresponds to the JSON property consumeReservationType

Returns:

  • (String)


23667
23668
23669
# File 'generated/google/apis/compute_alpha/classes.rb', line 23667

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)


23672
23673
23674
# File 'generated/google/apis/compute_alpha/classes.rb', line 23672

def key
  @key
end

#valuesArray<String>

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

Returns:

  • (Array<String>)


23677
23678
23679
# File 'generated/google/apis/compute_alpha/classes.rb', line 23677

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



23684
23685
23686
23687
23688
# File 'generated/google/apis/compute_alpha/classes.rb', line 23684

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