class OvirtSDK4::Api
Public Class Methods
Creates a new instance of the {Api} 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 [User, Hash] :authenticated_user The value of attribute `authenticated_user`.
@option opts [User, Hash] :effective_user The value of attribute `effective_user`.
@option opts [EngineBackupInfo, Hash] :engine_backup The value of attribute `engine_backup`.
@option opts [ProductInfo, Hash] :product_info The value of attribute `product_info`.
@option opts [SpecialObjects, Hash] :special_objects The value of attribute `special_objects`.
@option opts [ApiSummary, Hash] :summary The value of attribute `summary`.
@option opts [DateTime] :time The value of attribute `time`.
OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 1142 def initialize(opts = {}) super(opts) self.authenticated_user = opts[:authenticated_user] self.effective_user = opts[:effective_user] self.engine_backup = opts[:engine_backup] self.product_info = opts[:product_info] self.special_objects = opts[:special_objects] self.summary = opts[:summary] self.time = opts[:time] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 1156 def ==(other) super && @authenticated_user == other.authenticated_user && @effective_user == other.effective_user && @engine_backup == other.engine_backup && @product_info == other.product_info && @special_objects == other.special_objects && @summary == other.summary && @time == other.time end
Returns the value of the `authenticated_user` attribute.
@return [User]
# File lib/ovirtsdk4/types.rb, line 957 def authenticated_user @authenticated_user end
Sets the value of the `authenticated_user` attribute.
@param value [User, Hash]
The `value` parameter can be an instance of {OvirtSDK4::User} 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 970 def authenticated_user=(value) if value.is_a?(Hash) value = User.new(value) end @authenticated_user = value end
Returns the value of the `effective_user` attribute.
@return [User]
# File lib/ovirtsdk4/types.rb, line 982 def effective_user @effective_user end
Sets the value of the `effective_user` attribute.
@param value [User, Hash]
The `value` parameter can be an instance of {OvirtSDK4::User} 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 995 def effective_user=(value) if value.is_a?(Hash) value = User.new(value) end @effective_user = value end
Returns the value of the `engine_backup` attribute.
@return [EngineBackupInfo]
# File lib/ovirtsdk4/types.rb, line 1007 def engine_backup @engine_backup end
Sets the value of the `engine_backup` attribute.
@param value [EngineBackupInfo, Hash]
The `value` parameter can be an instance of {OvirtSDK4::EngineBackupInfo} 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 1020 def engine_backup=(value) if value.is_a?(Hash) value = EngineBackupInfo.new(value) end @engine_backup = value end
Generates a hash value for this object.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 1170 def hash super + @authenticated_user.hash + @effective_user.hash + @engine_backup.hash + @product_info.hash + @special_objects.hash + @summary.hash + @time.hash end
Returns the value of the `product_info` attribute.
@return [ProductInfo]
# File lib/ovirtsdk4/types.rb, line 1032 def product_info @product_info end
Sets the value of the `product_info` attribute.
@param value [ProductInfo, Hash]
The `value` parameter can be an instance of {OvirtSDK4::ProductInfo} 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 1045 def product_info=(value) if value.is_a?(Hash) value = ProductInfo.new(value) end @product_info = value end
Returns the value of the `special_objects` attribute.
@return [SpecialObjects]
# File lib/ovirtsdk4/types.rb, line 1057 def special_objects @special_objects end
Sets the value of the `special_objects` attribute.
@param value [SpecialObjects, Hash]
The `value` parameter can be an instance of {OvirtSDK4::SpecialObjects} 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 1070 def special_objects=(value) if value.is_a?(Hash) value = SpecialObjects.new(value) end @special_objects = value end
Returns the value of the `summary` attribute.
@return [ApiSummary]
# File lib/ovirtsdk4/types.rb, line 1082 def summary @summary end
Sets the value of the `summary` attribute.
@param value [ApiSummary, Hash]
The `value` parameter can be an instance of {OvirtSDK4::ApiSummary} 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 1095 def summary=(value) if value.is_a?(Hash) value = ApiSummary.new(value) end @summary = value end
Returns the value of the `time` attribute.
@return [DateTime]
# File lib/ovirtsdk4/types.rb, line 1107 def time @time end
Sets the value of the `time` attribute.
@param value [DateTime]
# File lib/ovirtsdk4/types.rb, line 1116 def time=(value) @time = value end