Class: OvirtSDK4::ApiSummary
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#hosts ⇒ ApiSummaryItem
Returns the value of the
hostsattribute. -
#hosts=(value) ⇒ Object
Sets the value of the
hostsattribute. -
#initialize(opts = {}) ⇒ ApiSummary
constructor
Creates a new instance of the ApiSummary class.
-
#storage_domains ⇒ ApiSummaryItem
Returns the value of the
storage_domainsattribute. -
#storage_domains=(value) ⇒ Object
Sets the value of the
storage_domainsattribute. -
#users ⇒ ApiSummaryItem
Returns the value of the
usersattribute. -
#users=(value) ⇒ Object
Sets the value of the
usersattribute. -
#vms ⇒ ApiSummaryItem
Returns the value of the
vmsattribute. -
#vms=(value) ⇒ Object
Sets the value of the
vmsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ApiSummary
Creates a new instance of the OvirtSDK4::ApiSummary class.
1301 1302 1303 1304 1305 1306 1307 |
# File 'lib/ovirtsdk4/types.rb', line 1301 def initialize(opts = {}) super(opts) self.hosts = opts[:hosts] self.storage_domains = opts[:storage_domains] 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.
1312 1313 1314 1315 1316 1317 1318 |
# File 'lib/ovirtsdk4/types.rb', line 1312 def ==(other) super && @hosts == other.hosts && @storage_domains == other.storage_domains && @users == other.users && @vms == other.vms end |
#hash ⇒ Object
Generates a hash value for this object.
1323 1324 1325 1326 1327 1328 1329 |
# File 'lib/ovirtsdk4/types.rb', line 1323 def hash super + @hosts.hash + @storage_domains.hash + @users.hash + @vms.hash end |
#hosts ⇒ ApiSummaryItem
Returns the value of the hosts attribute.
1190 1191 1192 |
# File 'lib/ovirtsdk4/types.rb', line 1190 def hosts @hosts end |
#hosts=(value) ⇒ Object
Sets the value of the hosts attribute.
The value parameter can be an instance of OvirtSDK4::ApiSummaryItem 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.
1203 1204 1205 1206 1207 1208 |
# File 'lib/ovirtsdk4/types.rb', line 1203 def hosts=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @hosts = value end |
#storage_domains ⇒ ApiSummaryItem
Returns the value of the storage_domains attribute.
1215 1216 1217 |
# File 'lib/ovirtsdk4/types.rb', line 1215 def storage_domains @storage_domains end |
#storage_domains=(value) ⇒ Object
Sets the value of the storage_domains attribute.
The value parameter can be an instance of OvirtSDK4::ApiSummaryItem 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.
1228 1229 1230 1231 1232 1233 |
# File 'lib/ovirtsdk4/types.rb', line 1228 def storage_domains=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @storage_domains = value end |
#users ⇒ ApiSummaryItem
Returns the value of the users attribute.
1240 1241 1242 |
# File 'lib/ovirtsdk4/types.rb', line 1240 def users @users end |
#users=(value) ⇒ Object
Sets the value of the users attribute.
The value parameter can be an instance of OvirtSDK4::ApiSummaryItem 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.
1253 1254 1255 1256 1257 1258 |
# File 'lib/ovirtsdk4/types.rb', line 1253 def users=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @users = value end |
#vms ⇒ ApiSummaryItem
Returns the value of the vms attribute.
1265 1266 1267 |
# File 'lib/ovirtsdk4/types.rb', line 1265 def vms @vms end |
#vms=(value) ⇒ Object
Sets the value of the vms attribute.
The value parameter can be an instance of OvirtSDK4::ApiSummaryItem 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.
1278 1279 1280 1281 1282 1283 |
# File 'lib/ovirtsdk4/types.rb', line 1278 def vms=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @vms = value end |