Class: Google::Apis::TpuV2alpha1::NodeSpec

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

Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NodeSpec

Returns a new instance of NodeSpec.



1051
1052
1053
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1051

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

Instance Attribute Details

#multi_node_paramsGoogle::Apis::TpuV2alpha1::MultiNodeParams

Parameters to specify for multi-node QueuedResource requests. This field must be populated in case of multi-node requests instead of node_id. It's an error to specify both node_id and multi_node_params. Corresponds to the JSON property multiNodeParams



1031
1032
1033
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1031

def multi_node_params
  @multi_node_params
end

#nodeGoogle::Apis::TpuV2alpha1::Node

A TPU instance. Corresponds to the JSON property node



1036
1037
1038
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1036

def node
  @node
end

#node_idString

The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ regex format. This is only specified when requesting a single node. In case of multi- node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params. Corresponds to the JSON property nodeId

Returns:

  • (String)


1044
1045
1046
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1044

def node_id
  @node_id
end

#parentString

Required. The parent resource name. Corresponds to the JSON property parent

Returns:

  • (String)


1049
1050
1051
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1049

def parent
  @parent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1056
1057
1058
1059
1060
1061
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1056

def update!(**args)
  @multi_node_params = args[:multi_node_params] if args.key?(:multi_node_params)
  @node = args[:node] if args.key?(:node)
  @node_id = args[:node_id] if args.key?(:node_id)
  @parent = args[:parent] if args.key?(:parent)
end