Class: Google::Apis::TpuV2alpha1::NodeSpec
- Inherits:
-
Object
- Object
- Google::Apis::TpuV2alpha1::NodeSpec
- 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
-
#multi_node_params ⇒ Google::Apis::TpuV2alpha1::MultiNodeParams
Parameters to specify for multi-node QueuedResource requests.
-
#node ⇒ Google::Apis::TpuV2alpha1::Node
A TPU instance.
-
#node_id ⇒ String
The unqualified resource name.
-
#parent ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NodeSpec
constructor
A new instance of NodeSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NodeSpec
Returns a new instance of NodeSpec.
1158 1159 1160 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1158 def initialize(**args) update!(**args) end |
Instance Attribute Details
#multi_node_params ⇒ Google::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
1138 1139 1140 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1138 def multi_node_params @multi_node_params end |
#node ⇒ Google::Apis::TpuV2alpha1::Node
A TPU instance.
Corresponds to the JSON property node
1143 1144 1145 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1143 def node @node end |
#node_id ⇒ String
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
1151 1152 1153 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1151 def node_id @node_id end |
#parent ⇒ String
Required. The parent resource name.
Corresponds to the JSON property parent
1156 1157 1158 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1156 def parent @parent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1163 1164 1165 1166 1167 1168 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1163 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 |