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.
33261 33262 33263 33264 33265 33266 |
# File 'lib/ovirtsdk4/types.rb', line 33261 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.
33271 33272 33273 33274 33275 33276 |
# File 'lib/ovirtsdk4/types.rb', line 33271 def ==(other) super && @cluster == other.cluster && @permissions == other. && @qos == other.qos end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
33096 33097 33098 |
# File 'lib/ovirtsdk4/types.rb', line 33096 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.
33109 33110 33111 33112 33113 33114 |
# File 'lib/ovirtsdk4/types.rb', line 33109 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.
33121 33122 33123 |
# File 'lib/ovirtsdk4/types.rb', line 33121 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
33130 33131 33132 |
# File 'lib/ovirtsdk4/types.rb', line 33130 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
33139 33140 33141 |
# File 'lib/ovirtsdk4/types.rb', line 33139 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
33148 33149 33150 |
# File 'lib/ovirtsdk4/types.rb', line 33148 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
33281 33282 33283 33284 33285 33286 |
# File 'lib/ovirtsdk4/types.rb', line 33281 def hash super + @cluster.hash + @permissions.hash + @qos.hash end |
#id ⇒ String
Returns the value of the id
attribute.
33157 33158 33159 |
# File 'lib/ovirtsdk4/types.rb', line 33157 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
33166 33167 33168 |
# File 'lib/ovirtsdk4/types.rb', line 33166 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
33175 33176 33177 |
# File 'lib/ovirtsdk4/types.rb', line 33175 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
33184 33185 33186 |
# File 'lib/ovirtsdk4/types.rb', line 33184 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
33193 33194 33195 |
# File 'lib/ovirtsdk4/types.rb', line 33193 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
33202 33203 33204 33205 33206 33207 33208 33209 33210 33211 33212 |
# File 'lib/ovirtsdk4/types.rb', line 33202 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.
33219 33220 33221 |
# File 'lib/ovirtsdk4/types.rb', line 33219 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.
33232 33233 33234 33235 33236 33237 |
# File 'lib/ovirtsdk4/types.rb', line 33232 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |