Class: OvirtSDK4::AffinityLabel
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::AffinityLabel
- 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.
-
#hosts ⇒ Array<Host>
Returns the value of the
hosts
attribute. -
#hosts=(list) ⇒ Object
Sets the value of the
hosts
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ AffinityLabel
constructor
Creates a new instance of the AffinityLabel class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#read_only ⇒ Boolean
Returns the value of the
read_only
attribute. -
#read_only=(value) ⇒ Object
Sets the value of the
read_only
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ AffinityLabel
Creates a new instance of the OvirtSDK4::AffinityLabel class.
29532 29533 29534 29535 29536 29537 |
# File 'lib/ovirtsdk4/types.rb', line 29532 def initialize(opts = {}) super(opts) self.hosts = opts[:hosts] self.read_only = opts[:read_only] self.vms = opts[:vms] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
29542 29543 29544 29545 29546 29547 |
# File 'lib/ovirtsdk4/types.rb', line 29542 def ==(other) super && @hosts == other.hosts && @read_only == other.read_only && @vms == other.vms end |
#comment ⇒ String
Returns the value of the comment
attribute.
29373 29374 29375 |
# File 'lib/ovirtsdk4/types.rb', line 29373 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
29382 29383 29384 |
# File 'lib/ovirtsdk4/types.rb', line 29382 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
29391 29392 29393 |
# File 'lib/ovirtsdk4/types.rb', line 29391 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
29400 29401 29402 |
# File 'lib/ovirtsdk4/types.rb', line 29400 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
29552 29553 29554 29555 29556 29557 |
# File 'lib/ovirtsdk4/types.rb', line 29552 def hash super + @hosts.hash + @read_only.hash + @vms.hash end |
#hosts ⇒ Array<Host>
Returns the value of the hosts
attribute.
29409 29410 29411 |
# File 'lib/ovirtsdk4/types.rb', line 29409 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts
attribute.
29418 29419 29420 29421 29422 29423 29424 29425 29426 29427 29428 |
# File 'lib/ovirtsdk4/types.rb', line 29418 def hosts=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Host.new(value) end end end @hosts = list end |
#id ⇒ String
Returns the value of the id
attribute.
29435 29436 29437 |
# File 'lib/ovirtsdk4/types.rb', line 29435 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
29444 29445 29446 |
# File 'lib/ovirtsdk4/types.rb', line 29444 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
29453 29454 29455 |
# File 'lib/ovirtsdk4/types.rb', line 29453 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
29462 29463 29464 |
# File 'lib/ovirtsdk4/types.rb', line 29462 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
29471 29472 29473 |
# File 'lib/ovirtsdk4/types.rb', line 29471 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
29480 29481 29482 |
# File 'lib/ovirtsdk4/types.rb', line 29480 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
29489 29490 29491 |
# File 'lib/ovirtsdk4/types.rb', line 29489 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
29498 29499 29500 29501 29502 29503 29504 29505 29506 29507 29508 |
# File 'lib/ovirtsdk4/types.rb', line 29498 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end |