Class: Google::Apis::TpuV2alpha1::AcceleratorType

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

A accelerator type that a Node can be configured with.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AcceleratorType

Returns a new instance of AcceleratorType.



69
70
71
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 69

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

Instance Attribute Details

#accelerator_configsArray<Google::Apis::TpuV2alpha1::AcceleratorConfig>

The accelerator config. Corresponds to the JSON property acceleratorConfigs



57
58
59
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 57

def accelerator_configs
  @accelerator_configs
end

#nameString

The resource name. Corresponds to the JSON property name

Returns:

  • (String)


62
63
64
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 62

def name
  @name
end

#typeString

The accelerator type. Corresponds to the JSON property type

Returns:

  • (String)


67
68
69
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 67

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



74
75
76
77
78
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 74

def update!(**args)
  @accelerator_configs = args[:accelerator_configs] if args.key?(:accelerator_configs)
  @name = args[:name] if args.key?(:name)
  @type = args[:type] if args.key?(:type)
end