Class: OvirtSDK4::HostDevice
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::HostDevice
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#capability ⇒ String
Returns the value of the
capability
attribute. -
#capability=(value) ⇒ Object
Sets the value of the
capability
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#driver ⇒ String
Returns the value of the
driver
attribute. -
#driver=(value) ⇒ Object
Sets the value of the
driver
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ HostDevice
constructor
Creates a new instance of the HostDevice class.
-
#iommu_group ⇒ Integer
Returns the value of the
iommu_group
attribute. -
#iommu_group=(value) ⇒ Object
Sets the value of the
iommu_group
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#parent_device ⇒ HostDevice
Returns the value of the
parent_device
attribute. -
#parent_device=(value) ⇒ Object
Sets the value of the
parent_device
attribute. -
#physical_function ⇒ HostDevice
Returns the value of the
physical_function
attribute. -
#physical_function=(value) ⇒ Object
Sets the value of the
physical_function
attribute. -
#placeholder ⇒ Boolean
Returns the value of the
placeholder
attribute. -
#placeholder=(value) ⇒ Object
Sets the value of the
placeholder
attribute. -
#product ⇒ Product
Returns the value of the
product
attribute. -
#product=(value) ⇒ Object
Sets the value of the
product
attribute. -
#vendor ⇒ Vendor
Returns the value of the
vendor
attribute. -
#vendor=(value) ⇒ Object
Sets the value of the
vendor
attribute. -
#virtual_functions ⇒ Integer
Returns the value of the
virtual_functions
attribute. -
#virtual_functions=(value) ⇒ Object
Sets the value of the
virtual_functions
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ HostDevice
Creates a new instance of the OvirtSDK4::HostDevice class.
42674 42675 42676 42677 42678 42679 42680 42681 42682 42683 42684 42685 42686 42687 |
# File 'lib/ovirtsdk4/types.rb', line 42674 def initialize(opts = {}) super(opts) self.capability = opts[:capability] self.driver = opts[:driver] self.host = opts[:host] self.iommu_group = opts[:iommu_group] 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
42692 42693 42694 42695 42696 42697 42698 42699 42700 42701 42702 42703 42704 42705 |
# File 'lib/ovirtsdk4/types.rb', line 42692 def ==(other) super && @capability == other.capability && @driver == other.driver && @host == other.host && @iommu_group == other.iommu_group && @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 ⇒ String
Returns the value of the capability
attribute.
42329 42330 42331 |
# File 'lib/ovirtsdk4/types.rb', line 42329 def capability @capability end |
#capability=(value) ⇒ Object
Sets the value of the capability
attribute.
42338 42339 42340 |
# File 'lib/ovirtsdk4/types.rb', line 42338 def capability=(value) @capability = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
42347 42348 42349 |
# File 'lib/ovirtsdk4/types.rb', line 42347 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
42356 42357 42358 |
# File 'lib/ovirtsdk4/types.rb', line 42356 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
42365 42366 42367 |
# File 'lib/ovirtsdk4/types.rb', line 42365 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
42374 42375 42376 |
# File 'lib/ovirtsdk4/types.rb', line 42374 def description=(value) @description = value end |
#driver ⇒ String
Returns the value of the driver
attribute.
42383 42384 42385 |
# File 'lib/ovirtsdk4/types.rb', line 42383 def driver @driver end |
#driver=(value) ⇒ Object
Sets the value of the driver
attribute.
42392 42393 42394 |
# File 'lib/ovirtsdk4/types.rb', line 42392 def driver=(value) @driver = value end |
#hash ⇒ Object
Generates a hash value for this object.
42710 42711 42712 42713 42714 42715 42716 42717 42718 42719 42720 42721 42722 42723 |
# File 'lib/ovirtsdk4/types.rb', line 42710 def hash super + @capability.hash + @driver.hash + @host.hash + @iommu_group.hash + @parent_device.hash + @physical_function.hash + @placeholder.hash + @product.hash + @vendor.hash + @virtual_functions.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
42401 42402 42403 |
# File 'lib/ovirtsdk4/types.rb', line 42401 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
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.
42414 42415 42416 42417 42418 42419 |
# File 'lib/ovirtsdk4/types.rb', line 42414 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id
attribute.
42426 42427 42428 |
# File 'lib/ovirtsdk4/types.rb', line 42426 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
42435 42436 42437 |
# File 'lib/ovirtsdk4/types.rb', line 42435 def id=(value) @id = value end |
#iommu_group ⇒ Integer
Returns the value of the iommu_group
attribute.
42444 42445 42446 |
# File 'lib/ovirtsdk4/types.rb', line 42444 def iommu_group @iommu_group end |
#iommu_group=(value) ⇒ Object
Sets the value of the iommu_group
attribute.
42453 42454 42455 |
# File 'lib/ovirtsdk4/types.rb', line 42453 def iommu_group=(value) @iommu_group = value end |
#name ⇒ String
Returns the value of the name
attribute.
42462 42463 42464 |
# File 'lib/ovirtsdk4/types.rb', line 42462 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
42471 42472 42473 |
# File 'lib/ovirtsdk4/types.rb', line 42471 def name=(value) @name = value end |
#parent_device ⇒ HostDevice
Returns the value of the parent_device
attribute.
42480 42481 42482 |
# File 'lib/ovirtsdk4/types.rb', line 42480 def parent_device @parent_device end |
#parent_device=(value) ⇒ Object
Sets the value of the parent_device
attribute.
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.
42493 42494 42495 42496 42497 42498 |
# File 'lib/ovirtsdk4/types.rb', line 42493 def parent_device=(value) if value.is_a?(Hash) value = HostDevice.new(value) end @parent_device = value end |
#physical_function ⇒ HostDevice
Returns the value of the physical_function
attribute.
42505 42506 42507 |
# File 'lib/ovirtsdk4/types.rb', line 42505 def physical_function @physical_function end |
#physical_function=(value) ⇒ Object
Sets the value of the physical_function
attribute.
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.
42518 42519 42520 42521 42522 42523 |
# File 'lib/ovirtsdk4/types.rb', line 42518 def physical_function=(value) if value.is_a?(Hash) value = HostDevice.new(value) end @physical_function = value end |
#placeholder ⇒ Boolean
Returns the value of the placeholder
attribute.
42530 42531 42532 |
# File 'lib/ovirtsdk4/types.rb', line 42530 def placeholder @placeholder end |
#placeholder=(value) ⇒ Object
Sets the value of the placeholder
attribute.
42539 42540 42541 |
# File 'lib/ovirtsdk4/types.rb', line 42539 def placeholder=(value) @placeholder = value end |
#product ⇒ Product
Returns the value of the product
attribute.
42548 42549 42550 |
# File 'lib/ovirtsdk4/types.rb', line 42548 def product @product end |
#product=(value) ⇒ Object
Sets the value of the product
attribute.
The value
parameter can be an instance of 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.
42561 42562 42563 42564 42565 42566 |
# File 'lib/ovirtsdk4/types.rb', line 42561 def product=(value) if value.is_a?(Hash) value = Product.new(value) end @product = value end |
#vendor ⇒ Vendor
Returns the value of the vendor
attribute.
42573 42574 42575 |
# File 'lib/ovirtsdk4/types.rb', line 42573 def vendor @vendor end |
#vendor=(value) ⇒ Object
Sets the value of the vendor
attribute.
The value
parameter can be an instance of 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.
42586 42587 42588 42589 42590 42591 |
# File 'lib/ovirtsdk4/types.rb', line 42586 def vendor=(value) if value.is_a?(Hash) value = Vendor.new(value) end @vendor = value end |
#virtual_functions ⇒ Integer
Returns the value of the virtual_functions
attribute.
42598 42599 42600 |
# File 'lib/ovirtsdk4/types.rb', line 42598 def virtual_functions @virtual_functions end |
#virtual_functions=(value) ⇒ Object
Sets the value of the virtual_functions
attribute.
42607 42608 42609 |
# File 'lib/ovirtsdk4/types.rb', line 42607 def virtual_functions=(value) @virtual_functions = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
42616 42617 42618 |
# File 'lib/ovirtsdk4/types.rb', line 42616 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm
attribute.
The value
parameter can be an instance of 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.
42629 42630 42631 42632 42633 42634 |
# File 'lib/ovirtsdk4/types.rb', line 42629 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |