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
trueifselfandotherhave the same attributes and values. -
#balances ⇒ Array<Balance>
Returns the value of the
balancesattribute. -
#balances=(list) ⇒ Object
Sets the value of the
balancesattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#default_policy ⇒ Boolean
Returns the value of the
default_policyattribute. -
#default_policy=(value) ⇒ Object
Sets the value of the
default_policyattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#filters ⇒ Array<Filter>
Returns the value of the
filtersattribute. -
#filters=(list) ⇒ Object
Sets the value of the
filtersattribute. -
#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 = {}) ⇒ SchedulingPolicy
constructor
Creates a new instance of the SchedulingPolicy class.
-
#locked ⇒ Boolean
Returns the value of the
lockedattribute. -
#locked=(value) ⇒ Object
Sets the value of the
lockedattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#properties ⇒ Array<Property>
Returns the value of the
propertiesattribute. -
#properties=(list) ⇒ Object
Sets the value of the
propertiesattribute. -
#weight ⇒ Array<Weight>
Returns the value of the
weightattribute. -
#weight=(list) ⇒ Object
Sets the value of the
weightattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ SchedulingPolicy
Creates a new instance of the OvirtSDK4::SchedulingPolicy class.
19191 19192 19193 19194 19195 19196 19197 19198 19199 |
# File 'lib/ovirtsdk4/types.rb', line 19191 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.
19204 19205 19206 19207 19208 19209 19210 19211 19212 |
# File 'lib/ovirtsdk4/types.rb', line 19204 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.
18956 18957 18958 |
# File 'lib/ovirtsdk4/types.rb', line 18956 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances attribute.
18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 |
# File 'lib/ovirtsdk4/types.rb', line 18965 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.
18982 18983 18984 |
# File 'lib/ovirtsdk4/types.rb', line 18982 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
18991 18992 18993 |
# File 'lib/ovirtsdk4/types.rb', line 18991 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy attribute.
19000 19001 19002 |
# File 'lib/ovirtsdk4/types.rb', line 19000 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy attribute.
19009 19010 19011 |
# File 'lib/ovirtsdk4/types.rb', line 19009 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description attribute.
19018 19019 19020 |
# File 'lib/ovirtsdk4/types.rb', line 19018 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
19027 19028 19029 |
# File 'lib/ovirtsdk4/types.rb', line 19027 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters attribute.
19036 19037 19038 |
# File 'lib/ovirtsdk4/types.rb', line 19036 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters attribute.
19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 |
# File 'lib/ovirtsdk4/types.rb', line 19045 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.
19217 19218 19219 19220 19221 19222 19223 19224 19225 |
# File 'lib/ovirtsdk4/types.rb', line 19217 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.
19062 19063 19064 |
# File 'lib/ovirtsdk4/types.rb', line 19062 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
19071 19072 19073 |
# File 'lib/ovirtsdk4/types.rb', line 19071 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked attribute.
19080 19081 19082 |
# File 'lib/ovirtsdk4/types.rb', line 19080 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked attribute.
19089 19090 19091 |
# File 'lib/ovirtsdk4/types.rb', line 19089 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name attribute.
19098 19099 19100 |
# File 'lib/ovirtsdk4/types.rb', line 19098 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
19107 19108 19109 |
# File 'lib/ovirtsdk4/types.rb', line 19107 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties attribute.
19116 19117 19118 |
# File 'lib/ovirtsdk4/types.rb', line 19116 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties attribute.
19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 |
# File 'lib/ovirtsdk4/types.rb', line 19125 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.
19142 19143 19144 |
# File 'lib/ovirtsdk4/types.rb', line 19142 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight attribute.
19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 |
# File 'lib/ovirtsdk4/types.rb', line 19151 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 |