Class: OvirtSDK4::VolumeGroup

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (VolumeGroup) initialize(opts = {})

Creates a new instance of the OvirtSDK4::VolumeGroup class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :id (String)

    The value of attribute id.

  • :logical_units (Array<LogicalUnit>, Array<Hash>)

    The values of attribute logical_units.

  • :name (String)

    The value of attribute name.



20607
20608
20609
20610
20611
20612
# File 'lib/ovirtsdk4/types.rb', line 20607

def initialize(opts = {})
  super(opts)
  self.id = opts[:id]
  self.logical_units = opts[:logical_units]
  self.name = opts[:name]
end

Instance Method Details

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


20537
20538
20539
# File 'lib/ovirtsdk4/types.rb', line 20537

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


20546
20547
20548
# File 'lib/ovirtsdk4/types.rb', line 20546

def id=(value)
  @id = value
end

- (Array<LogicalUnit>) logical_units

Returns the value of the logical_units attribute.

Returns:



20555
20556
20557
# File 'lib/ovirtsdk4/types.rb', line 20555

def logical_units
  return @logical_units
end

- (Object) logical_units=(list)

Sets the value of the logical_units attribute.

Parameters:



20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
# File 'lib/ovirtsdk4/types.rb', line 20563

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

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


20580
20581
20582
# File 'lib/ovirtsdk4/types.rb', line 20580

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


20589
20590
20591
# File 'lib/ovirtsdk4/types.rb', line 20589

def name=(value)
  @name = value
end