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.
18043 18044 18045 18046 18047 18048 18049 18050 18051 |
# File 'lib/ovirtsdk4/types.rb', line 18043 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.
18056 18057 18058 18059 18060 18061 18062 18063 18064 |
# File 'lib/ovirtsdk4/types.rb', line 18056 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.
17808 17809 17810 |
# File 'lib/ovirtsdk4/types.rb', line 17808 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances attribute.
17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 |
# File 'lib/ovirtsdk4/types.rb', line 17817 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.
17834 17835 17836 |
# File 'lib/ovirtsdk4/types.rb', line 17834 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
17843 17844 17845 |
# File 'lib/ovirtsdk4/types.rb', line 17843 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy attribute.
17852 17853 17854 |
# File 'lib/ovirtsdk4/types.rb', line 17852 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy attribute.
17861 17862 17863 |
# File 'lib/ovirtsdk4/types.rb', line 17861 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description attribute.
17870 17871 17872 |
# File 'lib/ovirtsdk4/types.rb', line 17870 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
17879 17880 17881 |
# File 'lib/ovirtsdk4/types.rb', line 17879 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters attribute.
17888 17889 17890 |
# File 'lib/ovirtsdk4/types.rb', line 17888 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters attribute.
17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 |
# File 'lib/ovirtsdk4/types.rb', line 17897 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.
18069 18070 18071 18072 18073 18074 18075 18076 18077 |
# File 'lib/ovirtsdk4/types.rb', line 18069 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.
17914 17915 17916 |
# File 'lib/ovirtsdk4/types.rb', line 17914 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
17923 17924 17925 |
# File 'lib/ovirtsdk4/types.rb', line 17923 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked attribute.
17932 17933 17934 |
# File 'lib/ovirtsdk4/types.rb', line 17932 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked attribute.
17941 17942 17943 |
# File 'lib/ovirtsdk4/types.rb', line 17941 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name attribute.
17950 17951 17952 |
# File 'lib/ovirtsdk4/types.rb', line 17950 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
17959 17960 17961 |
# File 'lib/ovirtsdk4/types.rb', line 17959 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties attribute.
17968 17969 17970 |
# File 'lib/ovirtsdk4/types.rb', line 17968 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties attribute.
17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 |
# File 'lib/ovirtsdk4/types.rb', line 17977 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.
17994 17995 17996 |
# File 'lib/ovirtsdk4/types.rb', line 17994 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight attribute.
18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 |
# File 'lib/ovirtsdk4/types.rb', line 18003 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 |