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.
955 956 957 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 955 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
936 937 938 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 936 def multislice_params @multislice_params end |
#node ⇒ Google::Apis::TpuV2::Node
A TPU instance.
Corresponds to the JSON property node
941 942 943 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 941 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
948 949 950 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 948 def node_id @node_id end |
#parent ⇒ String
Required. The parent resource name.
Corresponds to the JSON property parent
953 954 955 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 953 def parent @parent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
960 961 962 963 964 965 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 960 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 |