Class: OvirtSDK4::DynamicCpu
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#cpu_tune ⇒ CpuTune
Returns the value of the
cpu_tuneattribute. -
#cpu_tune=(value) ⇒ Object
Sets the value of the
cpu_tuneattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ DynamicCpu
constructor
Creates a new instance of the DynamicCpu class.
-
#topology ⇒ CpuTopology
Returns the value of the
topologyattribute. -
#topology=(value) ⇒ Object
Sets the value of the
topologyattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DynamicCpu
Creates a new instance of the OvirtSDK4::DynamicCpu class.
3476 3477 3478 3479 3480 |
# File 'lib/ovirtsdk4/types.rb', line 3476 def initialize(opts = {}) super(opts) self.cpu_tune = opts[:cpu_tune] self.topology = opts[:topology] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
3485 3486 3487 3488 3489 |
# File 'lib/ovirtsdk4/types.rb', line 3485 def ==(other) super && @cpu_tune == other.cpu_tune && @topology == other.topology end |
#cpu_tune ⇒ CpuTune
Returns the value of the cpu_tune attribute.
3419 3420 3421 |
# File 'lib/ovirtsdk4/types.rb', line 3419 def cpu_tune @cpu_tune end |
#cpu_tune=(value) ⇒ Object
Sets the value of the cpu_tune attribute.
The value parameter can be an instance of CpuTune or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
3432 3433 3434 3435 3436 3437 |
# File 'lib/ovirtsdk4/types.rb', line 3432 def cpu_tune=(value) if value.is_a?(Hash) value = CpuTune.new(value) end @cpu_tune = value end |
#hash ⇒ Object
Generates a hash value for this object.
3494 3495 3496 3497 3498 |
# File 'lib/ovirtsdk4/types.rb', line 3494 def hash super + @cpu_tune.hash + @topology.hash end |
#topology ⇒ CpuTopology
Returns the value of the topology attribute.
3444 3445 3446 |
# File 'lib/ovirtsdk4/types.rb', line 3444 def topology @topology end |
#topology=(value) ⇒ Object
Sets the value of the topology attribute.
The value parameter can be an instance of CpuTopology or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
3457 3458 3459 3460 3461 3462 |
# File 'lib/ovirtsdk4/types.rb', line 3457 def topology=(value) if value.is_a?(Hash) value = CpuTopology.new(value) end @topology = value end |