Class: OvirtSDK4::DynamicCpu
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#cpu_tune ⇒ CpuTune
Returns the value of the
cpu_tune
attribute. -
#cpu_tune=(value) ⇒ Object
Sets the value of the
cpu_tune
attribute. -
#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
topology
attribute. -
#topology=(value) ⇒ Object
Sets the value of the
topology
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DynamicCpu
Creates a new instance of the OvirtSDK4::DynamicCpu class.
3420 3421 3422 3423 3424 |
# File 'lib/ovirtsdk4/types.rb', line 3420 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.
3429 3430 3431 3432 3433 |
# File 'lib/ovirtsdk4/types.rb', line 3429 def ==(other) super && @cpu_tune == other.cpu_tune && @topology == other.topology end |
#cpu_tune ⇒ CpuTune
Returns the value of the cpu_tune
attribute.
3363 3364 3365 |
# File 'lib/ovirtsdk4/types.rb', line 3363 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.
3376 3377 3378 3379 3380 3381 |
# File 'lib/ovirtsdk4/types.rb', line 3376 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.
3438 3439 3440 3441 3442 |
# File 'lib/ovirtsdk4/types.rb', line 3438 def hash super + @cpu_tune.hash + @topology.hash end |
#topology ⇒ CpuTopology
Returns the value of the topology
attribute.
3388 3389 3390 |
# File 'lib/ovirtsdk4/types.rb', line 3388 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.
3401 3402 3403 3404 3405 3406 |
# File 'lib/ovirtsdk4/types.rb', line 3401 def topology=(value) if value.is_a?(Hash) value = CpuTopology.new(value) end @topology = value end |