class OvirtSDK4::SchedulingPolicy
Public Class Methods
Creates a new instance of the {SchedulingPolicy} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [Array<Balance>, Array<Hash>] :balances The values of attribute `balances`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [Boolean] :default_policy The value of attribute `default_policy`.
@option opts [String] :description The value of attribute `description`.
@option opts [Array<Filter>, Array<Hash>] :filters The values of attribute `filters`.
@option opts [String] :id The value of attribute `id`.
@option opts [Boolean] :locked The value of attribute `locked`.
@option opts [String] :name The value of attribute `name`.
@option opts [Array<Property>, Array<Hash>] :properties The values of attribute `properties`.
@option opts [Array<Weight>, Array<Hash>] :weight The values of attribute `weight`.
# File lib/ovirtsdk4/types.rb, line 13968 def initialize(opts = {}) super(opts) self.balances = opts[:balances] self.comment = opts[:comment] self.default_policy = opts[:default_policy] self.description = opts[:description] self.filters = opts[:filters] self.id = opts[:id] self.locked = opts[:locked] self.name = opts[:name] self.properties = opts[:properties] self.weight = opts[:weight] end
Public Instance Methods
Returns the value of the `balances` attribute.
@return [Array<Balance>]
# File lib/ovirtsdk4/types.rb, line 13737 def balances return @balances end
Sets the value of the `balances` attribute.
@param list [Array<Balance>]
# File lib/ovirtsdk4/types.rb, line 13745 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
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 13762 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 13771 def comment=(value) @comment = value end
Returns the value of the `default_policy` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 13780 def default_policy return @default_policy end
Sets the value of the `default_policy` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 13789 def default_policy=(value) @default_policy = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 13798 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 13807 def description=(value) @description = value end
Returns the value of the `filters` attribute.
@return [Array<Filter>]
# File lib/ovirtsdk4/types.rb, line 13816 def filters return @filters end
Sets the value of the `filters` attribute.
@param list [Array<Filter>]
# File lib/ovirtsdk4/types.rb, line 13824 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
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 13841 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 13850 def id=(value) @id = value end
Returns the value of the `locked` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 13859 def locked return @locked end
Sets the value of the `locked` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 13868 def locked=(value) @locked = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 13877 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 13886 def name=(value) @name = value end
Returns the value of the `properties` attribute.
@return [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 13895 def properties return @properties end
Sets the value of the `properties` attribute.
@param list [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 13903 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
Returns the value of the `weight` attribute.
@return [Array<Weight>]
# File lib/ovirtsdk4/types.rb, line 13920 def weight return @weight end
Sets the value of the `weight` attribute.
@param list [Array<Weight>]
# File lib/ovirtsdk4/types.rb, line 13928 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