Class: OCI::Opsi::Models::HostGpuConfiguration
- Inherits:
-
HostConfigurationMetricGroup
- Object
- HostConfigurationMetricGroup
- OCI::Opsi::Models::HostGpuConfiguration
- Defined in:
- lib/oci/opsi/models/host_gpu_configuration.rb
Overview
GPU configuration metrics
Constant Summary
Constants inherited from HostConfigurationMetricGroup
OCI::Opsi::Models::HostConfigurationMetricGroup::METRIC_NAME_ENUM
Instance Attribute Summary collapse
-
#bus_id ⇒ String
[Required] Bus Identifier.
-
#bus_width ⇒ Integer
[Required] Bus Width.
-
#cuda_version ⇒ String
[Required] CUDA library version.
-
#driver_version ⇒ String
[Required] GPU Driver version.
-
#gpu_capabilities ⇒ String
GPU Capabilities.
-
#gpu_id ⇒ Integer
[Required] GPU Identifier.
-
#product_name ⇒ String
[Required] GPU Product Name.
-
#total_graphics_clock_speed ⇒ Float
[Required] Max Graphics Clock Speed.
-
#total_memory ⇒ Float
[Required] Total Memory Allocated to GPU.
-
#total_memory_clock_speed ⇒ Float
[Required] Max Memory Clock Speed.
-
#total_power ⇒ Float
[Required] Power Capacity.
-
#total_sm_clock_speed ⇒ Float
[Required] Max SM (Streaming Multiprocessor) Clock Speed.
-
#total_video_clock_speed ⇒ Float
[Required] Max Video Clock Speed.
-
#vendor ⇒ String
[Required] GPU Vendor.
Attributes inherited from HostConfigurationMetricGroup
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ HostGpuConfiguration
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from HostConfigurationMetricGroup
Constructor Details
#initialize(attributes = {}) ⇒ HostGpuConfiguration
Initializes the object
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 138 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['metricName'] = 'HOST_GPU_CONFIGURATION' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.gpu_id = attributes[:'gpuId'] if attributes[:'gpuId'] raise 'You cannot provide both :gpuId and :gpu_id' if attributes.key?(:'gpuId') && attributes.key?(:'gpu_id') self.gpu_id = attributes[:'gpu_id'] if attributes[:'gpu_id'] self.product_name = attributes[:'productName'] if attributes[:'productName'] raise 'You cannot provide both :productName and :product_name' if attributes.key?(:'productName') && attributes.key?(:'product_name') self.product_name = attributes[:'product_name'] if attributes[:'product_name'] self.vendor = attributes[:'vendor'] if attributes[:'vendor'] self.bus_id = attributes[:'busId'] if attributes[:'busId'] raise 'You cannot provide both :busId and :bus_id' if attributes.key?(:'busId') && attributes.key?(:'bus_id') self.bus_id = attributes[:'bus_id'] if attributes[:'bus_id'] self.bus_width = attributes[:'busWidth'] if attributes[:'busWidth'] raise 'You cannot provide both :busWidth and :bus_width' if attributes.key?(:'busWidth') && attributes.key?(:'bus_width') self.bus_width = attributes[:'bus_width'] if attributes[:'bus_width'] self.gpu_capabilities = attributes[:'gpuCapabilities'] if attributes[:'gpuCapabilities'] raise 'You cannot provide both :gpuCapabilities and :gpu_capabilities' if attributes.key?(:'gpuCapabilities') && attributes.key?(:'gpu_capabilities') self.gpu_capabilities = attributes[:'gpu_capabilities'] if attributes[:'gpu_capabilities'] self.total_power = attributes[:'totalPower'] if attributes[:'totalPower'] raise 'You cannot provide both :totalPower and :total_power' if attributes.key?(:'totalPower') && attributes.key?(:'total_power') self.total_power = attributes[:'total_power'] if attributes[:'total_power'] self.total_memory = attributes[:'totalMemory'] if attributes[:'totalMemory'] raise 'You cannot provide both :totalMemory and :total_memory' if attributes.key?(:'totalMemory') && attributes.key?(:'total_memory') self.total_memory = attributes[:'total_memory'] if attributes[:'total_memory'] self.total_video_clock_speed = attributes[:'totalVideoClockSpeed'] if attributes[:'totalVideoClockSpeed'] raise 'You cannot provide both :totalVideoClockSpeed and :total_video_clock_speed' if attributes.key?(:'totalVideoClockSpeed') && attributes.key?(:'total_video_clock_speed') self.total_video_clock_speed = attributes[:'total_video_clock_speed'] if attributes[:'total_video_clock_speed'] self.total_sm_clock_speed = attributes[:'totalSmClockSpeed'] if attributes[:'totalSmClockSpeed'] raise 'You cannot provide both :totalSmClockSpeed and :total_sm_clock_speed' if attributes.key?(:'totalSmClockSpeed') && attributes.key?(:'total_sm_clock_speed') self.total_sm_clock_speed = attributes[:'total_sm_clock_speed'] if attributes[:'total_sm_clock_speed'] self.total_graphics_clock_speed = attributes[:'totalGraphicsClockSpeed'] if attributes[:'totalGraphicsClockSpeed'] raise 'You cannot provide both :totalGraphicsClockSpeed and :total_graphics_clock_speed' if attributes.key?(:'totalGraphicsClockSpeed') && attributes.key?(:'total_graphics_clock_speed') self.total_graphics_clock_speed = attributes[:'total_graphics_clock_speed'] if attributes[:'total_graphics_clock_speed'] self.total_memory_clock_speed = attributes[:'totalMemoryClockSpeed'] if attributes[:'totalMemoryClockSpeed'] raise 'You cannot provide both :totalMemoryClockSpeed and :total_memory_clock_speed' if attributes.key?(:'totalMemoryClockSpeed') && attributes.key?(:'total_memory_clock_speed') self.total_memory_clock_speed = attributes[:'total_memory_clock_speed'] if attributes[:'total_memory_clock_speed'] self.cuda_version = attributes[:'cudaVersion'] if attributes[:'cudaVersion'] raise 'You cannot provide both :cudaVersion and :cuda_version' if attributes.key?(:'cudaVersion') && attributes.key?(:'cuda_version') self.cuda_version = attributes[:'cuda_version'] if attributes[:'cuda_version'] self.driver_version = attributes[:'driverVersion'] if attributes[:'driverVersion'] raise 'You cannot provide both :driverVersion and :driver_version' if attributes.key?(:'driverVersion') && attributes.key?(:'driver_version') self.driver_version = attributes[:'driver_version'] if attributes[:'driver_version'] end |
Instance Attribute Details
#bus_id ⇒ String
[Required] Bus Identifier
27 28 29 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 27 def bus_id @bus_id end |
#bus_width ⇒ Integer
[Required] Bus Width
31 32 33 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 31 def bus_width @bus_width end |
#cuda_version ⇒ String
[Required] CUDA library version
63 64 65 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 63 def cuda_version @cuda_version end |
#driver_version ⇒ String
[Required] GPU Driver version
67 68 69 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 67 def driver_version @driver_version end |
#gpu_capabilities ⇒ String
GPU Capabilities
35 36 37 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 35 def gpu_capabilities @gpu_capabilities end |
#gpu_id ⇒ Integer
[Required] GPU Identifier
15 16 17 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 15 def gpu_id @gpu_id end |
#product_name ⇒ String
[Required] GPU Product Name
19 20 21 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 19 def product_name @product_name end |
#total_graphics_clock_speed ⇒ Float
[Required] Max Graphics Clock Speed
55 56 57 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 55 def total_graphics_clock_speed @total_graphics_clock_speed end |
#total_memory ⇒ Float
[Required] Total Memory Allocated to GPU
43 44 45 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 43 def total_memory @total_memory end |
#total_memory_clock_speed ⇒ Float
[Required] Max Memory Clock Speed
59 60 61 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 59 def total_memory_clock_speed @total_memory_clock_speed end |
#total_power ⇒ Float
[Required] Power Capacity
39 40 41 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 39 def total_power @total_power end |
#total_sm_clock_speed ⇒ Float
[Required] Max SM (Streaming Multiprocessor) Clock Speed
51 52 53 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 51 def total_sm_clock_speed @total_sm_clock_speed end |
#total_video_clock_speed ⇒ Float
[Required] Max Video Clock Speed
47 48 49 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 47 def total_video_clock_speed @total_video_clock_speed end |
#vendor ⇒ String
[Required] GPU Vendor
23 24 25 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 23 def vendor @vendor end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 70 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_name': :'metricName', 'time_collected': :'timeCollected', 'gpu_id': :'gpuId', 'product_name': :'productName', 'vendor': :'vendor', 'bus_id': :'busId', 'bus_width': :'busWidth', 'gpu_capabilities': :'gpuCapabilities', 'total_power': :'totalPower', 'total_memory': :'totalMemory', 'total_video_clock_speed': :'totalVideoClockSpeed', 'total_sm_clock_speed': :'totalSmClockSpeed', 'total_graphics_clock_speed': :'totalGraphicsClockSpeed', 'total_memory_clock_speed': :'totalMemoryClockSpeed', 'cuda_version': :'cudaVersion', 'driver_version': :'driverVersion' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 94 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_name': :'String', 'time_collected': :'DateTime', 'gpu_id': :'Integer', 'product_name': :'String', 'vendor': :'String', 'bus_id': :'String', 'bus_width': :'Integer', 'gpu_capabilities': :'String', 'total_power': :'Float', 'total_memory': :'Float', 'total_video_clock_speed': :'Float', 'total_sm_clock_speed': :'Float', 'total_graphics_clock_speed': :'Float', 'total_memory_clock_speed': :'Float', 'cuda_version': :'String', 'driver_version': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 236 def ==(other) return true if equal?(other) self.class == other.class && metric_name == other.metric_name && time_collected == other.time_collected && gpu_id == other.gpu_id && product_name == other.product_name && vendor == other.vendor && bus_id == other.bus_id && bus_width == other.bus_width && gpu_capabilities == other.gpu_capabilities && total_power == other.total_power && total_memory == other.total_memory && total_video_clock_speed == other.total_video_clock_speed && total_sm_clock_speed == other.total_sm_clock_speed && total_graphics_clock_speed == other.total_graphics_clock_speed && total_memory_clock_speed == other.total_memory_clock_speed && cuda_version == other.cuda_version && driver_version == other.driver_version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 281 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
261 262 263 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 261 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
270 271 272 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 270 def hash [metric_name, time_collected, gpu_id, product_name, vendor, bus_id, bus_width, gpu_capabilities, total_power, total_memory, total_video_clock_speed, total_sm_clock_speed, total_graphics_clock_speed, total_memory_clock_speed, cuda_version, driver_version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 314 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
308 309 310 |
# File 'lib/oci/opsi/models/host_gpu_configuration.rb', line 308 def to_s to_hash.to_s end |