Class: OvirtSDK4::CpuProfile
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::CpuProfile
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#cluster ⇒ Cluster
Returns the value of the
clusterattribute. -
#cluster=(value) ⇒ Object
Sets the value of the
clusterattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ CpuProfile
constructor
Creates a new instance of the CpuProfile class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissionsattribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissionsattribute. -
#qos ⇒ Qos
Returns the value of the
qosattribute. -
#qos=(value) ⇒ Object
Sets the value of the
qosattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ CpuProfile
Creates a new instance of the OvirtSDK4::CpuProfile class.
35598 35599 35600 35601 35602 35603 |
# File 'lib/ovirtsdk4/types.rb', line 35598 def initialize(opts = {}) super(opts) self.cluster = opts[:cluster] self. = opts[:permissions] self.qos = opts[:qos] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
35608 35609 35610 35611 35612 35613 |
# File 'lib/ovirtsdk4/types.rb', line 35608 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster attribute.
35433 35434 35435 |
# File 'lib/ovirtsdk4/types.rb', line 35433 def cluster @cluster end |
#cluster=(value) ⇒ Object
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.
35446 35447 35448 35449 35450 35451 |
# File 'lib/ovirtsdk4/types.rb', line 35446 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end |
#comment ⇒ String
Returns the value of the comment attribute.
35458 35459 35460 |
# File 'lib/ovirtsdk4/types.rb', line 35458 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
35467 35468 35469 |
# File 'lib/ovirtsdk4/types.rb', line 35467 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
35476 35477 35478 |
# File 'lib/ovirtsdk4/types.rb', line 35476 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
35485 35486 35487 |
# File 'lib/ovirtsdk4/types.rb', line 35485 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
35618 35619 35620 35621 35622 35623 |
# File 'lib/ovirtsdk4/types.rb', line 35618 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id attribute.
35494 35495 35496 |
# File 'lib/ovirtsdk4/types.rb', line 35494 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
35503 35504 35505 |
# File 'lib/ovirtsdk4/types.rb', line 35503 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
35512 35513 35514 |
# File 'lib/ovirtsdk4/types.rb', line 35512 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
35521 35522 35523 |
# File 'lib/ovirtsdk4/types.rb', line 35521 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions attribute.
35530 35531 35532 |
# File 'lib/ovirtsdk4/types.rb', line 35530 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
35539 35540 35541 35542 35543 35544 35545 35546 35547 35548 35549 |
# File 'lib/ovirtsdk4/types.rb', line 35539 def (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.
35556 35557 35558 |
# File 'lib/ovirtsdk4/types.rb', line 35556 def qos @qos end |
#qos=(value) ⇒ Object
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.
35569 35570 35571 35572 35573 35574 |
# File 'lib/ovirtsdk4/types.rb', line 35569 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |