Class: Google::Apis::TpuV2alpha1::SchedulingConfig

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

Overview

Sets the scheduling options for this node.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SchedulingConfig

Returns a new instance of SchedulingConfig.



1545
1546
1547
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1545

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

Instance Attribute Details

#preemptibleBoolean Also known as: preemptible?

Defines whether the node is preemptible. Corresponds to the JSON property preemptible

Returns:

  • (Boolean)


1530
1531
1532
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1530

def preemptible
  @preemptible
end

#reservedBoolean Also known as: reserved?

Whether the node is created under a reservation. Corresponds to the JSON property reserved

Returns:

  • (Boolean)


1536
1537
1538
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1536

def reserved
  @reserved
end

#spotBoolean Also known as: spot?

Optional. Defines whether the node is Spot VM. Corresponds to the JSON property spot

Returns:

  • (Boolean)


1542
1543
1544
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1542

def spot
  @spot
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1550
1551
1552
1553
1554
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1550

def update!(**args)
  @preemptible = args[:preemptible] if args.key?(:preemptible)
  @reserved = args[:reserved] if args.key?(:reserved)
  @spot = args[:spot] if args.key?(:spot)
end