Creates a new instance of the {Quota} 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 [Integer] :cluster_hard_limit_pct The value of attribute `cluster_hard_limit_pct`.
@option opts [Integer] :cluster_soft_limit_pct The value of attribute `cluster_soft_limit_pct`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [DataCenter, Hash] :data_center The value of attribute `data_center`.
@option opts [String] :description The value of attribute `description`.
@option opts [Array<Disk>, Array<Hash>] :disks The values of attribute `disks`.
@option opts [String] :id The value of attribute `id`.
@option opts [String] :name The value of attribute `name`.
@option opts [Integer] :storage_hard_limit_pct The value of attribute `storage_hard_limit_pct`.
@option opts [Integer] :storage_soft_limit_pct The value of attribute `storage_soft_limit_pct`.
@option opts [Array<User>, Array<Hash>] :users The values of attribute `users`.
@option opts [Array<Vm>, Array<Hash>] :vms The values of attribute `vms`.
# File lib/ovirtsdk4/types.rb, line 11704 def initialize(opts = {}) super(opts) self.cluster_hard_limit_pct = opts[:cluster_hard_limit_pct] self.cluster_soft_limit_pct = opts[:cluster_soft_limit_pct] self.comment = opts[:comment] self.data_center = opts[:data_center] self.description = opts[:description] self.disks = opts[:disks] self.id = opts[:id] self.name = opts[:name] self.storage_hard_limit_pct = opts[:storage_hard_limit_pct] self.storage_soft_limit_pct = opts[:storage_soft_limit_pct] self.users = opts[:users] self.vms = opts[:vms] end
Returns the value of the `cluster_hard_limit_pct` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 11433 def cluster_hard_limit_pct return @cluster_hard_limit_pct end
Sets the value of the `cluster_hard_limit_pct` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 11442 def cluster_hard_limit_pct=(value) @cluster_hard_limit_pct = value end
Returns the value of the `cluster_soft_limit_pct` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 11451 def cluster_soft_limit_pct return @cluster_soft_limit_pct end
Sets the value of the `cluster_soft_limit_pct` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 11460 def cluster_soft_limit_pct=(value) @cluster_soft_limit_pct = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 11469 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 11478 def comment=(value) @comment = value end
Returns the value of the `data_center` attribute.
@return [DataCenter]
# File lib/ovirtsdk4/types.rb, line 11487 def data_center return @data_center end
Sets the value of the `data_center` attribute.
@param value [DataCenter, Hash]
The `value` parameter can be an instance of {OvirtSDK4::DataCenter} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.
# File lib/ovirtsdk4/types.rb, line 11500 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 11512 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 11521 def description=(value) @description = value end
Returns the value of the `disks` attribute.
@return [Array<Disk>]
# File lib/ovirtsdk4/types.rb, line 11530 def disks return @disks end
Sets the value of the `disks` attribute.
@param list [Array<Disk>]
# File lib/ovirtsdk4/types.rb, line 11538 def disks=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Disk.new(value) end end end @disks = list end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 11555 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 11564 def id=(value) @id = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 11573 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 11582 def name=(value) @name = value end
Returns the value of the `storage_hard_limit_pct` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 11591 def storage_hard_limit_pct return @storage_hard_limit_pct end
Sets the value of the `storage_hard_limit_pct` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 11600 def storage_hard_limit_pct=(value) @storage_hard_limit_pct = value end
Returns the value of the `storage_soft_limit_pct` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 11609 def storage_soft_limit_pct return @storage_soft_limit_pct end
Sets the value of the `storage_soft_limit_pct` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 11618 def storage_soft_limit_pct=(value) @storage_soft_limit_pct = value end
Returns the value of the `users` attribute.
@return [Array<User>]
# File lib/ovirtsdk4/types.rb, line 11627 def users return @users end
Sets the value of the `users` attribute.
@param list [Array<User>]
# File lib/ovirtsdk4/types.rb, line 11635 def users=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = User.new(value) end end end @users = list end
Returns the value of the `vms` attribute.
@return [Array<Vm>]
# File lib/ovirtsdk4/types.rb, line 11652 def vms return @vms end
Sets the value of the `vms` attribute.
@param list [Array<Vm>]
# File lib/ovirtsdk4/types.rb, line 11660 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end