Class: OvirtSDK4::CpuProfile

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

- (CpuProfile) initialize(opts = {})

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

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :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.



25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
# File 'lib/ovirtsdk4/types.rb', line 25053

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

Instance Method Details

- (Cluster) cluster

Returns the value of the cluster attribute.

Returns:



24889
24890
24891
# File 'lib/ovirtsdk4/types.rb', line 24889

def cluster
  return @cluster
end

- (Object) cluster=(value)

Sets the value of the cluster attribute.

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



24902
24903
24904
24905
24906
24907
# File 'lib/ovirtsdk4/types.rb', line 24902

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


24914
24915
24916
# File 'lib/ovirtsdk4/types.rb', line 24914

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


24923
24924
24925
# File 'lib/ovirtsdk4/types.rb', line 24923

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


24932
24933
24934
# File 'lib/ovirtsdk4/types.rb', line 24932

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


24941
24942
24943
# File 'lib/ovirtsdk4/types.rb', line 24941

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


24950
24951
24952
# File 'lib/ovirtsdk4/types.rb', line 24950

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


24959
24960
24961
# File 'lib/ovirtsdk4/types.rb', line 24959

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


24968
24969
24970
# File 'lib/ovirtsdk4/types.rb', line 24968

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


24977
24978
24979
# File 'lib/ovirtsdk4/types.rb', line 24977

def name=(value)
  @name = value
end

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



24986
24987
24988
# File 'lib/ovirtsdk4/types.rb', line 24986

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
# File 'lib/ovirtsdk4/types.rb', line 24994

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:



25011
25012
25013
# File 'lib/ovirtsdk4/types.rb', line 25011

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)


25024
25025
25026
25027
25028
25029
# File 'lib/ovirtsdk4/types.rb', line 25024

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