Class: OvirtSDK4::MigrationBandwidth

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ MigrationBandwidth

Creates a new instance of the OvirtSDK4::MigrationBandwidth class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):


9437
9438
9439
9440
9441
# File 'lib/ovirtsdk4/types.rb', line 9437

def initialize(opts = {})
  super(opts)
  self.assignment_method = opts[:assignment_method]
  self.custom_value = opts[:custom_value]
end

Instance Method Details

#==(other) ⇒ Object

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


9446
9447
9448
9449
9450
# File 'lib/ovirtsdk4/types.rb', line 9446

def ==(other)
  super &&
  @assignment_method == other.assignment_method &&
  @custom_value == other.custom_value
end

#assignment_methodMigrationBandwidthAssignmentMethod

Returns the value of the assignment_method attribute.


9394
9395
9396
# File 'lib/ovirtsdk4/types.rb', line 9394

def assignment_method
  @assignment_method
end

#assignment_method=(value) ⇒ Object

Sets the value of the assignment_method attribute.


9403
9404
9405
# File 'lib/ovirtsdk4/types.rb', line 9403

def assignment_method=(value)
  @assignment_method = value
end

#custom_valueInteger

Returns the value of the custom_value attribute.

Returns:

  • (Integer)

9412
9413
9414
# File 'lib/ovirtsdk4/types.rb', line 9412

def custom_value
  @custom_value
end

#custom_value=(value) ⇒ Object

Sets the value of the custom_value attribute.

Parameters:

  • value (Integer)

9421
9422
9423
# File 'lib/ovirtsdk4/types.rb', line 9421

def custom_value=(value)
  @custom_value = value
end

#hashObject

Generates a hash value for this object.


9455
9456
9457
9458
9459
# File 'lib/ovirtsdk4/types.rb', line 9455

def hash
  super +
  @assignment_method.hash +
  @custom_value.hash
end