Class: OvirtSDK4::ApiSummary
- 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. -
#hash ⇒ Object
Generates a hash value for this object.
-
#hosts ⇒ ApiSummaryItem
Returns the value of the
hosts
attribute. -
#hosts=(value) ⇒ Object
Sets the value of the
hosts
attribute. -
#initialize(opts = {}) ⇒ ApiSummary
constructor
Creates a new instance of the ApiSummary class.
-
#storage_domains ⇒ ApiSummaryItem
Returns the value of the
storage_domains
attribute. -
#storage_domains=(value) ⇒ Object
Sets the value of the
storage_domains
attribute. -
#users ⇒ ApiSummaryItem
Returns the value of the
users
attribute. -
#users=(value) ⇒ Object
Sets the value of the
users
attribute. -
#vms ⇒ ApiSummaryItem
Returns the value of the
vms
attribute. -
#vms=(value) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ApiSummary
Creates a new instance of the OvirtSDK4::ApiSummary class.
1268 1269 1270 1271 1272 1273 1274 |
# File 'lib/ovirtsdk4/types.rb', line 1268 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.
1279 1280 1281 1282 1283 1284 1285 |
# File 'lib/ovirtsdk4/types.rb', line 1279 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.
1290 1291 1292 1293 1294 1295 1296 |
# File 'lib/ovirtsdk4/types.rb', line 1290 def hash super + @hosts.hash + @storage_domains.hash + @users.hash + @vms.hash end |
#hosts ⇒ ApiSummaryItem
Returns the value of the hosts
attribute.
1157 1158 1159 |
# File 'lib/ovirtsdk4/types.rb', line 1157 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.
1170 1171 1172 1173 1174 1175 |
# File 'lib/ovirtsdk4/types.rb', line 1170 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.
1182 1183 1184 |
# File 'lib/ovirtsdk4/types.rb', line 1182 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.
1195 1196 1197 1198 1199 1200 |
# File 'lib/ovirtsdk4/types.rb', line 1195 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.
1207 1208 1209 |
# File 'lib/ovirtsdk4/types.rb', line 1207 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.
1220 1221 1222 1223 1224 1225 |
# File 'lib/ovirtsdk4/types.rb', line 1220 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.
1232 1233 1234 |
# File 'lib/ovirtsdk4/types.rb', line 1232 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.
1245 1246 1247 1248 1249 1250 |
# File 'lib/ovirtsdk4/types.rb', line 1245 def vms=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @vms = value end |