Class: Google::Apis::ContainerV1::NodeAffinity

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

Overview

Specifies the NodeAffinity key, values, and affinity operator according to shared sole tenant node group affinities.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NodeAffinity

Returns a new instance of NodeAffinity.



4279
4280
4281
# File 'lib/google/apis/container_v1/classes.rb', line 4279

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

Instance Attribute Details

#keyString

Key for NodeAffinity. Corresponds to the JSON property key

Returns:

  • (String)


4267
4268
4269
# File 'lib/google/apis/container_v1/classes.rb', line 4267

def key
  @key
end

#operatorString

Operator for NodeAffinity. Corresponds to the JSON property operator

Returns:

  • (String)


4272
4273
4274
# File 'lib/google/apis/container_v1/classes.rb', line 4272

def operator
  @operator
end

#valuesArray<String>

Values for NodeAffinity. Corresponds to the JSON property values

Returns:

  • (Array<String>)


4277
4278
4279
# File 'lib/google/apis/container_v1/classes.rb', line 4277

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4284
4285
4286
4287
4288
# File 'lib/google/apis/container_v1/classes.rb', line 4284

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