Class: OvirtSDK4::VolumeGroup
- 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. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ VolumeGroup
constructor
Creates a new instance of the VolumeGroup class.
-
#logical_units ⇒ Array<LogicalUnit>
Returns the value of the
logical_units
attribute. -
#logical_units=(list) ⇒ Object
Sets the value of the
logical_units
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ VolumeGroup
Creates a new instance of the OvirtSDK4::VolumeGroup class.
28232 28233 28234 28235 28236 28237 |
# File 'lib/ovirtsdk4/types.rb', line 28232 def initialize(opts = {}) super(opts) self.id = opts[:id] self.logical_units = opts[:logical_units] self.name = opts[:name] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
28242 28243 28244 28245 28246 28247 |
# File 'lib/ovirtsdk4/types.rb', line 28242 def ==(other) super && @id == other.id && @logical_units == other.logical_units && @name == other.name end |
#hash ⇒ Object
Generates a hash value for this object.
28252 28253 28254 28255 28256 28257 |
# File 'lib/ovirtsdk4/types.rb', line 28252 def hash super + @id.hash + @logical_units.hash + @name.hash end |
#id ⇒ String
Returns the value of the id
attribute.
28161 28162 28163 |
# File 'lib/ovirtsdk4/types.rb', line 28161 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
28170 28171 28172 |
# File 'lib/ovirtsdk4/types.rb', line 28170 def id=(value) @id = value end |
#logical_units ⇒ Array<LogicalUnit>
Returns the value of the logical_units
attribute.
28179 28180 28181 |
# File 'lib/ovirtsdk4/types.rb', line 28179 def logical_units @logical_units end |
#logical_units=(list) ⇒ Object
Sets the value of the logical_units
attribute.
28188 28189 28190 28191 28192 28193 28194 28195 28196 28197 28198 |
# File 'lib/ovirtsdk4/types.rb', line 28188 def logical_units=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = LogicalUnit.new(value) end end end @logical_units = list end |
#name ⇒ String
Returns the value of the name
attribute.
28205 28206 28207 |
# File 'lib/ovirtsdk4/types.rb', line 28205 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
28214 28215 28216 |
# File 'lib/ovirtsdk4/types.rb', line 28214 def name=(value) @name = value end |