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
trueifselfandotherhave the same attributes and values. -
#cluster_features ⇒ Array<ClusterFeature>
Returns the value of the
cluster_featuresattribute. -
#cluster_features=(list) ⇒ Object
Sets the value of the
cluster_featuresattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#cpu_types ⇒ Array<CpuType>
Returns the value of the
cpu_typesattribute. -
#cpu_types=(list) ⇒ Object
Sets the value of the
cpu_typesattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ ClusterLevel
constructor
Creates a new instance of the ClusterLevel class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#permits ⇒ Array<Permit>
Returns the value of the
permitsattribute. -
#permits=(list) ⇒ Object
Sets the value of the
permitsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ClusterLevel
Creates a new instance of the OvirtSDK4::ClusterLevel class.
35397 35398 35399 35400 35401 35402 |
# File 'lib/ovirtsdk4/types.rb', line 35397 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.
35407 35408 35409 35410 35411 35412 |
# File 'lib/ovirtsdk4/types.rb', line 35407 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.
35230 35231 35232 |
# File 'lib/ovirtsdk4/types.rb', line 35230 def cluster_features @cluster_features end |
#cluster_features=(list) ⇒ Object
Sets the value of the cluster_features attribute.
35239 35240 35241 35242 35243 35244 35245 35246 35247 35248 35249 |
# File 'lib/ovirtsdk4/types.rb', line 35239 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.
35256 35257 35258 |
# File 'lib/ovirtsdk4/types.rb', line 35256 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
35265 35266 35267 |
# File 'lib/ovirtsdk4/types.rb', line 35265 def comment=(value) @comment = value end |
#cpu_types ⇒ Array<CpuType>
Returns the value of the cpu_types attribute.
35274 35275 35276 |
# File 'lib/ovirtsdk4/types.rb', line 35274 def cpu_types @cpu_types end |
#cpu_types=(list) ⇒ Object
Sets the value of the cpu_types attribute.
35283 35284 35285 35286 35287 35288 35289 35290 35291 35292 35293 |
# File 'lib/ovirtsdk4/types.rb', line 35283 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.
35300 35301 35302 |
# File 'lib/ovirtsdk4/types.rb', line 35300 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
35309 35310 35311 |
# File 'lib/ovirtsdk4/types.rb', line 35309 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
35417 35418 35419 35420 35421 35422 |
# File 'lib/ovirtsdk4/types.rb', line 35417 def hash super + @cluster_features.hash + @cpu_types.hash + @permits.hash end |
#id ⇒ String
Returns the value of the id attribute.
35318 35319 35320 |
# File 'lib/ovirtsdk4/types.rb', line 35318 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
35327 35328 35329 |
# File 'lib/ovirtsdk4/types.rb', line 35327 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
35336 35337 35338 |
# File 'lib/ovirtsdk4/types.rb', line 35336 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
35345 35346 35347 |
# File 'lib/ovirtsdk4/types.rb', line 35345 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits attribute.
35354 35355 35356 |
# File 'lib/ovirtsdk4/types.rb', line 35354 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits attribute.
35363 35364 35365 35366 35367 35368 35369 35370 35371 35372 35373 |
# File 'lib/ovirtsdk4/types.rb', line 35363 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 |