Class: OvirtSDK4::Quota
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Quota
- 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. -
#cluster_hard_limit_pct ⇒ Integer
Returns the value of the
cluster_hard_limit_pct
attribute. -
#cluster_hard_limit_pct=(value) ⇒ Object
Sets the value of the
cluster_hard_limit_pct
attribute. -
#cluster_soft_limit_pct ⇒ Integer
Returns the value of the
cluster_soft_limit_pct
attribute. -
#cluster_soft_limit_pct=(value) ⇒ Object
Sets the value of the
cluster_soft_limit_pct
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_center
attribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_center
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#disks ⇒ Array<Disk>
Returns the value of the
disks
attribute. -
#disks=(list) ⇒ Object
Sets the value of the
disks
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 = {}) ⇒ Quota
constructor
Creates a new instance of the Quota class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#quota_cluster_limits ⇒ Array<QuotaClusterLimit>
Returns the value of the
quota_cluster_limits
attribute. -
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the
quota_cluster_limits
attribute. -
#quota_storage_limits ⇒ Array<QuotaStorageLimit>
Returns the value of the
quota_storage_limits
attribute. -
#quota_storage_limits=(list) ⇒ Object
Sets the value of the
quota_storage_limits
attribute. -
#storage_hard_limit_pct ⇒ Integer
Returns the value of the
storage_hard_limit_pct
attribute. -
#storage_hard_limit_pct=(value) ⇒ Object
Sets the value of the
storage_hard_limit_pct
attribute. -
#storage_soft_limit_pct ⇒ Integer
Returns the value of the
storage_soft_limit_pct
attribute. -
#storage_soft_limit_pct=(value) ⇒ Object
Sets the value of the
storage_soft_limit_pct
attribute. -
#users ⇒ Array<User>
Returns the value of the
users
attribute. -
#users=(list) ⇒ Object
Sets the value of the
users
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Quota
Creates a new instance of the OvirtSDK4::Quota class.
15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 |
# File 'lib/ovirtsdk4/types.rb', line 15592 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.data_center = opts[:data_center] self.disks = opts[:disks] self. = opts[:permissions] self.quota_cluster_limits = opts[:quota_cluster_limits] self.quota_storage_limits = opts[:quota_storage_limits] 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 |
# File 'lib/ovirtsdk4/types.rb', line 15610 def ==(other) super && @cluster_hard_limit_pct == other.cluster_hard_limit_pct && @cluster_soft_limit_pct == other.cluster_soft_limit_pct && @data_center == other.data_center && @disks == other.disks && @permissions == other. && @quota_cluster_limits == other.quota_cluster_limits && @quota_storage_limits == other.quota_storage_limits && @storage_hard_limit_pct == other.storage_hard_limit_pct && @storage_soft_limit_pct == other.storage_soft_limit_pct && @users == other.users && @vms == other.vms end |
#cluster_hard_limit_pct ⇒ Integer
Returns the value of the cluster_hard_limit_pct
attribute.
15234 15235 15236 |
# File 'lib/ovirtsdk4/types.rb', line 15234 def cluster_hard_limit_pct @cluster_hard_limit_pct end |
#cluster_hard_limit_pct=(value) ⇒ Object
Sets the value of the cluster_hard_limit_pct
attribute.
15243 15244 15245 |
# File 'lib/ovirtsdk4/types.rb', line 15243 def cluster_hard_limit_pct=(value) @cluster_hard_limit_pct = value end |
#cluster_soft_limit_pct ⇒ Integer
Returns the value of the cluster_soft_limit_pct
attribute.
15252 15253 15254 |
# File 'lib/ovirtsdk4/types.rb', line 15252 def cluster_soft_limit_pct @cluster_soft_limit_pct end |
#cluster_soft_limit_pct=(value) ⇒ Object
Sets the value of the cluster_soft_limit_pct
attribute.
15261 15262 15263 |
# File 'lib/ovirtsdk4/types.rb', line 15261 def cluster_soft_limit_pct=(value) @cluster_soft_limit_pct = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
15270 15271 15272 |
# File 'lib/ovirtsdk4/types.rb', line 15270 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
15279 15280 15281 |
# File 'lib/ovirtsdk4/types.rb', line 15279 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
15288 15289 15290 |
# File 'lib/ovirtsdk4/types.rb', line 15288 def data_center @data_center end |
#data_center=(value) ⇒ Object
Sets the value of the data_center
attribute.
The value
parameter can be an instance of 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.
15301 15302 15303 15304 15305 15306 |
# File 'lib/ovirtsdk4/types.rb', line 15301 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end |
#description ⇒ String
Returns the value of the description
attribute.
15313 15314 15315 |
# File 'lib/ovirtsdk4/types.rb', line 15313 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
15322 15323 15324 |
# File 'lib/ovirtsdk4/types.rb', line 15322 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
15331 15332 15333 |
# File 'lib/ovirtsdk4/types.rb', line 15331 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 |
# File 'lib/ovirtsdk4/types.rb', line 15340 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 |
#hash ⇒ Object
Generates a hash value for this object.
15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 |
# File 'lib/ovirtsdk4/types.rb', line 15628 def hash super + @cluster_hard_limit_pct.hash + @cluster_soft_limit_pct.hash + @data_center.hash + @disks.hash + @permissions.hash + @quota_cluster_limits.hash + @quota_storage_limits.hash + @storage_hard_limit_pct.hash + @storage_soft_limit_pct.hash + @users.hash + @vms.hash end |
#id ⇒ String
Returns the value of the id
attribute.
15357 15358 15359 |
# File 'lib/ovirtsdk4/types.rb', line 15357 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
15366 15367 15368 |
# File 'lib/ovirtsdk4/types.rb', line 15366 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
15375 15376 15377 |
# File 'lib/ovirtsdk4/types.rb', line 15375 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
15384 15385 15386 |
# File 'lib/ovirtsdk4/types.rb', line 15384 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
15393 15394 15395 |
# File 'lib/ovirtsdk4/types.rb', line 15393 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 |
# File 'lib/ovirtsdk4/types.rb', line 15402 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permission.new(value) end end end @permissions = list end |
#quota_cluster_limits ⇒ Array<QuotaClusterLimit>
Returns the value of the quota_cluster_limits
attribute.
15419 15420 15421 |
# File 'lib/ovirtsdk4/types.rb', line 15419 def quota_cluster_limits @quota_cluster_limits end |
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the quota_cluster_limits
attribute.
15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 |
# File 'lib/ovirtsdk4/types.rb', line 15428 def quota_cluster_limits=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = QuotaClusterLimit.new(value) end end end @quota_cluster_limits = list end |
#quota_storage_limits ⇒ Array<QuotaStorageLimit>
Returns the value of the quota_storage_limits
attribute.
15445 15446 15447 |
# File 'lib/ovirtsdk4/types.rb', line 15445 def quota_storage_limits @quota_storage_limits end |
#quota_storage_limits=(list) ⇒ Object
Sets the value of the quota_storage_limits
attribute.
15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 |
# File 'lib/ovirtsdk4/types.rb', line 15454 def quota_storage_limits=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = QuotaStorageLimit.new(value) end end end @quota_storage_limits = list end |
#storage_hard_limit_pct ⇒ Integer
Returns the value of the storage_hard_limit_pct
attribute.
15471 15472 15473 |
# File 'lib/ovirtsdk4/types.rb', line 15471 def storage_hard_limit_pct @storage_hard_limit_pct end |
#storage_hard_limit_pct=(value) ⇒ Object
Sets the value of the storage_hard_limit_pct
attribute.
15480 15481 15482 |
# File 'lib/ovirtsdk4/types.rb', line 15480 def storage_hard_limit_pct=(value) @storage_hard_limit_pct = value end |
#storage_soft_limit_pct ⇒ Integer
Returns the value of the storage_soft_limit_pct
attribute.
15489 15490 15491 |
# File 'lib/ovirtsdk4/types.rb', line 15489 def storage_soft_limit_pct @storage_soft_limit_pct end |
#storage_soft_limit_pct=(value) ⇒ Object
Sets the value of the storage_soft_limit_pct
attribute.
15498 15499 15500 |
# File 'lib/ovirtsdk4/types.rb', line 15498 def storage_soft_limit_pct=(value) @storage_soft_limit_pct = value end |
#users ⇒ Array<User>
Returns the value of the users
attribute.
15507 15508 15509 |
# File 'lib/ovirtsdk4/types.rb', line 15507 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 |
# File 'lib/ovirtsdk4/types.rb', line 15516 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 |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
15533 15534 15535 |
# File 'lib/ovirtsdk4/types.rb', line 15533 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 |
# File 'lib/ovirtsdk4/types.rb', line 15542 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 |