Class: OvirtSDK4::RngDevice

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (RngDevice) initialize(opts = {})

Creates a new instance of the OvirtSDK4::RngDevice 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):

  • :rate (Rate, Hash)

    The value of attribute rate.

  • :source (RngSource)

    The value of attribute source.



12933
12934
12935
12936
12937
# File 'lib/ovirtsdk4/types.rb', line 12933

def initialize(opts = {})
  super(opts)
  self.rate = opts[:rate]
  self.source = opts[:source]
end

Instance Method Details

- (Rate) rate

Returns the value of the rate attribute.

Returns:



12883
12884
12885
# File 'lib/ovirtsdk4/types.rb', line 12883

def rate
  return @rate
end

- (Object) rate=(value)

Sets the value of the rate attribute.

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.

Parameters:

  • value (Rate, Hash)


12896
12897
12898
12899
12900
12901
# File 'lib/ovirtsdk4/types.rb', line 12896

def rate=(value)
  if value.is_a?(Hash)
    value = Rate.new(value)
  end
  @rate = value
end

- (RngSource) source

Returns the value of the source attribute.

Returns:



12908
12909
12910
# File 'lib/ovirtsdk4/types.rb', line 12908

def source
  return @source
end

- (Object) source=(value)

Sets the value of the source attribute.

Parameters:



12917
12918
12919
# File 'lib/ovirtsdk4/types.rb', line 12917

def source=(value)
  @source = value
end