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.
30910 30911 30912 30913 30914 30915 30916 |
# File 'lib/ovirtsdk4/types.rb', line 30910 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.
30921 30922 30923 30924 30925 30926 30927 |
# File 'lib/ovirtsdk4/types.rb', line 30921 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.
30731 30732 30733 |
# File 'lib/ovirtsdk4/types.rb', line 30731 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
30740 30741 30742 |
# File 'lib/ovirtsdk4/types.rb', line 30740 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
30749 30750 30751 |
# File 'lib/ovirtsdk4/types.rb', line 30749 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
30758 30759 30760 |
# File 'lib/ovirtsdk4/types.rb', line 30758 def description=(value) @description = value end |
#has_implicit_affinity_group ⇒ Boolean
Returns the value of the has_implicit_affinity_group
attribute.
30767 30768 30769 |
# File 'lib/ovirtsdk4/types.rb', line 30767 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.
30776 30777 30778 |
# File 'lib/ovirtsdk4/types.rb', line 30776 def has_implicit_affinity_group=(value) @has_implicit_affinity_group = value end |
#hash ⇒ Object
Generates a hash value for this object.
30932 30933 30934 30935 30936 30937 30938 |
# File 'lib/ovirtsdk4/types.rb', line 30932 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.
30785 30786 30787 |
# File 'lib/ovirtsdk4/types.rb', line 30785 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts
attribute.
30794 30795 30796 30797 30798 30799 30800 30801 30802 30803 30804 |
# File 'lib/ovirtsdk4/types.rb', line 30794 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.
30811 30812 30813 |
# File 'lib/ovirtsdk4/types.rb', line 30811 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
30820 30821 30822 |
# File 'lib/ovirtsdk4/types.rb', line 30820 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
30829 30830 30831 |
# File 'lib/ovirtsdk4/types.rb', line 30829 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
30838 30839 30840 |
# File 'lib/ovirtsdk4/types.rb', line 30838 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
30847 30848 30849 |
# File 'lib/ovirtsdk4/types.rb', line 30847 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
30856 30857 30858 |
# File 'lib/ovirtsdk4/types.rb', line 30856 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
30865 30866 30867 |
# File 'lib/ovirtsdk4/types.rb', line 30865 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
30874 30875 30876 30877 30878 30879 30880 30881 30882 30883 30884 |
# File 'lib/ovirtsdk4/types.rb', line 30874 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 |