class OvirtSDK4::DynamicCpu
Public Class Methods
Creates a new instance of the {DynamicCpu} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [CpuTune, Hash] :cpu_tune The value of attribute `cpu_tune`.
@option opts [CpuTopology, Hash] :topology The value of attribute `topology`.
OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 3420 def initialize(opts = {}) super(opts) self.cpu_tune = opts[:cpu_tune] self.topology = opts[:topology] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 3429 def ==(other) super && @cpu_tune == other.cpu_tune && @topology == other.topology end
Returns the value of the `cpu_tune` attribute.
@return [CpuTune]
# File lib/ovirtsdk4/types.rb, line 3363 def cpu_tune @cpu_tune end
Sets the value of the `cpu_tune` attribute.
@param value [CpuTune, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# 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
Generates a hash value for this object.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 3438 def hash super + @cpu_tune.hash + @topology.hash end
Returns the value of the `topology` attribute.
@return [CpuTopology]
# File lib/ovirtsdk4/types.rb, line 3388 def topology @topology end
Sets the value of the `topology` attribute.
@param value [CpuTopology, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 3401 def topology=(value) if value.is_a?(Hash) value = CpuTopology.new(value) end @topology = value end