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.
18921 18922 18923 18924 18925 18926 18927 18928 18929 |
# File 'lib/ovirtsdk4/types.rb', line 18921 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.
18934 18935 18936 18937 18938 18939 18940 18941 18942 |
# File 'lib/ovirtsdk4/types.rb', line 18934 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.
18686 18687 18688 |
# File 'lib/ovirtsdk4/types.rb', line 18686 def balances @balances end |
#balances=(list) ⇒ Object
Sets the value of the balances
attribute.
18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 |
# File 'lib/ovirtsdk4/types.rb', line 18695 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.
18712 18713 18714 |
# File 'lib/ovirtsdk4/types.rb', line 18712 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
18721 18722 18723 |
# File 'lib/ovirtsdk4/types.rb', line 18721 def comment=(value) @comment = value end |
#default_policy ⇒ Boolean
Returns the value of the default_policy
attribute.
18730 18731 18732 |
# File 'lib/ovirtsdk4/types.rb', line 18730 def default_policy @default_policy end |
#default_policy=(value) ⇒ Object
Sets the value of the default_policy
attribute.
18739 18740 18741 |
# File 'lib/ovirtsdk4/types.rb', line 18739 def default_policy=(value) @default_policy = value end |
#description ⇒ String
Returns the value of the description
attribute.
18748 18749 18750 |
# File 'lib/ovirtsdk4/types.rb', line 18748 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18757 18758 18759 |
# File 'lib/ovirtsdk4/types.rb', line 18757 def description=(value) @description = value end |
#filters ⇒ Array<Filter>
Returns the value of the filters
attribute.
18766 18767 18768 |
# File 'lib/ovirtsdk4/types.rb', line 18766 def filters @filters end |
#filters=(list) ⇒ Object
Sets the value of the filters
attribute.
18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 |
# File 'lib/ovirtsdk4/types.rb', line 18775 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.
18947 18948 18949 18950 18951 18952 18953 18954 18955 |
# File 'lib/ovirtsdk4/types.rb', line 18947 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.
18792 18793 18794 |
# File 'lib/ovirtsdk4/types.rb', line 18792 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18801 18802 18803 |
# File 'lib/ovirtsdk4/types.rb', line 18801 def id=(value) @id = value end |
#locked ⇒ Boolean
Returns the value of the locked
attribute.
18810 18811 18812 |
# File 'lib/ovirtsdk4/types.rb', line 18810 def locked @locked end |
#locked=(value) ⇒ Object
Sets the value of the locked
attribute.
18819 18820 18821 |
# File 'lib/ovirtsdk4/types.rb', line 18819 def locked=(value) @locked = value end |
#name ⇒ String
Returns the value of the name
attribute.
18828 18829 18830 |
# File 'lib/ovirtsdk4/types.rb', line 18828 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18837 18838 18839 |
# File 'lib/ovirtsdk4/types.rb', line 18837 def name=(value) @name = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
18846 18847 18848 |
# File 'lib/ovirtsdk4/types.rb', line 18846 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 |
# File 'lib/ovirtsdk4/types.rb', line 18855 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.
18872 18873 18874 |
# File 'lib/ovirtsdk4/types.rb', line 18872 def weight @weight end |
#weight=(list) ⇒ Object
Sets the value of the weight
attribute.
18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 |
# File 'lib/ovirtsdk4/types.rb', line 18881 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 |