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.
16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 |
# File 'lib/ovirtsdk4/types.rb', line 16000 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.
16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 |
# File 'lib/ovirtsdk4/types.rb', line 16018 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.
15642 15643 15644 |
# File 'lib/ovirtsdk4/types.rb', line 15642 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.
15651 15652 15653 |
# File 'lib/ovirtsdk4/types.rb', line 15651 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.
15660 15661 15662 |
# File 'lib/ovirtsdk4/types.rb', line 15660 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.
15669 15670 15671 |
# File 'lib/ovirtsdk4/types.rb', line 15669 def cluster_soft_limit_pct=(value) @cluster_soft_limit_pct = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
15678 15679 15680 |
# File 'lib/ovirtsdk4/types.rb', line 15678 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
15687 15688 15689 |
# File 'lib/ovirtsdk4/types.rb', line 15687 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
15696 15697 15698 |
# File 'lib/ovirtsdk4/types.rb', line 15696 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.
15709 15710 15711 15712 15713 15714 |
# File 'lib/ovirtsdk4/types.rb', line 15709 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.
15721 15722 15723 |
# File 'lib/ovirtsdk4/types.rb', line 15721 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
15730 15731 15732 |
# File 'lib/ovirtsdk4/types.rb', line 15730 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
15739 15740 15741 |
# File 'lib/ovirtsdk4/types.rb', line 15739 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 |
# File 'lib/ovirtsdk4/types.rb', line 15748 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.
16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 |
# File 'lib/ovirtsdk4/types.rb', line 16036 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.
15765 15766 15767 |
# File 'lib/ovirtsdk4/types.rb', line 15765 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
15774 15775 15776 |
# File 'lib/ovirtsdk4/types.rb', line 15774 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
15783 15784 15785 |
# File 'lib/ovirtsdk4/types.rb', line 15783 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
15792 15793 15794 |
# File 'lib/ovirtsdk4/types.rb', line 15792 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
15801 15802 15803 |
# File 'lib/ovirtsdk4/types.rb', line 15801 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 |
# File 'lib/ovirtsdk4/types.rb', line 15810 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.
15827 15828 15829 |
# File 'lib/ovirtsdk4/types.rb', line 15827 def quota_cluster_limits @quota_cluster_limits end |
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the quota_cluster_limits
attribute.
15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 |
# File 'lib/ovirtsdk4/types.rb', line 15836 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.
15853 15854 15855 |
# File 'lib/ovirtsdk4/types.rb', line 15853 def quota_storage_limits @quota_storage_limits end |
#quota_storage_limits=(list) ⇒ Object
Sets the value of the quota_storage_limits
attribute.
15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 |
# File 'lib/ovirtsdk4/types.rb', line 15862 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.
15879 15880 15881 |
# File 'lib/ovirtsdk4/types.rb', line 15879 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.
15888 15889 15890 |
# File 'lib/ovirtsdk4/types.rb', line 15888 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.
15897 15898 15899 |
# File 'lib/ovirtsdk4/types.rb', line 15897 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.
15906 15907 15908 |
# File 'lib/ovirtsdk4/types.rb', line 15906 def storage_soft_limit_pct=(value) @storage_soft_limit_pct = value end |
#users ⇒ Array<User>
Returns the value of the users
attribute.
15915 15916 15917 |
# File 'lib/ovirtsdk4/types.rb', line 15915 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 |
# File 'lib/ovirtsdk4/types.rb', line 15924 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.
15941 15942 15943 |
# File 'lib/ovirtsdk4/types.rb', line 15941 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 |
# File 'lib/ovirtsdk4/types.rb', line 15950 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 |