Class: Google::Apis::ComputeAlpha::InstanceAllocationAffinity

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

Returns a new instance of InstanceAllocationAffinity



9077
9078
9079
# File 'generated/google/apis/compute_alpha/classes.rb', line 9077

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

Instance Attribute Details

#consume_allocation_typeString

Corresponds to the JSON property consumeAllocationType

Returns:

  • (String)


9065
9066
9067
# File 'generated/google/apis/compute_alpha/classes.rb', line 9065

def consume_allocation_type
  @consume_allocation_type
end

#keyString

Corresponds to the label key of Allocation resource. Corresponds to the JSON property key

Returns:

  • (String)


9070
9071
9072
# File 'generated/google/apis/compute_alpha/classes.rb', line 9070

def key
  @key
end

#valuesArray<String>

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

Returns:

  • (Array<String>)


9075
9076
9077
# File 'generated/google/apis/compute_alpha/classes.rb', line 9075

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9082
9083
9084
9085
9086
# File 'generated/google/apis/compute_alpha/classes.rb', line 9082

def update!(**args)
  @consume_allocation_type = args[:consume_allocation_type] if args.key?(:consume_allocation_type)
  @key = args[:key] if args.key?(:key)
  @values = args[:values] if args.key?(:values)
end