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.
27063 27064 27065 27066 27067 27068 |
# File 'lib/ovirtsdk4/types.rb', line 27063 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.
27073 27074 27075 27076 27077 27078 |
# File 'lib/ovirtsdk4/types.rb', line 27073 def ==(other) super && @id == other.id && @logical_units == other.logical_units && @name == other.name end |
#hash ⇒ Object
Generates a hash value for this object.
27083 27084 27085 27086 27087 27088 |
# File 'lib/ovirtsdk4/types.rb', line 27083 def hash super + @id.hash + @logical_units.hash + @name.hash end |
#id ⇒ String
Returns the value of the id
attribute.
26992 26993 26994 |
# File 'lib/ovirtsdk4/types.rb', line 26992 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
27001 27002 27003 |
# File 'lib/ovirtsdk4/types.rb', line 27001 def id=(value) @id = value end |
#logical_units ⇒ Array<LogicalUnit>
Returns the value of the logical_units
attribute.
27010 27011 27012 |
# File 'lib/ovirtsdk4/types.rb', line 27010 def logical_units @logical_units end |
#logical_units=(list) ⇒ Object
Sets the value of the logical_units
attribute.
27019 27020 27021 27022 27023 27024 27025 27026 27027 27028 27029 |
# File 'lib/ovirtsdk4/types.rb', line 27019 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.
27036 27037 27038 |
# File 'lib/ovirtsdk4/types.rb', line 27036 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
27045 27046 27047 |
# File 'lib/ovirtsdk4/types.rb', line 27045 def name=(value) @name = value end |