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.
34450 34451 34452 34453 34454 34455 |
# File 'lib/ovirtsdk4/types.rb', line 34450 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.
34460 34461 34462 34463 34464 34465 |
# File 'lib/ovirtsdk4/types.rb', line 34460 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
34285 34286 34287 |
# File 'lib/ovirtsdk4/types.rb', line 34285 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.
34298 34299 34300 34301 34302 34303 |
# File 'lib/ovirtsdk4/types.rb', line 34298 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.
34310 34311 34312 |
# File 'lib/ovirtsdk4/types.rb', line 34310 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34319 34320 34321 |
# File 'lib/ovirtsdk4/types.rb', line 34319 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
34328 34329 34330 |
# File 'lib/ovirtsdk4/types.rb', line 34328 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
34337 34338 34339 |
# File 'lib/ovirtsdk4/types.rb', line 34337 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
34470 34471 34472 34473 34474 34475 |
# File 'lib/ovirtsdk4/types.rb', line 34470 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id
attribute.
34346 34347 34348 |
# File 'lib/ovirtsdk4/types.rb', line 34346 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
34355 34356 34357 |
# File 'lib/ovirtsdk4/types.rb', line 34355 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
34364 34365 34366 |
# File 'lib/ovirtsdk4/types.rb', line 34364 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
34373 34374 34375 |
# File 'lib/ovirtsdk4/types.rb', line 34373 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
34382 34383 34384 |
# File 'lib/ovirtsdk4/types.rb', line 34382 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
34391 34392 34393 34394 34395 34396 34397 34398 34399 34400 34401 |
# File 'lib/ovirtsdk4/types.rb', line 34391 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.
34408 34409 34410 |
# File 'lib/ovirtsdk4/types.rb', line 34408 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.
34421 34422 34423 34424 34425 34426 |
# File 'lib/ovirtsdk4/types.rb', line 34421 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |