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.
18089 18090 18091 18092 18093 18094 18095 18096 18097 |
# File 'lib/ovirtsdk4/types.rb', line 18089 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.
18102 18103 18104 18105 18106 18107 18108 18109 18110 |
# File 'lib/ovirtsdk4/types.rb', line 18102 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.
17854 17855 17856 |
# File 'lib/ovirtsdk4/types.rb', line 17854 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances
attribute.
17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 |
# File 'lib/ovirtsdk4/types.rb', line 17863 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.
17880 17881 17882 |
# File 'lib/ovirtsdk4/types.rb', line 17880 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
17889 17890 17891 |
# File 'lib/ovirtsdk4/types.rb', line 17889 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy
attribute.
17898 17899 17900 |
# File 'lib/ovirtsdk4/types.rb', line 17898 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy
attribute.
17907 17908 17909 |
# File 'lib/ovirtsdk4/types.rb', line 17907 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description
attribute.
17916 17917 17918 |
# File 'lib/ovirtsdk4/types.rb', line 17916 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
17925 17926 17927 |
# File 'lib/ovirtsdk4/types.rb', line 17925 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters
attribute.
17934 17935 17936 |
# File 'lib/ovirtsdk4/types.rb', line 17934 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters
attribute.
17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 |
# File 'lib/ovirtsdk4/types.rb', line 17943 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.
18115 18116 18117 18118 18119 18120 18121 18122 18123 |
# File 'lib/ovirtsdk4/types.rb', line 18115 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.
17960 17961 17962 |
# File 'lib/ovirtsdk4/types.rb', line 17960 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
17969 17970 17971 |
# File 'lib/ovirtsdk4/types.rb', line 17969 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked
attribute.
17978 17979 17980 |
# File 'lib/ovirtsdk4/types.rb', line 17978 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked
attribute.
17987 17988 17989 |
# File 'lib/ovirtsdk4/types.rb', line 17987 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name
attribute.
17996 17997 17998 |
# File 'lib/ovirtsdk4/types.rb', line 17996 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18005 18006 18007 |
# File 'lib/ovirtsdk4/types.rb', line 18005 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
18014 18015 18016 |
# File 'lib/ovirtsdk4/types.rb', line 18014 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 |
# File 'lib/ovirtsdk4/types.rb', line 18023 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.
18040 18041 18042 |
# File 'lib/ovirtsdk4/types.rb', line 18040 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight
attribute.
18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 |
# File 'lib/ovirtsdk4/types.rb', line 18049 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 |