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
true
ifself
andother
have the same attributes and values. -
#cluster ⇒ Cluster
Returns the value of the
cluster
attribute. -
#cluster=(value) ⇒ Object
Sets the value of the
cluster
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ CpuProfile
constructor
Creates a new instance of the CpuProfile class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#qos ⇒ Qos
Returns the value of the
qos
attribute. -
#qos=(value) ⇒ Object
Sets the value of the
qos
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ CpuProfile
Creates a new instance of the OvirtSDK4::CpuProfile class.
32781 32782 32783 32784 32785 32786 |
# File 'lib/ovirtsdk4/types.rb', line 32781 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.
32791 32792 32793 32794 32795 32796 |
# File 'lib/ovirtsdk4/types.rb', line 32791 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
32616 32617 32618 |
# File 'lib/ovirtsdk4/types.rb', line 32616 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.
32629 32630 32631 32632 32633 32634 |
# File 'lib/ovirtsdk4/types.rb', line 32629 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.
32641 32642 32643 |
# File 'lib/ovirtsdk4/types.rb', line 32641 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32650 32651 32652 |
# File 'lib/ovirtsdk4/types.rb', line 32650 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
32659 32660 32661 |
# File 'lib/ovirtsdk4/types.rb', line 32659 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32668 32669 32670 |
# File 'lib/ovirtsdk4/types.rb', line 32668 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
32801 32802 32803 32804 32805 32806 |
# File 'lib/ovirtsdk4/types.rb', line 32801 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id
attribute.
32677 32678 32679 |
# File 'lib/ovirtsdk4/types.rb', line 32677 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32686 32687 32688 |
# File 'lib/ovirtsdk4/types.rb', line 32686 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
32695 32696 32697 |
# File 'lib/ovirtsdk4/types.rb', line 32695 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32704 32705 32706 |
# File 'lib/ovirtsdk4/types.rb', line 32704 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
32713 32714 32715 |
# File 'lib/ovirtsdk4/types.rb', line 32713 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
32722 32723 32724 32725 32726 32727 32728 32729 32730 32731 32732 |
# File 'lib/ovirtsdk4/types.rb', line 32722 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.
32739 32740 32741 |
# File 'lib/ovirtsdk4/types.rb', line 32739 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.
32752 32753 32754 32755 32756 32757 |
# File 'lib/ovirtsdk4/types.rb', line 32752 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |