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
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ ReportedDevice
constructor
Creates a new instance of the ReportedDevice class.
-
#ips ⇒ Array<Ip>
Returns the value of the
ipsattribute. -
#ips=(list) ⇒ Object
Sets the value of the
ipsattribute. -
#mac ⇒ Mac
Returns the value of the
macattribute. -
#mac=(value) ⇒ Object
Sets the value of the
macattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#type ⇒ ReportedDeviceType
Returns the value of the
typeattribute. -
#type=(value) ⇒ Object
Sets the value of the
typeattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ReportedDevice
Creates a new instance of the OvirtSDK4::ReportedDevice class.
18617 18618 18619 18620 18621 18622 18623 |
# File 'lib/ovirtsdk4/types.rb', line 18617 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.
18628 18629 18630 18631 18632 18633 18634 |
# File 'lib/ovirtsdk4/types.rb', line 18628 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.
18432 18433 18434 |
# File 'lib/ovirtsdk4/types.rb', line 18432 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
18441 18442 18443 |
# File 'lib/ovirtsdk4/types.rb', line 18441 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
18450 18451 18452 |
# File 'lib/ovirtsdk4/types.rb', line 18450 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
18459 18460 18461 |
# File 'lib/ovirtsdk4/types.rb', line 18459 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
18639 18640 18641 18642 18643 18644 18645 |
# File 'lib/ovirtsdk4/types.rb', line 18639 def hash super + @ips.hash + @mac.hash + @type.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id attribute.
18468 18469 18470 |
# File 'lib/ovirtsdk4/types.rb', line 18468 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
18477 18478 18479 |
# File 'lib/ovirtsdk4/types.rb', line 18477 def id=(value) @id = value end |
#ips ⇒ Array<Ip>
Returns the value of the ips attribute.
18486 18487 18488 |
# File 'lib/ovirtsdk4/types.rb', line 18486 def ips @ips end |
#ips=(list) ⇒ Object
Sets the value of the ips attribute.
18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 |
# File 'lib/ovirtsdk4/types.rb', line 18495 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.
18512 18513 18514 |
# File 'lib/ovirtsdk4/types.rb', line 18512 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.
18525 18526 18527 18528 18529 18530 |
# File 'lib/ovirtsdk4/types.rb', line 18525 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.
18537 18538 18539 |
# File 'lib/ovirtsdk4/types.rb', line 18537 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
18546 18547 18548 |
# File 'lib/ovirtsdk4/types.rb', line 18546 def name=(value) @name = value end |
#type ⇒ ReportedDeviceType
Returns the value of the type attribute.
18555 18556 18557 |
# File 'lib/ovirtsdk4/types.rb', line 18555 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type attribute.
18564 18565 18566 |
# File 'lib/ovirtsdk4/types.rb', line 18564 def type=(value) @type = value end |
#vm ⇒ Vm
Returns the value of the vm attribute.
18573 18574 18575 |
# File 'lib/ovirtsdk4/types.rb', line 18573 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.
18586 18587 18588 18589 18590 18591 |
# File 'lib/ovirtsdk4/types.rb', line 18586 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |