class OvirtSDK4::MigrationOptions
Public Class Methods
Creates a new instance of the {MigrationOptions} 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 [InheritableBoolean] :auto_converge The value of attribute `auto_converge`.
@option opts [MigrationBandwidth, Hash] :bandwidth The value of attribute `bandwidth`.
@option opts [InheritableBoolean] :compressed The value of attribute `compressed`.
@option opts [InheritableBoolean] :encrypted The value of attribute `encrypted`.
@option opts [MigrationPolicy, Hash] :policy The value of attribute `policy`.
# File lib/ovirtsdk4/types.rb, line 9587 def initialize(opts = {}) super(opts) self.auto_converge = opts[:auto_converge] self.bandwidth = opts[:bandwidth] self.compressed = opts[:compressed] self.encrypted = opts[:encrypted] self.policy = opts[:policy] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 9599 def ==(other) super && @auto_converge == other.auto_converge && @bandwidth == other.bandwidth && @compressed == other.compressed && @encrypted == other.encrypted && @policy == other.policy end
Returns the value of the `auto_converge` attribute.
@return [InheritableBoolean]
# File lib/ovirtsdk4/types.rb, line 9470 def auto_converge @auto_converge end
Sets the value of the `auto_converge` attribute.
@param value [InheritableBoolean]
# File lib/ovirtsdk4/types.rb, line 9479 def auto_converge=(value) @auto_converge = value end
Returns the value of the `bandwidth` attribute.
@return [MigrationBandwidth]
# File lib/ovirtsdk4/types.rb, line 9488 def bandwidth @bandwidth end
Sets the value of the `bandwidth` attribute.
@param value [MigrationBandwidth, Hash]
The `value` parameter can be an instance of {OvirtSDK4::MigrationBandwidth} 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 9501 def bandwidth=(value) if value.is_a?(Hash) value = MigrationBandwidth.new(value) end @bandwidth = value end
Returns the value of the `compressed` attribute.
@return [InheritableBoolean]
# File lib/ovirtsdk4/types.rb, line 9513 def compressed @compressed end
Sets the value of the `compressed` attribute.
@param value [InheritableBoolean]
# File lib/ovirtsdk4/types.rb, line 9522 def compressed=(value) @compressed = value end
Returns the value of the `encrypted` attribute.
@return [InheritableBoolean]
# File lib/ovirtsdk4/types.rb, line 9531 def encrypted @encrypted end
Sets the value of the `encrypted` attribute.
@param value [InheritableBoolean]
# File lib/ovirtsdk4/types.rb, line 9540 def encrypted=(value) @encrypted = value end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 9611 def hash super + @auto_converge.hash + @bandwidth.hash + @compressed.hash + @encrypted.hash + @policy.hash end
Returns the value of the `policy` attribute.
@return [MigrationPolicy]
# File lib/ovirtsdk4/types.rb, line 9549 def policy @policy end
Sets the value of the `policy` attribute.
@param value [MigrationPolicy, Hash]
The `value` parameter can be an instance of {OvirtSDK4::MigrationPolicy} 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 9562 def policy=(value) if value.is_a?(Hash) value = MigrationPolicy.new(value) end @policy = value end