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.
18191 18192 18193 18194 18195 18196 18197 18198 18199 |
# File 'lib/ovirtsdk4/types.rb', line 18191 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.
18204 18205 18206 18207 18208 18209 18210 18211 18212 |
# File 'lib/ovirtsdk4/types.rb', line 18204 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.
17956 17957 17958 |
# File 'lib/ovirtsdk4/types.rb', line 17956 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances
attribute.
17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 |
# File 'lib/ovirtsdk4/types.rb', line 17965 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.
17982 17983 17984 |
# File 'lib/ovirtsdk4/types.rb', line 17982 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
17991 17992 17993 |
# File 'lib/ovirtsdk4/types.rb', line 17991 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy
attribute.
18000 18001 18002 |
# File 'lib/ovirtsdk4/types.rb', line 18000 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy
attribute.
18009 18010 18011 |
# File 'lib/ovirtsdk4/types.rb', line 18009 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description
attribute.
18018 18019 18020 |
# File 'lib/ovirtsdk4/types.rb', line 18018 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18027 18028 18029 |
# File 'lib/ovirtsdk4/types.rb', line 18027 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters
attribute.
18036 18037 18038 |
# File 'lib/ovirtsdk4/types.rb', line 18036 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters
attribute.
18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 |
# File 'lib/ovirtsdk4/types.rb', line 18045 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.
18217 18218 18219 18220 18221 18222 18223 18224 18225 |
# File 'lib/ovirtsdk4/types.rb', line 18217 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.
18062 18063 18064 |
# File 'lib/ovirtsdk4/types.rb', line 18062 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18071 18072 18073 |
# File 'lib/ovirtsdk4/types.rb', line 18071 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked
attribute.
18080 18081 18082 |
# File 'lib/ovirtsdk4/types.rb', line 18080 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked
attribute.
18089 18090 18091 |
# File 'lib/ovirtsdk4/types.rb', line 18089 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name
attribute.
18098 18099 18100 |
# File 'lib/ovirtsdk4/types.rb', line 18098 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18107 18108 18109 |
# File 'lib/ovirtsdk4/types.rb', line 18107 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
18116 18117 18118 |
# File 'lib/ovirtsdk4/types.rb', line 18116 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 |
# File 'lib/ovirtsdk4/types.rb', line 18125 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.
18142 18143 18144 |
# File 'lib/ovirtsdk4/types.rb', line 18142 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight
attribute.
18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 |
# File 'lib/ovirtsdk4/types.rb', line 18151 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 |