class OvirtSDK4::RngDevice

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {RngDevice} 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 [Rate, Hash] :rate The value of attribute `rate`.

@option opts [RngSource] :source The value of attribute `source`.

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

Returns the value of the `rate` attribute.

@return [Rate]

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

Sets the value of the `rate` attribute.

@param value [Rate, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Rate} 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 18399
def rate=(value)
  if value.is_a?(Hash)
    value = Rate.new(value)
  end
  @rate = value
end
source() click to toggle source

Returns the value of the `source` attribute.

@return [RngSource]

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

Sets the value of the `source` attribute.

@param value [RngSource]

# File lib/ovirtsdk4/types.rb, line 18420
def source=(value)
  @source = value
end