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.



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

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)


1733
1734
1735
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1733

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)


1738
1739
1740
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1738

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


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

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1753
1754
1755
1756
1757
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1753

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