Class: Google::Apis::BackupdrV1::AllocationAffinity

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

Overview

Specifies the reservations that this instance can consume from.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AllocationAffinity

Returns a new instance of AllocationAffinity.



237
238
239
# File 'lib/google/apis/backupdr_v1/classes.rb', line 237

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

Instance Attribute Details

#consume_reservation_typeString

Optional. Specifies the type of reservation from which this instance can consume Corresponds to the JSON property consumeReservationType

Returns:

  • (String)


225
226
227
# File 'lib/google/apis/backupdr_v1/classes.rb', line 225

def consume_reservation_type
  @consume_reservation_type
end

#keyString

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

Returns:

  • (String)


230
231
232
# File 'lib/google/apis/backupdr_v1/classes.rb', line 230

def key
  @key
end

#valuesArray<String>

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

Returns:

  • (Array<String>)


235
236
237
# File 'lib/google/apis/backupdr_v1/classes.rb', line 235

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



242
243
244
245
246
# File 'lib/google/apis/backupdr_v1/classes.rb', line 242

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