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`.
OvirtSDK4::Struct::new
# 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
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# 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
Generates a hash value for this object.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 1290 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 1157 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 1170 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 1182 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 1195 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 1207 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 1220 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 1232 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 1245 def vms=(value) if value.is_a?(Hash) value = ApiSummaryItem.new(value) end @vms = value end