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.



1703
1704
1705
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1703

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)


1673
1674
1675
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1673

def preemptible
  @preemptible
end

#provisioning_modelString

Optional. Defines the provisioning model for the node. Corresponds to the JSON property provisioningModel

Returns:

  • (String)


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

def provisioning_model
  @provisioning_model
end

#reservation_nameString

Optional. Name of the reservation in which the node should be provisioned. Corresponds to the JSON property reservationName

Returns:

  • (String)


1684
1685
1686
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1684

def reservation_name
  @reservation_name
end

#reservedBoolean Also known as: reserved?

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

Returns:

  • (Boolean)


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

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)


1695
1696
1697
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1695

def spot
  @spot
end

#termination_timestampString

Output only. The time at which the node will be terminated. Corresponds to the JSON property terminationTimestamp

Returns:

  • (String)


1701
1702
1703
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1701

def termination_timestamp
  @termination_timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1708
1709
1710
1711
1712
1713
1714
1715
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1708

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