Class: OvirtSDK4::ClusterLevel
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::ClusterLevel
- 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_features ⇒ Array<ClusterFeature>
Returns the value of the
cluster_features
attribute. -
#cluster_features=(list) ⇒ Object
Sets the value of the
cluster_features
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#cpu_types ⇒ Array<CpuType>
Returns the value of the
cpu_types
attribute. -
#cpu_types=(list) ⇒ Object
Sets the value of the
cpu_types
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 = {}) ⇒ ClusterLevel
constructor
Creates a new instance of the ClusterLevel class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#permits ⇒ Array<Permit>
Returns the value of the
permits
attribute. -
#permits=(list) ⇒ Object
Sets the value of the
permits
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ClusterLevel
Creates a new instance of the OvirtSDK4::ClusterLevel class.
32398 32399 32400 32401 32402 32403 |
# File 'lib/ovirtsdk4/types.rb', line 32398 def initialize(opts = {}) super(opts) self.cluster_features = opts[:cluster_features] self.cpu_types = opts[:cpu_types] self.permits = opts[:permits] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
32408 32409 32410 32411 32412 32413 |
# File 'lib/ovirtsdk4/types.rb', line 32408 def ==(other) super && @cluster_features == other.cluster_features && @cpu_types == other.cpu_types && @permits == other.permits end |
#cluster_features ⇒ Array<ClusterFeature>
Returns the value of the cluster_features
attribute.
32231 32232 32233 |
# File 'lib/ovirtsdk4/types.rb', line 32231 def cluster_features @cluster_features end |
#cluster_features=(list) ⇒ Object
Sets the value of the cluster_features
attribute.
32240 32241 32242 32243 32244 32245 32246 32247 32248 32249 32250 |
# File 'lib/ovirtsdk4/types.rb', line 32240 def cluster_features=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = ClusterFeature.new(value) end end end @cluster_features = list end |
#comment ⇒ String
Returns the value of the comment
attribute.
32257 32258 32259 |
# File 'lib/ovirtsdk4/types.rb', line 32257 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32266 32267 32268 |
# File 'lib/ovirtsdk4/types.rb', line 32266 def comment=(value) @comment = value end |
#cpu_types ⇒ Array<CpuType>
Returns the value of the cpu_types
attribute.
32275 32276 32277 |
# File 'lib/ovirtsdk4/types.rb', line 32275 def cpu_types @cpu_types end |
#cpu_types=(list) ⇒ Object
Sets the value of the cpu_types
attribute.
32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 |
# File 'lib/ovirtsdk4/types.rb', line 32284 def cpu_types=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = CpuType.new(value) end end end @cpu_types = list end |
#description ⇒ String
Returns the value of the description
attribute.
32301 32302 32303 |
# File 'lib/ovirtsdk4/types.rb', line 32301 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32310 32311 32312 |
# File 'lib/ovirtsdk4/types.rb', line 32310 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
32418 32419 32420 32421 32422 32423 |
# File 'lib/ovirtsdk4/types.rb', line 32418 def hash super + @cluster_features.hash + @cpu_types.hash + @permits.hash end |
#id ⇒ String
Returns the value of the id
attribute.
32319 32320 32321 |
# File 'lib/ovirtsdk4/types.rb', line 32319 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32328 32329 32330 |
# File 'lib/ovirtsdk4/types.rb', line 32328 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
32337 32338 32339 |
# File 'lib/ovirtsdk4/types.rb', line 32337 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32346 32347 32348 |
# File 'lib/ovirtsdk4/types.rb', line 32346 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
32355 32356 32357 |
# File 'lib/ovirtsdk4/types.rb', line 32355 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 |
# File 'lib/ovirtsdk4/types.rb', line 32364 def permits=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permit.new(value) end end end @permits = list end |