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.
30040 30041 30042 30043 30044 30045 |
# File 'lib/ovirtsdk4/types.rb', line 30040 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.
30050 30051 30052 30053 30054 30055 |
# File 'lib/ovirtsdk4/types.rb', line 30050 def ==(other) super && @hosts == other.hosts && @read_only == other.read_only && @vms == other.vms end |
#comment ⇒ String
Returns the value of the comment
attribute.
29881 29882 29883 |
# File 'lib/ovirtsdk4/types.rb', line 29881 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
29890 29891 29892 |
# File 'lib/ovirtsdk4/types.rb', line 29890 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
29899 29900 29901 |
# File 'lib/ovirtsdk4/types.rb', line 29899 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
29908 29909 29910 |
# File 'lib/ovirtsdk4/types.rb', line 29908 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
30060 30061 30062 30063 30064 30065 |
# File 'lib/ovirtsdk4/types.rb', line 30060 def hash super + @hosts.hash + @read_only.hash + @vms.hash end |
#hosts ⇒ Array<Host>
Returns the value of the hosts
attribute.
29917 29918 29919 |
# File 'lib/ovirtsdk4/types.rb', line 29917 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts
attribute.
29926 29927 29928 29929 29930 29931 29932 29933 29934 29935 29936 |
# File 'lib/ovirtsdk4/types.rb', line 29926 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.
29943 29944 29945 |
# File 'lib/ovirtsdk4/types.rb', line 29943 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
29952 29953 29954 |
# File 'lib/ovirtsdk4/types.rb', line 29952 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
29961 29962 29963 |
# File 'lib/ovirtsdk4/types.rb', line 29961 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
29970 29971 29972 |
# File 'lib/ovirtsdk4/types.rb', line 29970 def name=(value) @name = value end |
#read_only ⇒ Boolean
Returns the value of the read_only
attribute.
29979 29980 29981 |
# File 'lib/ovirtsdk4/types.rb', line 29979 def read_only @read_only end |
#read_only=(value) ⇒ Object
Sets the value of the read_only
attribute.
29988 29989 29990 |
# File 'lib/ovirtsdk4/types.rb', line 29988 def read_only=(value) @read_only = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
29997 29998 29999 |
# File 'lib/ovirtsdk4/types.rb', line 29997 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
30006 30007 30008 30009 30010 30011 30012 30013 30014 30015 30016 |
# File 'lib/ovirtsdk4/types.rb', line 30006 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 |