Class: OvirtSDK4::OpenStackVolumeType

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (OpenStackVolumeType) initialize(opts = {})

Creates a new instance of the OvirtSDK4::OpenStackVolumeType 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):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :openstack_volume_provider (OpenStackVolumeProvider, Hash)

    The value of attribute openstack_volume_provider.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.



9071
9072
9073
9074
9075
9076
9077
9078
9079
# File 'lib/ovirtsdk4/types.rb', line 9071

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.name = opts[:name]
  self.openstack_volume_provider = opts[:openstack_volume_provider]
  self.properties = opts[:properties]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


8934
8935
8936
# File 'lib/ovirtsdk4/types.rb', line 8934

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


8943
8944
8945
# File 'lib/ovirtsdk4/types.rb', line 8943

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


8952
8953
8954
# File 'lib/ovirtsdk4/types.rb', line 8952

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


8961
8962
8963
# File 'lib/ovirtsdk4/types.rb', line 8961

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


8970
8971
8972
# File 'lib/ovirtsdk4/types.rb', line 8970

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


8979
8980
8981
# File 'lib/ovirtsdk4/types.rb', line 8979

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


8988
8989
8990
# File 'lib/ovirtsdk4/types.rb', line 8988

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


8997
8998
8999
# File 'lib/ovirtsdk4/types.rb', line 8997

def name=(value)
  @name = value
end

- (OpenStackVolumeProvider) openstack_volume_provider

Returns the value of the openstack_volume_provider attribute.



9006
9007
9008
# File 'lib/ovirtsdk4/types.rb', line 9006

def openstack_volume_provider
  return @openstack_volume_provider
end

- (Object) openstack_volume_provider=(value)

Sets the value of the openstack_volume_provider attribute.

The value parameter can be an instance of OvirtSDK4::OpenStackVolumeProvider or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



9019
9020
9021
9022
9023
9024
# File 'lib/ovirtsdk4/types.rb', line 9019

def openstack_volume_provider=(value)
  if value.is_a?(Hash)
    value = OpenStackVolumeProvider.new(value)
  end
  @openstack_volume_provider = value
end

- (Array<Property>) properties

Returns the value of the properties attribute.

Returns:



9031
9032
9033
# File 'lib/ovirtsdk4/types.rb', line 9031

def properties
  return @properties
end

- (Object) properties=(list)

Sets the value of the properties attribute.

Parameters:



9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
# File 'lib/ovirtsdk4/types.rb', line 9039

def properties=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @properties = list
end