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. -
#has_implicit_affinity_group ⇒ Boolean
Returns the value of the
has_implicit_affinity_groupattribute. -
#has_implicit_affinity_group=(value) ⇒ Object
Sets the value of the
has_implicit_affinity_groupattribute. -
#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.
31913 31914 31915 31916 31917 31918 31919 |
# File 'lib/ovirtsdk4/types.rb', line 31913 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.
31924 31925 31926 31927 31928 31929 31930 |
# File 'lib/ovirtsdk4/types.rb', line 31924 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.
31734 31735 31736 |
# File 'lib/ovirtsdk4/types.rb', line 31734 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
31743 31744 31745 |
# File 'lib/ovirtsdk4/types.rb', line 31743 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
31752 31753 31754 |
# File 'lib/ovirtsdk4/types.rb', line 31752 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
31761 31762 31763 |
# File 'lib/ovirtsdk4/types.rb', line 31761 def description=(value) @description = value end |
#has_implicit_affinity_group ⇒ Boolean
Returns the value of the has_implicit_affinity_group attribute.
31770 31771 31772 |
# File 'lib/ovirtsdk4/types.rb', line 31770 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.
31779 31780 31781 |
# File 'lib/ovirtsdk4/types.rb', line 31779 def has_implicit_affinity_group=(value) @has_implicit_affinity_group = value end |
#hash ⇒ Object
Generates a hash value for this object.
31935 31936 31937 31938 31939 31940 31941 |
# File 'lib/ovirtsdk4/types.rb', line 31935 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.
31788 31789 31790 |
# File 'lib/ovirtsdk4/types.rb', line 31788 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts attribute.
31797 31798 31799 31800 31801 31802 31803 31804 31805 31806 31807 |
# File 'lib/ovirtsdk4/types.rb', line 31797 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.
31814 31815 31816 |
# File 'lib/ovirtsdk4/types.rb', line 31814 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
31823 31824 31825 |
# File 'lib/ovirtsdk4/types.rb', line 31823 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
31832 31833 31834 |
# File 'lib/ovirtsdk4/types.rb', line 31832 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
31841 31842 31843 |
# File 'lib/ovirtsdk4/types.rb', line 31841 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only attribute.
31850 31851 31852 |
# File 'lib/ovirtsdk4/types.rb', line 31850 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only attribute.
31859 31860 31861 |
# File 'lib/ovirtsdk4/types.rb', line 31859 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms attribute.
31868 31869 31870 |
# File 'lib/ovirtsdk4/types.rb', line 31868 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
31877 31878 31879 31880 31881 31882 31883 31884 31885 31886 31887 |
# File 'lib/ovirtsdk4/types.rb', line 31877 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 |