class OvirtSDK4::ApiSummary
Public Class Methods
Creates a new instance of the {ApiSummary} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [ApiSummaryItem, Hash] :hosts The value of attribute `hosts`.
@option opts [ApiSummaryItem, Hash] :storage_domains The value of attribute `storage_domains`.
@option opts [ApiSummaryItem, Hash] :users The value of attribute `users`.
@option opts [ApiSummaryItem, Hash] :vms The value of attribute `vms`.
# File lib/ovirtsdk4/types.rb, line 1241 def initialize(opts = {}) super(opts) self.hosts = opts[:hosts] self.storage_domains = opts[:storage_domains] self.users = opts[:users] self.vms = opts[:vms] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 1252 def ==(other) super && @hosts == other.hosts && @storage_domains == other.storage_domains && @users == other.users && @vms == other.vms end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 1263 def hash super + @hosts.hash + @storage_domains.hash + @users.hash + @vms.hash end
Returns the value of the `hosts` attribute.
@return [ApiSummaryItem]
# File lib/ovirtsdk4/types.rb, line 1130 def hosts @hosts end
Sets the value of the `hosts` attribute.
@param value [ApiSummaryItem, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 1143 def hosts=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @hosts = value end
Returns the value of the `storage_domains` attribute.
@return [ApiSummaryItem]
# File lib/ovirtsdk4/types.rb, line 1155 def storage_domains @storage_domains end
Sets the value of the `storage_domains` attribute.
@param value [ApiSummaryItem, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 1168 def storage_domains=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @storage_domains = value end
Returns the value of the `users` attribute.
@return [ApiSummaryItem]
# File lib/ovirtsdk4/types.rb, line 1180 def users @users end
Sets the value of the `users` attribute.
@param value [ApiSummaryItem, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 1193 def users=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @users = value end
Returns the value of the `vms` attribute.
@return [ApiSummaryItem]
# File lib/ovirtsdk4/types.rb, line 1205 def vms @vms end
Sets the value of the `vms` attribute.
@param value [ApiSummaryItem, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 1218 def vms=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @vms = value end