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.
32580 32581 32582 32583 32584 32585 |
# File 'lib/ovirtsdk4/types.rb', line 32580 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.
32590 32591 32592 32593 32594 32595 |
# File 'lib/ovirtsdk4/types.rb', line 32590 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.
32413 32414 32415 |
# File 'lib/ovirtsdk4/types.rb', line 32413 def cluster_features @cluster_features end |
#cluster_features=(list) ⇒ Object
Sets the value of the cluster_features
attribute.
32422 32423 32424 32425 32426 32427 32428 32429 32430 32431 32432 |
# File 'lib/ovirtsdk4/types.rb', line 32422 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.
32439 32440 32441 |
# File 'lib/ovirtsdk4/types.rb', line 32439 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32448 32449 32450 |
# File 'lib/ovirtsdk4/types.rb', line 32448 def comment=(value) @comment = value end |
#cpu_types ⇒ Array<CpuType>
Returns the value of the cpu_types
attribute.
32457 32458 32459 |
# File 'lib/ovirtsdk4/types.rb', line 32457 def cpu_types @cpu_types end |
#cpu_types=(list) ⇒ Object
Sets the value of the cpu_types
attribute.
32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 |
# File 'lib/ovirtsdk4/types.rb', line 32466 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.
32483 32484 32485 |
# File 'lib/ovirtsdk4/types.rb', line 32483 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32492 32493 32494 |
# File 'lib/ovirtsdk4/types.rb', line 32492 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
32600 32601 32602 32603 32604 32605 |
# File 'lib/ovirtsdk4/types.rb', line 32600 def hash super + @cluster_features.hash + @cpu_types.hash + @permits.hash end |
#id ⇒ String
Returns the value of the id
attribute.
32501 32502 32503 |
# File 'lib/ovirtsdk4/types.rb', line 32501 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32510 32511 32512 |
# File 'lib/ovirtsdk4/types.rb', line 32510 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
32519 32520 32521 |
# File 'lib/ovirtsdk4/types.rb', line 32519 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32528 32529 32530 |
# File 'lib/ovirtsdk4/types.rb', line 32528 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
32537 32538 32539 |
# File 'lib/ovirtsdk4/types.rb', line 32537 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
32546 32547 32548 32549 32550 32551 32552 32553 32554 32555 32556 |
# File 'lib/ovirtsdk4/types.rb', line 32546 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 |