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.
32659 32660 32661 32662 32663 32664 |
# File 'lib/ovirtsdk4/types.rb', line 32659 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.
32669 32670 32671 32672 32673 32674 |
# File 'lib/ovirtsdk4/types.rb', line 32669 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster attribute.
32494 32495 32496 |
# File 'lib/ovirtsdk4/types.rb', line 32494 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.
32507 32508 32509 32510 32511 32512 |
# File 'lib/ovirtsdk4/types.rb', line 32507 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.
32519 32520 32521 |
# File 'lib/ovirtsdk4/types.rb', line 32519 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
32528 32529 32530 |
# File 'lib/ovirtsdk4/types.rb', line 32528 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
32537 32538 32539 |
# File 'lib/ovirtsdk4/types.rb', line 32537 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
32546 32547 32548 |
# File 'lib/ovirtsdk4/types.rb', line 32546 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
32679 32680 32681 32682 32683 32684 |
# File 'lib/ovirtsdk4/types.rb', line 32679 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id attribute.
32555 32556 32557 |
# File 'lib/ovirtsdk4/types.rb', line 32555 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
32564 32565 32566 |
# File 'lib/ovirtsdk4/types.rb', line 32564 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
32573 32574 32575 |
# File 'lib/ovirtsdk4/types.rb', line 32573 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
32582 32583 32584 |
# File 'lib/ovirtsdk4/types.rb', line 32582 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions attribute.
32591 32592 32593 |
# File 'lib/ovirtsdk4/types.rb', line 32591 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
32600 32601 32602 32603 32604 32605 32606 32607 32608 32609 32610 |
# File 'lib/ovirtsdk4/types.rb', line 32600 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.
32617 32618 32619 |
# File 'lib/ovirtsdk4/types.rb', line 32617 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.
32630 32631 32632 32633 32634 32635 |
# File 'lib/ovirtsdk4/types.rb', line 32630 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |