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
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.
-
#hosts ⇒ Array<Host>
Returns the value of the
hostsattribute. -
#hosts=(list) ⇒ Object
Sets the value of the
hostsattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ AffinityLabel
constructor
Creates a new instance of the AffinityLabel class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#read_only ⇒ Boolean
Returns the value of the
read_onlyattribute. -
#read_only=(value) ⇒ Object
Sets the value of the
read_onlyattribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vmsattribute. -
#vms=(list) ⇒ Object
Sets the value of the
vmsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ AffinityLabel
Creates a new instance of the OvirtSDK4::AffinityLabel class.
29747 29748 29749 29750 29751 29752 |
# File 'lib/ovirtsdk4/types.rb', line 29747 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.
29757 29758 29759 29760 29761 29762 |
# File 'lib/ovirtsdk4/types.rb', line 29757 def ==(other) super && @hosts == other.hosts && @read_only == other.read_only && @vms == other.vms end |
#comment ⇒ String
Returns the value of the comment attribute.
29588 29589 29590 |
# File 'lib/ovirtsdk4/types.rb', line 29588 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
29597 29598 29599 |
# File 'lib/ovirtsdk4/types.rb', line 29597 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
29606 29607 29608 |
# File 'lib/ovirtsdk4/types.rb', line 29606 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
29615 29616 29617 |
# File 'lib/ovirtsdk4/types.rb', line 29615 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
29767 29768 29769 29770 29771 29772 |
# File 'lib/ovirtsdk4/types.rb', line 29767 def hash super + @hosts.hash + @read_only.hash + @vms.hash end |
#hosts ⇒ Array<Host>
Returns the value of the hosts attribute.
29624 29625 29626 |
# File 'lib/ovirtsdk4/types.rb', line 29624 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts attribute.
29633 29634 29635 29636 29637 29638 29639 29640 29641 29642 29643 |
# File 'lib/ovirtsdk4/types.rb', line 29633 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.
29650 29651 29652 |
# File 'lib/ovirtsdk4/types.rb', line 29650 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
29659 29660 29661 |
# File 'lib/ovirtsdk4/types.rb', line 29659 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
29668 29669 29670 |
# File 'lib/ovirtsdk4/types.rb', line 29668 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
29677 29678 29679 |
# File 'lib/ovirtsdk4/types.rb', line 29677 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only attribute.
29686 29687 29688 |
# File 'lib/ovirtsdk4/types.rb', line 29686 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only attribute.
29695 29696 29697 |
# File 'lib/ovirtsdk4/types.rb', line 29695 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms attribute.
29704 29705 29706 |
# File 'lib/ovirtsdk4/types.rb', line 29704 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
29713 29714 29715 29716 29717 29718 29719 29720 29721 29722 29723 |
# File 'lib/ovirtsdk4/types.rb', line 29713 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 |