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.
18347 18348 18349 18350 18351 18352 18353 |
# File 'lib/ovirtsdk4/types.rb', line 18347 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.
18358 18359 18360 18361 18362 18363 18364 |
# File 'lib/ovirtsdk4/types.rb', line 18358 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.
18162 18163 18164 |
# File 'lib/ovirtsdk4/types.rb', line 18162 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
18171 18172 18173 |
# File 'lib/ovirtsdk4/types.rb', line 18171 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
18180 18181 18182 |
# File 'lib/ovirtsdk4/types.rb', line 18180 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18189 18190 18191 |
# File 'lib/ovirtsdk4/types.rb', line 18189 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
18369 18370 18371 18372 18373 18374 18375 |
# File 'lib/ovirtsdk4/types.rb', line 18369 def hash super + @ips.hash + @mac.hash + @type.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
18198 18199 18200 |
# File 'lib/ovirtsdk4/types.rb', line 18198 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18207 18208 18209 |
# File 'lib/ovirtsdk4/types.rb', line 18207 def id=(value) @id = value end |
#ips ⇒ Array<Ip>
Returns the value of the ips
attribute.
18216 18217 18218 |
# File 'lib/ovirtsdk4/types.rb', line 18216 def ips @ips end |
#ips=(list) ⇒ Object
Sets the value of the ips
attribute.
18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 |
# File 'lib/ovirtsdk4/types.rb', line 18225 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.
18242 18243 18244 |
# File 'lib/ovirtsdk4/types.rb', line 18242 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.
18255 18256 18257 18258 18259 18260 |
# File 'lib/ovirtsdk4/types.rb', line 18255 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.
18267 18268 18269 |
# File 'lib/ovirtsdk4/types.rb', line 18267 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18276 18277 18278 |
# File 'lib/ovirtsdk4/types.rb', line 18276 def name=(value) @name = value end |
#type ⇒ ReportedDeviceType
Returns the value of the type
attribute.
18285 18286 18287 |
# File 'lib/ovirtsdk4/types.rb', line 18285 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
18294 18295 18296 |
# File 'lib/ovirtsdk4/types.rb', line 18294 def type=(value) @type = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
18303 18304 18305 |
# File 'lib/ovirtsdk4/types.rb', line 18303 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.
18316 18317 18318 18319 18320 18321 |
# File 'lib/ovirtsdk4/types.rb', line 18316 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |