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.
29869 29870 29871 29872 29873 29874 |
# File 'lib/ovirtsdk4/types.rb', line 29869 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.
29879 29880 29881 29882 29883 29884 |
# File 'lib/ovirtsdk4/types.rb', line 29879 def ==(other) super && @hosts == other.hosts && @read_only == other.read_only && @vms == other.vms end |
#comment ⇒ String
Returns the value of the comment
attribute.
29710 29711 29712 |
# File 'lib/ovirtsdk4/types.rb', line 29710 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
29719 29720 29721 |
# File 'lib/ovirtsdk4/types.rb', line 29719 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
29728 29729 29730 |
# File 'lib/ovirtsdk4/types.rb', line 29728 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
29737 29738 29739 |
# File 'lib/ovirtsdk4/types.rb', line 29737 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
29889 29890 29891 29892 29893 29894 |
# File 'lib/ovirtsdk4/types.rb', line 29889 def hash super + @hosts.hash + @read_only.hash + @vms.hash end |
#hosts ⇒ Array<Host>
Returns the value of the hosts
attribute.
29746 29747 29748 |
# File 'lib/ovirtsdk4/types.rb', line 29746 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts
attribute.
29755 29756 29757 29758 29759 29760 29761 29762 29763 29764 29765 |
# File 'lib/ovirtsdk4/types.rb', line 29755 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.
29772 29773 29774 |
# File 'lib/ovirtsdk4/types.rb', line 29772 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
29781 29782 29783 |
# File 'lib/ovirtsdk4/types.rb', line 29781 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
29790 29791 29792 |
# File 'lib/ovirtsdk4/types.rb', line 29790 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
29799 29800 29801 |
# File 'lib/ovirtsdk4/types.rb', line 29799 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
29808 29809 29810 |
# File 'lib/ovirtsdk4/types.rb', line 29808 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
29817 29818 29819 |
# File 'lib/ovirtsdk4/types.rb', line 29817 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
29826 29827 29828 |
# File 'lib/ovirtsdk4/types.rb', line 29826 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
29835 29836 29837 29838 29839 29840 29841 29842 29843 29844 29845 |
# File 'lib/ovirtsdk4/types.rb', line 29835 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 |