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.
32599 32600 32601 32602 32603 32604 |
# File 'lib/ovirtsdk4/types.rb', line 32599 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.
32609 32610 32611 32612 32613 32614 |
# File 'lib/ovirtsdk4/types.rb', line 32609 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
32434 32435 32436 |
# File 'lib/ovirtsdk4/types.rb', line 32434 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.
32447 32448 32449 32450 32451 32452 |
# File 'lib/ovirtsdk4/types.rb', line 32447 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.
32459 32460 32461 |
# File 'lib/ovirtsdk4/types.rb', line 32459 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32468 32469 32470 |
# File 'lib/ovirtsdk4/types.rb', line 32468 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
32477 32478 32479 |
# File 'lib/ovirtsdk4/types.rb', line 32477 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32486 32487 32488 |
# File 'lib/ovirtsdk4/types.rb', line 32486 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
32619 32620 32621 32622 32623 32624 |
# File 'lib/ovirtsdk4/types.rb', line 32619 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id
attribute.
32495 32496 32497 |
# File 'lib/ovirtsdk4/types.rb', line 32495 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32504 32505 32506 |
# File 'lib/ovirtsdk4/types.rb', line 32504 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
32513 32514 32515 |
# File 'lib/ovirtsdk4/types.rb', line 32513 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32522 32523 32524 |
# File 'lib/ovirtsdk4/types.rb', line 32522 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
32531 32532 32533 |
# File 'lib/ovirtsdk4/types.rb', line 32531 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
32540 32541 32542 32543 32544 32545 32546 32547 32548 32549 32550 |
# File 'lib/ovirtsdk4/types.rb', line 32540 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.
32557 32558 32559 |
# File 'lib/ovirtsdk4/types.rb', line 32557 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.
32570 32571 32572 32573 32574 32575 |
# File 'lib/ovirtsdk4/types.rb', line 32570 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |