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.
1065 1066 1067 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1065 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
1045 1046 1047 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1045 def multi_node_params @multi_node_params end |
#node ⇒ Google::Apis::TpuV2alpha1::Node
A TPU instance.
Corresponds to the JSON property node
1050 1051 1052 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1050 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
1058 1059 1060 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1058 def node_id @node_id end |
#parent ⇒ String
Required. The parent resource name.
Corresponds to the JSON property parent
1063 1064 1065 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1063 def parent @parent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1070 1071 1072 1073 1074 1075 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1070 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 |