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.



1689
1690
1691
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1689

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)


1674
1675
1676
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1674

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)


1679
1680
1681
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1679

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


1687
1688
1689
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1687

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1694
1695
1696
1697
1698
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1694

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