Class: Google::Apis::TpuV2::NodeSpec
- Inherits:
-
Object
- Object
- Google::Apis::TpuV2::NodeSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/tpu_v2/classes.rb,
lib/google/apis/tpu_v2/representations.rb,
lib/google/apis/tpu_v2/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
-
#multislice_params ⇒ Google::Apis::TpuV2::MultisliceParams
Parameters to specify for multislice QueuedResource requests.
-
#node ⇒ Google::Apis::TpuV2::Node
A TPU instance.
-
#node_id ⇒ String
Optional.
-
#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.
1027 1028 1029 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1027 def initialize(**args) update!(**args) end |
Instance Attribute Details
#multislice_params ⇒ Google::Apis::TpuV2::MultisliceParams
Parameters to specify for multislice QueuedResource requests. This message
must be populated in case of multislice requests instead of node_id.
Corresponds to the JSON property multisliceParams
1008 1009 1010 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1008 def multislice_params @multislice_params end |
#node ⇒ Google::Apis::TpuV2::Node
A TPU instance.
Corresponds to the JSON property node
1013 1014 1015 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1013 def node @node end |
#node_id ⇒ String
Optional. 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 multislice requests, multislice_params must be populated instead.
Corresponds to the JSON property nodeId
1020 1021 1022 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1020 def node_id @node_id end |
#parent ⇒ String
Required. The parent resource name.
Corresponds to the JSON property parent
1025 1026 1027 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1025 def parent @parent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1032 1033 1034 1035 1036 1037 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1032 def update!(**args) @multislice_params = args[:multislice_params] if args.key?(:multislice_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 |