class OvirtSDK4::MigrationOptions

Public Class Methods

new(opts = {}) click to toggle source

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 [Integer] :custom_parallel_migrations The value of attribute `custom_parallel_migrations`.

@option opts [InheritableBoolean] :encrypted The value of attribute `encrypted`.

@option opts [ParallelMigrationsPolicy] :parallel_migrations_policy The value of attribute `parallel_migrations_policy`.

@option opts [MigrationPolicy, Hash] :policy The value of attribute `policy`.

Calls superclass method OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 10091
def initialize(opts = {})
  super(opts)
  self.auto_converge = opts[:auto_converge]
  self.bandwidth = opts[:bandwidth]
  self.compressed = opts[:compressed]
  self.custom_parallel_migrations = opts[:custom_parallel_migrations]
  self.encrypted = opts[:encrypted]
  self.parallel_migrations_policy = opts[:parallel_migrations_policy]
  self.policy = opts[:policy]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 10105
def ==(other)
  super &&
  @auto_converge == other.auto_converge &&
  @bandwidth == other.bandwidth &&
  @compressed == other.compressed &&
  @custom_parallel_migrations == other.custom_parallel_migrations &&
  @encrypted == other.encrypted &&
  @parallel_migrations_policy == other.parallel_migrations_policy &&
  @policy == other.policy
end
auto_converge() click to toggle source

Returns the value of the `auto_converge` attribute.

@return [InheritableBoolean]

# File lib/ovirtsdk4/types.rb, line 9934
def auto_converge
  @auto_converge
end
auto_converge=(value) click to toggle source

Sets the value of the `auto_converge` attribute.

@param value [InheritableBoolean]

# File lib/ovirtsdk4/types.rb, line 9943
def auto_converge=(value)
  @auto_converge = value
end
bandwidth() click to toggle source

Returns the value of the `bandwidth` attribute.

@return [MigrationBandwidth]

# File lib/ovirtsdk4/types.rb, line 9952
def bandwidth
  @bandwidth
end
bandwidth=(value) click to toggle source

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 9965
def bandwidth=(value)
  if value.is_a?(Hash)
    value = MigrationBandwidth.new(value)
  end
  @bandwidth = value
end
compressed() click to toggle source

Returns the value of the `compressed` attribute.

@return [InheritableBoolean]

# File lib/ovirtsdk4/types.rb, line 9977
def compressed
  @compressed
end
compressed=(value) click to toggle source

Sets the value of the `compressed` attribute.

@param value [InheritableBoolean]

# File lib/ovirtsdk4/types.rb, line 9986
def compressed=(value)
  @compressed = value
end
custom_parallel_migrations() click to toggle source

Returns the value of the `custom_parallel_migrations` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 9995
def custom_parallel_migrations
  @custom_parallel_migrations
end
custom_parallel_migrations=(value) click to toggle source

Sets the value of the `custom_parallel_migrations` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 10004
def custom_parallel_migrations=(value)
  @custom_parallel_migrations = value
end
encrypted() click to toggle source

Returns the value of the `encrypted` attribute.

@return [InheritableBoolean]

# File lib/ovirtsdk4/types.rb, line 10013
def encrypted
  @encrypted
end
encrypted=(value) click to toggle source

Sets the value of the `encrypted` attribute.

@param value [InheritableBoolean]

# File lib/ovirtsdk4/types.rb, line 10022
def encrypted=(value)
  @encrypted = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 10119
def hash
  super +
  @auto_converge.hash +
  @bandwidth.hash +
  @compressed.hash +
  @custom_parallel_migrations.hash +
  @encrypted.hash +
  @parallel_migrations_policy.hash +
  @policy.hash
end
parallel_migrations_policy() click to toggle source

Returns the value of the `parallel_migrations_policy` attribute.

@return [ParallelMigrationsPolicy]

# File lib/ovirtsdk4/types.rb, line 10031
def parallel_migrations_policy
  @parallel_migrations_policy
end
parallel_migrations_policy=(value) click to toggle source

Sets the value of the `parallel_migrations_policy` attribute.

@param value [ParallelMigrationsPolicy]

# File lib/ovirtsdk4/types.rb, line 10040
def parallel_migrations_policy=(value)
  @parallel_migrations_policy = value
end
policy() click to toggle source

Returns the value of the `policy` attribute.

@return [MigrationPolicy]

# File lib/ovirtsdk4/types.rb, line 10049
def policy
  @policy
end
policy=(value) click to toggle source

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 10062
def policy=(value)
  if value.is_a?(Hash)
    value = MigrationPolicy.new(value)
  end
  @policy = value
end