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.
17919 17920 17921 17922 17923 17924 17925 17926 17927 |
# File 'lib/ovirtsdk4/types.rb', line 17919 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.
17932 17933 17934 17935 17936 17937 17938 17939 17940 |
# File 'lib/ovirtsdk4/types.rb', line 17932 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.
17684 17685 17686 |
# File 'lib/ovirtsdk4/types.rb', line 17684 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances
attribute.
17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 |
# File 'lib/ovirtsdk4/types.rb', line 17693 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.
17710 17711 17712 |
# File 'lib/ovirtsdk4/types.rb', line 17710 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
17719 17720 17721 |
# File 'lib/ovirtsdk4/types.rb', line 17719 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy
attribute.
17728 17729 17730 |
# File 'lib/ovirtsdk4/types.rb', line 17728 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy
attribute.
17737 17738 17739 |
# File 'lib/ovirtsdk4/types.rb', line 17737 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description
attribute.
17746 17747 17748 |
# File 'lib/ovirtsdk4/types.rb', line 17746 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
17755 17756 17757 |
# File 'lib/ovirtsdk4/types.rb', line 17755 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters
attribute.
17764 17765 17766 |
# File 'lib/ovirtsdk4/types.rb', line 17764 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters
attribute.
17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 |
# File 'lib/ovirtsdk4/types.rb', line 17773 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.
17945 17946 17947 17948 17949 17950 17951 17952 17953 |
# File 'lib/ovirtsdk4/types.rb', line 17945 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.
17790 17791 17792 |
# File 'lib/ovirtsdk4/types.rb', line 17790 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
17799 17800 17801 |
# File 'lib/ovirtsdk4/types.rb', line 17799 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked
attribute.
17808 17809 17810 |
# File 'lib/ovirtsdk4/types.rb', line 17808 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked
attribute.
17817 17818 17819 |
# File 'lib/ovirtsdk4/types.rb', line 17817 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name
attribute.
17826 17827 17828 |
# File 'lib/ovirtsdk4/types.rb', line 17826 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
17835 17836 17837 |
# File 'lib/ovirtsdk4/types.rb', line 17835 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
17844 17845 17846 |
# File 'lib/ovirtsdk4/types.rb', line 17844 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 |
# File 'lib/ovirtsdk4/types.rb', line 17853 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.
17870 17871 17872 |
# File 'lib/ovirtsdk4/types.rb', line 17870 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight
attribute.
17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 |
# File 'lib/ovirtsdk4/types.rb', line 17879 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 |