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. -
#has_implicit_affinity_group ⇒ Boolean
Returns the value of the
has_implicit_affinity_group
attribute. -
#has_implicit_affinity_group=(value) ⇒ Object
Sets the value of the
has_implicit_affinity_group
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.
31620 31621 31622 31623 31624 31625 31626 |
# File 'lib/ovirtsdk4/types.rb', line 31620 def initialize(opts = {}) super(opts) self.has_implicit_affinity_group = opts[:has_implicit_affinity_group] 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.
31631 31632 31633 31634 31635 31636 31637 |
# File 'lib/ovirtsdk4/types.rb', line 31631 def ==(other) super && @has_implicit_affinity_group == other.has_implicit_affinity_group && @hosts == other.hosts && @read_only == other.read_only && @vms == other.vms end |
#comment ⇒ String
Returns the value of the comment
attribute.
31441 31442 31443 |
# File 'lib/ovirtsdk4/types.rb', line 31441 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
31450 31451 31452 |
# File 'lib/ovirtsdk4/types.rb', line 31450 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
31459 31460 31461 |
# File 'lib/ovirtsdk4/types.rb', line 31459 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
31468 31469 31470 |
# File 'lib/ovirtsdk4/types.rb', line 31468 def description=(value) @description = value end |
#has_implicit_affinity_group ⇒ Boolean
Returns the value of the has_implicit_affinity_group
attribute.
31477 31478 31479 |
# File 'lib/ovirtsdk4/types.rb', line 31477 def has_implicit_affinity_group @has_implicit_affinity_group end |
#has_implicit_affinity_group=(value) ⇒ Object
Sets the value of the has_implicit_affinity_group
attribute.
31486 31487 31488 |
# File 'lib/ovirtsdk4/types.rb', line 31486 def has_implicit_affinity_group=(value) @has_implicit_affinity_group = value end |
#hash ⇒ Object
Generates a hash value for this object.
31642 31643 31644 31645 31646 31647 31648 |
# File 'lib/ovirtsdk4/types.rb', line 31642 def hash super + @has_implicit_affinity_group.hash + @hosts.hash + @read_only.hash + @vms.hash end |
#hosts ⇒ Array<Host>
Returns the value of the hosts
attribute.
31495 31496 31497 |
# File 'lib/ovirtsdk4/types.rb', line 31495 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts
attribute.
31504 31505 31506 31507 31508 31509 31510 31511 31512 31513 31514 |
# File 'lib/ovirtsdk4/types.rb', line 31504 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.
31521 31522 31523 |
# File 'lib/ovirtsdk4/types.rb', line 31521 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
31530 31531 31532 |
# File 'lib/ovirtsdk4/types.rb', line 31530 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
31539 31540 31541 |
# File 'lib/ovirtsdk4/types.rb', line 31539 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
31548 31549 31550 |
# File 'lib/ovirtsdk4/types.rb', line 31548 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
31557 31558 31559 |
# File 'lib/ovirtsdk4/types.rb', line 31557 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
31566 31567 31568 |
# File 'lib/ovirtsdk4/types.rb', line 31566 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
31575 31576 31577 |
# File 'lib/ovirtsdk4/types.rb', line 31575 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
31584 31585 31586 31587 31588 31589 31590 31591 31592 31593 31594 |
# File 'lib/ovirtsdk4/types.rb', line 31584 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 |