Class: OvirtSDK4::DiskProfile

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

- (DiskProfile) initialize(opts = {})

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

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :qos (Qos, Hash)

    The value of attribute qos.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.



26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
# File 'lib/ovirtsdk4/types.rb', line 26953

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.name = opts[:name]
  self.permissions = opts[:permissions]
  self.qos = opts[:qos]
  self.storage_domain = opts[:storage_domain]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


26789
26790
26791
# File 'lib/ovirtsdk4/types.rb', line 26789

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


26798
26799
26800
# File 'lib/ovirtsdk4/types.rb', line 26798

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


26807
26808
26809
# File 'lib/ovirtsdk4/types.rb', line 26807

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


26816
26817
26818
# File 'lib/ovirtsdk4/types.rb', line 26816

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


26825
26826
26827
# File 'lib/ovirtsdk4/types.rb', line 26825

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


26834
26835
26836
# File 'lib/ovirtsdk4/types.rb', line 26834

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


26843
26844
26845
# File 'lib/ovirtsdk4/types.rb', line 26843

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


26852
26853
26854
# File 'lib/ovirtsdk4/types.rb', line 26852

def name=(value)
  @name = value
end

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



26861
26862
26863
# File 'lib/ovirtsdk4/types.rb', line 26861

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
# File 'lib/ovirtsdk4/types.rb', line 26869

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

- (Qos) qos

Returns the value of the qos attribute.

Returns:



26886
26887
26888
# File 'lib/ovirtsdk4/types.rb', line 26886

def qos
  return @qos
end

- (Object) qos=(value)

Sets the value of the qos attribute.

The value parameter can be an instance of Qos 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:

  • value (Qos, Hash)


26899
26900
26901
26902
26903
26904
# File 'lib/ovirtsdk4/types.rb', line 26899

def qos=(value)
  if value.is_a?(Hash)
    value = Qos.new(value)
  end
  @qos = value
end

- (StorageDomain) storage_domain

Returns the value of the storage_domain attribute.

Returns:



26911
26912
26913
# File 'lib/ovirtsdk4/types.rb', line 26911

def storage_domain
  return @storage_domain
end

- (Object) storage_domain=(value)

Sets the value of the storage_domain attribute.

The value parameter can be an instance of StorageDomain 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:



26924
26925
26926
26927
26928
26929
# File 'lib/ovirtsdk4/types.rb', line 26924

def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end