Class: OvirtSDK4::MigrationOptions
- 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. -
#auto_converge ⇒ InheritableBoolean
Returns the value of the
auto_converge
attribute. -
#auto_converge=(value) ⇒ Object
Sets the value of the
auto_converge
attribute. -
#bandwidth ⇒ MigrationBandwidth
Returns the value of the
bandwidth
attribute. -
#bandwidth=(value) ⇒ Object
Sets the value of the
bandwidth
attribute. -
#compressed ⇒ InheritableBoolean
Returns the value of the
compressed
attribute. -
#compressed=(value) ⇒ Object
Sets the value of the
compressed
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ MigrationOptions
constructor
Creates a new instance of the MigrationOptions class.
-
#policy ⇒ MigrationPolicy
Returns the value of the
policy
attribute. -
#policy=(value) ⇒ Object
Sets the value of the
policy
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ MigrationOptions
Creates a new instance of the OvirtSDK4::MigrationOptions class.
9360 9361 9362 9363 9364 9365 9366 |
# File 'lib/ovirtsdk4/types.rb', line 9360 def initialize(opts = {}) super(opts) self.auto_converge = opts[:auto_converge] self.bandwidth = opts[:bandwidth] self.compressed = opts[:compressed] self.policy = opts[:policy] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
9371 9372 9373 9374 9375 9376 9377 |
# File 'lib/ovirtsdk4/types.rb', line 9371 def ==(other) super && @auto_converge == other.auto_converge && @bandwidth == other.bandwidth && @compressed == other.compressed && @policy == other.policy end |
#auto_converge ⇒ InheritableBoolean
Returns the value of the auto_converge
attribute.
9263 9264 9265 |
# File 'lib/ovirtsdk4/types.rb', line 9263 def auto_converge @auto_converge end |
#auto_converge=(value) ⇒ Object
Sets the value of the auto_converge
attribute.
9272 9273 9274 |
# File 'lib/ovirtsdk4/types.rb', line 9272 def auto_converge=(value) @auto_converge = value end |
#bandwidth ⇒ MigrationBandwidth
Returns the value of the bandwidth
attribute.
9281 9282 9283 |
# File 'lib/ovirtsdk4/types.rb', line 9281 def bandwidth @bandwidth end |
#bandwidth=(value) ⇒ Object
Sets the value of the bandwidth
attribute.
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.
9294 9295 9296 9297 9298 9299 |
# File 'lib/ovirtsdk4/types.rb', line 9294 def bandwidth=(value) if value.is_a?(Hash) value = MigrationBandwidth.new(value) end @bandwidth = value end |
#compressed ⇒ InheritableBoolean
Returns the value of the compressed
attribute.
9306 9307 9308 |
# File 'lib/ovirtsdk4/types.rb', line 9306 def compressed @compressed end |
#compressed=(value) ⇒ Object
Sets the value of the compressed
attribute.
9315 9316 9317 |
# File 'lib/ovirtsdk4/types.rb', line 9315 def compressed=(value) @compressed = value end |
#hash ⇒ Object
Generates a hash value for this object.
9382 9383 9384 9385 9386 9387 9388 |
# File 'lib/ovirtsdk4/types.rb', line 9382 def hash super + @auto_converge.hash + @bandwidth.hash + @compressed.hash + @policy.hash end |
#policy ⇒ MigrationPolicy
Returns the value of the policy
attribute.
9324 9325 9326 |
# File 'lib/ovirtsdk4/types.rb', line 9324 def policy @policy end |
#policy=(value) ⇒ Object
Sets the value of the policy
attribute.
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.
9337 9338 9339 9340 9341 9342 |
# File 'lib/ovirtsdk4/types.rb', line 9337 def policy=(value) if value.is_a?(Hash) value = MigrationPolicy.new(value) end @policy = value end |