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.
26885 26886 26887 26888 26889 26890 |
# File 'lib/ovirtsdk4/types.rb', line 26885 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.
26895 26896 26897 26898 26899 26900 |
# File 'lib/ovirtsdk4/types.rb', line 26895 def ==(other) super && @id == other.id && @logical_units == other.logical_units && @name == other.name end |
#hash ⇒ Object
Generates a hash value for this object.
26905 26906 26907 26908 26909 26910 |
# File 'lib/ovirtsdk4/types.rb', line 26905 def hash super + @id.hash + @logical_units.hash + @name.hash end |
#id ⇒ String
Returns the value of the id
attribute.
26814 26815 26816 |
# File 'lib/ovirtsdk4/types.rb', line 26814 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
26823 26824 26825 |
# File 'lib/ovirtsdk4/types.rb', line 26823 def id=(value) @id = value end |
#logical_units ⇒ Array<LogicalUnit>
Returns the value of the logical_units
attribute.
26832 26833 26834 |
# File 'lib/ovirtsdk4/types.rb', line 26832 def logical_units @logical_units end |
#logical_units=(list) ⇒ Object
Sets the value of the logical_units
attribute.
26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 |
# File 'lib/ovirtsdk4/types.rb', line 26841 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.
26858 26859 26860 |
# File 'lib/ovirtsdk4/types.rb', line 26858 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
26867 26868 26869 |
# File 'lib/ovirtsdk4/types.rb', line 26867 def name=(value) @name = value end |