Class: Google::Apis::NotebooksV2::AcceleratorConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/notebooks_v2/classes.rb,
lib/google/apis/notebooks_v2/representations.rb,
lib/google/apis/notebooks_v2/representations.rb

Overview

An accelerator configuration for a VM instance Definition of a hardware accelerator. Note that there is no check on type and core_count combinations. TPUs are not supported. See GPUs on Compute Engine to find a valid combination.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AcceleratorConfig

Returns a new instance of AcceleratorConfig.



42
43
44
# File 'lib/google/apis/notebooks_v2/classes.rb', line 42

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

Instance Attribute Details

#core_countFixnum

Optional. Count of cores of this accelerator. Corresponds to the JSON property coreCount

Returns:

  • (Fixnum)


35
36
37
# File 'lib/google/apis/notebooks_v2/classes.rb', line 35

def core_count
  @core_count
end

#typeString

Optional. Type of this accelerator. Corresponds to the JSON property type

Returns:

  • (String)


40
41
42
# File 'lib/google/apis/notebooks_v2/classes.rb', line 40

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



47
48
49
50
# File 'lib/google/apis/notebooks_v2/classes.rb', line 47

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