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.
35305 35306 35307 35308 35309 35310 |
# File 'lib/ovirtsdk4/types.rb', line 35305 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.
35315 35316 35317 35318 35319 35320 |
# File 'lib/ovirtsdk4/types.rb', line 35315 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
35140 35141 35142 |
# File 'lib/ovirtsdk4/types.rb', line 35140 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.
35153 35154 35155 35156 35157 35158 |
# File 'lib/ovirtsdk4/types.rb', line 35153 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.
35165 35166 35167 |
# File 'lib/ovirtsdk4/types.rb', line 35165 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
35174 35175 35176 |
# File 'lib/ovirtsdk4/types.rb', line 35174 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
35183 35184 35185 |
# File 'lib/ovirtsdk4/types.rb', line 35183 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
35192 35193 35194 |
# File 'lib/ovirtsdk4/types.rb', line 35192 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
35325 35326 35327 35328 35329 35330 |
# File 'lib/ovirtsdk4/types.rb', line 35325 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id
attribute.
35201 35202 35203 |
# File 'lib/ovirtsdk4/types.rb', line 35201 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
35210 35211 35212 |
# File 'lib/ovirtsdk4/types.rb', line 35210 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
35219 35220 35221 |
# File 'lib/ovirtsdk4/types.rb', line 35219 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
35228 35229 35230 |
# File 'lib/ovirtsdk4/types.rb', line 35228 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
35237 35238 35239 |
# File 'lib/ovirtsdk4/types.rb', line 35237 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
35246 35247 35248 35249 35250 35251 35252 35253 35254 35255 35256 |
# File 'lib/ovirtsdk4/types.rb', line 35246 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.
35263 35264 35265 |
# File 'lib/ovirtsdk4/types.rb', line 35263 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.
35276 35277 35278 35279 35280 35281 |
# File 'lib/ovirtsdk4/types.rb', line 35276 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |