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.



933
934
935
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 933

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

Instance Attribute Details

#nodeGoogle::Apis::TpuV2alpha1::Node

A TPU instance. Corresponds to the JSON property node



918
919
920
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 918

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)


926
927
928
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 926

def node_id
  @node_id
end

#parentString

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

Returns:

  • (String)


931
932
933
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 931

def parent
  @parent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



938
939
940
941
942
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 938

def update!(**args)
  @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