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.
34249 34250 34251 34252 34253 34254 |
# File 'lib/ovirtsdk4/types.rb', line 34249 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.
34259 34260 34261 34262 34263 34264 |
# File 'lib/ovirtsdk4/types.rb', line 34259 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.
34082 34083 34084 |
# File 'lib/ovirtsdk4/types.rb', line 34082 def cluster_features @cluster_features end |
#cluster_features=(list) ⇒ Object
Sets the value of the cluster_features
attribute.
34091 34092 34093 34094 34095 34096 34097 34098 34099 34100 34101 |
# File 'lib/ovirtsdk4/types.rb', line 34091 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.
34108 34109 34110 |
# File 'lib/ovirtsdk4/types.rb', line 34108 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34117 34118 34119 |
# File 'lib/ovirtsdk4/types.rb', line 34117 def comment=(value) @comment = value end |
#cpu_types ⇒ Array<CpuType>
Returns the value of the cpu_types
attribute.
34126 34127 34128 |
# File 'lib/ovirtsdk4/types.rb', line 34126 def cpu_types @cpu_types end |
#cpu_types=(list) ⇒ Object
Sets the value of the cpu_types
attribute.
34135 34136 34137 34138 34139 34140 34141 34142 34143 34144 34145 |
# File 'lib/ovirtsdk4/types.rb', line 34135 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.
34152 34153 34154 |
# File 'lib/ovirtsdk4/types.rb', line 34152 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
34161 34162 34163 |
# File 'lib/ovirtsdk4/types.rb', line 34161 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
34269 34270 34271 34272 34273 34274 |
# File 'lib/ovirtsdk4/types.rb', line 34269 def hash super + @cluster_features.hash + @cpu_types.hash + @permits.hash end |
#id ⇒ String
Returns the value of the id
attribute.
34170 34171 34172 |
# File 'lib/ovirtsdk4/types.rb', line 34170 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
34179 34180 34181 |
# File 'lib/ovirtsdk4/types.rb', line 34179 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
34188 34189 34190 |
# File 'lib/ovirtsdk4/types.rb', line 34188 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
34197 34198 34199 |
# File 'lib/ovirtsdk4/types.rb', line 34197 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
34206 34207 34208 |
# File 'lib/ovirtsdk4/types.rb', line 34206 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
34215 34216 34217 34218 34219 34220 34221 34222 34223 34224 34225 |
# File 'lib/ovirtsdk4/types.rb', line 34215 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 |