Class: OvirtSDK4::SchedulingPolicy
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::SchedulingPolicy
- 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. -
#balances ⇒ Array<Balance>
Returns the value of the
balances
attribute. -
#balances=(list) ⇒ Object
Sets the value of the
balances
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#default_policy ⇒ Boolean
Returns the value of the
default_policy
attribute. -
#default_policy=(value) ⇒ Object
Sets the value of the
default_policy
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#filters ⇒ Array<Filter>
Returns the value of the
filters
attribute. -
#filters=(list) ⇒ Object
Sets the value of the
filters
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 = {}) ⇒ SchedulingPolicy
constructor
Creates a new instance of the SchedulingPolicy class.
-
#locked ⇒ Boolean
Returns the value of the
locked
attribute. -
#locked=(value) ⇒ Object
Sets the value of the
locked
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#properties ⇒ Array<Property>
Returns the value of the
properties
attribute. -
#properties=(list) ⇒ Object
Sets the value of the
properties
attribute. -
#weight ⇒ Array<Weight>
Returns the value of the
weight
attribute. -
#weight=(list) ⇒ Object
Sets the value of the
weight
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ SchedulingPolicy
Creates a new instance of the OvirtSDK4::SchedulingPolicy class.
18448 18449 18450 18451 18452 18453 18454 18455 18456 |
# File 'lib/ovirtsdk4/types.rb', line 18448 def initialize(opts = {}) super(opts) self.balances = opts[:balances] self.default_policy = opts[:default_policy] self.filters = opts[:filters] self.locked = opts[:locked] self.properties = opts[:properties] self.weight = opts[:weight] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
18461 18462 18463 18464 18465 18466 18467 18468 18469 |
# File 'lib/ovirtsdk4/types.rb', line 18461 def ==(other) super && @balances == other.balances && @default_policy == other.default_policy && @filters == other.filters && @locked == other.locked && @properties == other.properties && @weight == other.weight end |
#balances ⇒ Array<Balance>
Returns the value of the balances
attribute.
18213 18214 18215 |
# File 'lib/ovirtsdk4/types.rb', line 18213 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances
attribute.
18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 |
# File 'lib/ovirtsdk4/types.rb', line 18222 def balances=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Balance.new(value) end end end @balances = list end |
#comment ⇒ String
Returns the value of the comment
attribute.
18239 18240 18241 |
# File 'lib/ovirtsdk4/types.rb', line 18239 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
18248 18249 18250 |
# File 'lib/ovirtsdk4/types.rb', line 18248 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy
attribute.
18257 18258 18259 |
# File 'lib/ovirtsdk4/types.rb', line 18257 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy
attribute.
18266 18267 18268 |
# File 'lib/ovirtsdk4/types.rb', line 18266 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description
attribute.
18275 18276 18277 |
# File 'lib/ovirtsdk4/types.rb', line 18275 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18284 18285 18286 |
# File 'lib/ovirtsdk4/types.rb', line 18284 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters
attribute.
18293 18294 18295 |
# File 'lib/ovirtsdk4/types.rb', line 18293 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters
attribute.
18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 |
# File 'lib/ovirtsdk4/types.rb', line 18302 def filters=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Filter.new(value) end end end @filters = list end |
#hash ⇒ Object
Generates a hash value for this object.
18474 18475 18476 18477 18478 18479 18480 18481 18482 |
# File 'lib/ovirtsdk4/types.rb', line 18474 def hash super + @balances.hash + @default_policy.hash + @filters.hash + @locked.hash + @properties.hash + @weight.hash end |
#id ⇒ String
Returns the value of the id
attribute.
18319 18320 18321 |
# File 'lib/ovirtsdk4/types.rb', line 18319 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18328 18329 18330 |
# File 'lib/ovirtsdk4/types.rb', line 18328 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked
attribute.
18337 18338 18339 |
# File 'lib/ovirtsdk4/types.rb', line 18337 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked
attribute.
18346 18347 18348 |
# File 'lib/ovirtsdk4/types.rb', line 18346 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name
attribute.
18355 18356 18357 |
# File 'lib/ovirtsdk4/types.rb', line 18355 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18364 18365 18366 |
# File 'lib/ovirtsdk4/types.rb', line 18364 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
18373 18374 18375 |
# File 'lib/ovirtsdk4/types.rb', line 18373 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 |
# File 'lib/ovirtsdk4/types.rb', line 18382 def properties=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @properties = list end |
#weight ⇒ Array<Weight>
Returns the value of the weight
attribute.
18399 18400 18401 |
# File 'lib/ovirtsdk4/types.rb', line 18399 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight
attribute.
18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 |
# File 'lib/ovirtsdk4/types.rb', line 18408 def weight=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Weight.new(value) end end end @weight = list end |