class OvirtSDK4::MigrationBandwidth

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {MigrationBandwidth} 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 [MigrationBandwidthAssignmentMethod] :assignment_method The value of attribute `assignment_method`.

@option opts [Integer] :custom_value The value of attribute `custom_value`.

Calls superclass method OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 9901
def initialize(opts = {})
  super(opts)
  self.assignment_method = opts[:assignment_method]
  self.custom_value = opts[:custom_value]
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 9910
def ==(other)
  super &&
  @assignment_method == other.assignment_method &&
  @custom_value == other.custom_value
end
assignment_method() click to toggle source

Returns the value of the `assignment_method` attribute.

@return [MigrationBandwidthAssignmentMethod]

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

Sets the value of the `assignment_method` attribute.

@param value [MigrationBandwidthAssignmentMethod]

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

Returns the value of the `custom_value` attribute.

@return [Integer]

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

Sets the value of the `custom_value` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 9885
def custom_value=(value)
  @custom_value = 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 9919
def hash
  super +
  @assignment_method.hash +
  @custom_value.hash
end