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.
16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 |
# File 'lib/ovirtsdk4/types.rb', line 16473 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.
16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 |
# File 'lib/ovirtsdk4/types.rb', line 16491 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.
16115 16116 16117 |
# File 'lib/ovirtsdk4/types.rb', line 16115 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.
16124 16125 16126 |
# File 'lib/ovirtsdk4/types.rb', line 16124 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.
16133 16134 16135 |
# File 'lib/ovirtsdk4/types.rb', line 16133 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.
16142 16143 16144 |
# File 'lib/ovirtsdk4/types.rb', line 16142 def cluster_soft_limit_pct=(value) @cluster_soft_limit_pct = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
16151 16152 16153 |
# File 'lib/ovirtsdk4/types.rb', line 16151 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
16160 16161 16162 |
# File 'lib/ovirtsdk4/types.rb', line 16160 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
16169 16170 16171 |
# File 'lib/ovirtsdk4/types.rb', line 16169 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.
16182 16183 16184 16185 16186 16187 |
# File 'lib/ovirtsdk4/types.rb', line 16182 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.
16194 16195 16196 |
# File 'lib/ovirtsdk4/types.rb', line 16194 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
16203 16204 16205 |
# File 'lib/ovirtsdk4/types.rb', line 16203 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
16212 16213 16214 |
# File 'lib/ovirtsdk4/types.rb', line 16212 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 |
# File 'lib/ovirtsdk4/types.rb', line 16221 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.
16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 |
# File 'lib/ovirtsdk4/types.rb', line 16509 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.
16238 16239 16240 |
# File 'lib/ovirtsdk4/types.rb', line 16238 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
16247 16248 16249 |
# File 'lib/ovirtsdk4/types.rb', line 16247 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
16256 16257 16258 |
# File 'lib/ovirtsdk4/types.rb', line 16256 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
16265 16266 16267 |
# File 'lib/ovirtsdk4/types.rb', line 16265 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
16274 16275 16276 |
# File 'lib/ovirtsdk4/types.rb', line 16274 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 |
# File 'lib/ovirtsdk4/types.rb', line 16283 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.
16300 16301 16302 |
# File 'lib/ovirtsdk4/types.rb', line 16300 def quota_cluster_limits @quota_cluster_limits end |
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the quota_cluster_limits
attribute.
16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 |
# File 'lib/ovirtsdk4/types.rb', line 16309 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.
16326 16327 16328 |
# File 'lib/ovirtsdk4/types.rb', line 16326 def quota_storage_limits @quota_storage_limits end |
#quota_storage_limits=(list) ⇒ Object
Sets the value of the quota_storage_limits
attribute.
16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 |
# File 'lib/ovirtsdk4/types.rb', line 16335 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.
16352 16353 16354 |
# File 'lib/ovirtsdk4/types.rb', line 16352 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.
16361 16362 16363 |
# File 'lib/ovirtsdk4/types.rb', line 16361 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.
16370 16371 16372 |
# File 'lib/ovirtsdk4/types.rb', line 16370 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.
16379 16380 16381 |
# File 'lib/ovirtsdk4/types.rb', line 16379 def storage_soft_limit_pct=(value) @storage_soft_limit_pct = value end |
#users ⇒ Array<User>
Returns the value of the users
attribute.
16388 16389 16390 |
# File 'lib/ovirtsdk4/types.rb', line 16388 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 |
# File 'lib/ovirtsdk4/types.rb', line 16397 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.
16414 16415 16416 |
# File 'lib/ovirtsdk4/types.rb', line 16414 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 |
# File 'lib/ovirtsdk4/types.rb', line 16423 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 |