Class: Google::Apis::WorkstationsV1beta::ReservationAffinity

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

Overview

ReservationAffinity is the configuration of the desired reservation from which instances can consume resources.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReservationAffinity

Returns a new instance of ReservationAffinity.



1762
1763
1764
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1762

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

Instance Attribute Details

#consume_reservation_typeString

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

Returns:

  • (String)


1747
1748
1749
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1747

def consume_reservation_type
  @consume_reservation_type
end

#keyString

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

Returns:

  • (String)


1752
1753
1754
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1752

def key
  @key
end

#valuesArray<String>

Optional. Corresponds to the label values of reservation resources. Valid values are either the name of a reservation in the same project or "projects/ project/reservations/reservation" to target a shared reservation in the same zone but in a different project. Corresponds to the JSON property values

Returns:

  • (Array<String>)


1760
1761
1762
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1760

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1767
1768
1769
1770
1771
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1767

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