Class: OvirtSDK4::ReportedDevice
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::ReportedDevice
- 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. -
#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. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ ReportedDevice
constructor
Creates a new instance of the ReportedDevice class.
-
#ips ⇒ Array<Ip>
Returns the value of the
ips
attribute. -
#ips=(list) ⇒ Object
Sets the value of the
ips
attribute. -
#mac ⇒ Mac
Returns the value of the
mac
attribute. -
#mac=(value) ⇒ Object
Sets the value of the
mac
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#type ⇒ ReportedDeviceType
Returns the value of the
type
attribute. -
#type=(value) ⇒ Object
Sets the value of the
type
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 = {}) ⇒ ReportedDevice
Creates a new instance of the OvirtSDK4::ReportedDevice class.
17874 17875 17876 17877 17878 17879 17880 |
# File 'lib/ovirtsdk4/types.rb', line 17874 def initialize(opts = {}) super(opts) self.ips = opts[:ips] self.mac = opts[:mac] self.type = opts[:type] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
17885 17886 17887 17888 17889 17890 17891 |
# File 'lib/ovirtsdk4/types.rb', line 17885 def ==(other) super && @ips == other.ips && @mac == other.mac && @type == other.type && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
17689 17690 17691 |
# File 'lib/ovirtsdk4/types.rb', line 17689 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
17698 17699 17700 |
# File 'lib/ovirtsdk4/types.rb', line 17698 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
17707 17708 17709 |
# File 'lib/ovirtsdk4/types.rb', line 17707 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
17716 17717 17718 |
# File 'lib/ovirtsdk4/types.rb', line 17716 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
17896 17897 17898 17899 17900 17901 17902 |
# File 'lib/ovirtsdk4/types.rb', line 17896 def hash super + @ips.hash + @mac.hash + @type.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
17725 17726 17727 |
# File 'lib/ovirtsdk4/types.rb', line 17725 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
17734 17735 17736 |
# File 'lib/ovirtsdk4/types.rb', line 17734 def id=(value) @id = value end |
#ips ⇒ Array<Ip>
Returns the value of the ips
attribute.
17743 17744 17745 |
# File 'lib/ovirtsdk4/types.rb', line 17743 def ips @ips end |
#ips=(list) ⇒ Object
Sets the value of the ips
attribute.
17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 |
# File 'lib/ovirtsdk4/types.rb', line 17752 def ips=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Ip.new(value) end end end @ips = list end |
#mac ⇒ Mac
Returns the value of the mac
attribute.
17769 17770 17771 |
# File 'lib/ovirtsdk4/types.rb', line 17769 def mac @mac end |
#mac=(value) ⇒ Object
Sets the value of the mac
attribute.
The value
parameter can be an instance of Mac 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.
17782 17783 17784 17785 17786 17787 |
# File 'lib/ovirtsdk4/types.rb', line 17782 def mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @mac = value end |
#name ⇒ String
Returns the value of the name
attribute.
17794 17795 17796 |
# File 'lib/ovirtsdk4/types.rb', line 17794 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
17803 17804 17805 |
# File 'lib/ovirtsdk4/types.rb', line 17803 def name=(value) @name = value end |
#type ⇒ ReportedDeviceType
Returns the value of the type
attribute.
17812 17813 17814 |
# File 'lib/ovirtsdk4/types.rb', line 17812 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
17821 17822 17823 |
# File 'lib/ovirtsdk4/types.rb', line 17821 def type=(value) @type = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
17830 17831 17832 |
# File 'lib/ovirtsdk4/types.rb', line 17830 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.
17843 17844 17845 17846 17847 17848 |
# File 'lib/ovirtsdk4/types.rb', line 17843 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |