class OvirtSDK4::HostDevice

Public Class Methods

new(opts = {}) click to toggle source

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

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [String] :driver The value of attribute `driver`.

@option opts [Host, Hash] :host The value of attribute `host`.

@option opts [String] :id The value of attribute `id`.

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

@option opts [Array<MDevType>, Array<Hash>] :m_dev_types The values of attribute `m_dev_types`.

@option opts [String] :name The value of attribute `name`.

@option opts [HostDevice, Hash] :parent_device The value of attribute `parent_device`.

@option opts [HostDevice, Hash] :physical_function The value of attribute `physical_function`.

@option opts [Boolean] :placeholder The value of attribute `placeholder`.

@option opts [Product, Hash] :product The value of attribute `product`.

@option opts [Vendor, Hash] :vendor The value of attribute `vendor`.

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

@option opts [Vm, Hash] :vm The value of attribute `vm`.

Calls superclass method OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 46412
def initialize(opts = {})
  super(opts)
  self.capability = opts[:capability]
  self.driver = opts[:driver]
  self.host = opts[:host]
  self.iommu_group = opts[:iommu_group]
  self.m_dev_types = opts[:m_dev_types]
  self.parent_device = opts[:parent_device]
  self.physical_function = opts[:physical_function]
  self.placeholder = opts[:placeholder]
  self.product = opts[:product]
  self.vendor = opts[:vendor]
  self.virtual_functions = opts[:virtual_functions]
  self.vm = opts[:vm]
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::Identified#==
# File lib/ovirtsdk4/types.rb, line 46431
def ==(other)
  super &&
  @capability == other.capability &&
  @driver == other.driver &&
  @host == other.host &&
  @iommu_group == other.iommu_group &&
  @m_dev_types == other.m_dev_types &&
  @parent_device == other.parent_device &&
  @physical_function == other.physical_function &&
  @placeholder == other.placeholder &&
  @product == other.product &&
  @vendor == other.vendor &&
  @virtual_functions == other.virtual_functions &&
  @vm == other.vm
end
capability() click to toggle source

Returns the value of the `capability` attribute.

@return [String]

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

Sets the value of the `capability` attribute.

@param value [String]

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

Returns the value of the `comment` attribute.

@return [String]

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

Sets the value of the `comment` attribute.

@param value [String]

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

Returns the value of the `description` attribute.

@return [String]

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

Sets the value of the `description` attribute.

@param value [String]

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

Returns the value of the `driver` attribute.

@return [String]

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

Sets the value of the `driver` attribute.

@param value [String]

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

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 46450
def hash
  super +
  @capability.hash +
  @driver.hash +
  @host.hash +
  @iommu_group.hash +
  @m_dev_types.hash +
  @parent_device.hash +
  @physical_function.hash +
  @placeholder.hash +
  @product.hash +
  @vendor.hash +
  @virtual_functions.hash +
  @vm.hash
end
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

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

Sets the value of the `host` attribute.

@param value [Host, Hash]

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

Returns the value of the `id` attribute.

@return [String]

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

Sets the value of the `id` attribute.

@param value [String]

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

Returns the value of the `iommu_group` attribute.

@return [Integer]

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

Sets the value of the `iommu_group` attribute.

@param value [Integer]

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

Returns the value of the `m_dev_types` attribute.

@return [Array<MDevType>]

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

Sets the value of the `m_dev_types` attribute.

@param list [Array<MDevType>]

# File lib/ovirtsdk4/types.rb, line 46181
def m_dev_types=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = MDevType.new(value)
      end
    end
  end
  @m_dev_types = list
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

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

Sets the value of the `name` attribute.

@param value [String]

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

Returns the value of the `parent_device` attribute.

@return [HostDevice]

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

Sets the value of the `parent_device` attribute.

@param value [HostDevice, Hash]

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

Returns the value of the `physical_function` attribute.

@return [HostDevice]

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

Sets the value of the `physical_function` attribute.

@param value [HostDevice, Hash]

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

Returns the value of the `placeholder` attribute.

@return [Boolean]

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

Sets the value of the `placeholder` attribute.

@param value [Boolean]

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

Returns the value of the `product` attribute.

@return [Product]

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

Sets the value of the `product` attribute.

@param value [Product, Hash]

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

Returns the value of the `vendor` attribute.

@return [Vendor]

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

Sets the value of the `vendor` attribute.

@param value [Vendor, Hash]

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

Returns the value of the `virtual_functions` attribute.

@return [Integer]

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

Sets the value of the `virtual_functions` attribute.

@param value [Integer]

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

Returns the value of the `vm` attribute.

@return [Vm]

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

Sets the value of the `vm` attribute.

@param value [Vm, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Vm} 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 46365
def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end