Class: OvirtSDK4::Api
- 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. -
#authenticated_user ⇒ User
Returns the value of the
authenticated_user
attribute. -
#authenticated_user=(value) ⇒ Object
Sets the value of the
authenticated_user
attribute. -
#effective_user ⇒ User
Returns the value of the
effective_user
attribute. -
#effective_user=(value) ⇒ Object
Sets the value of the
effective_user
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ Api
constructor
Creates a new instance of the Api class.
-
#product_info ⇒ ProductInfo
Returns the value of the
product_info
attribute. -
#product_info=(value) ⇒ Object
Sets the value of the
product_info
attribute. -
#special_objects ⇒ SpecialObjects
Returns the value of the
special_objects
attribute. -
#special_objects=(value) ⇒ Object
Sets the value of the
special_objects
attribute. -
#summary ⇒ ApiSummary
Returns the value of the
summary
attribute. -
#summary=(value) ⇒ Object
Sets the value of the
summary
attribute. -
#time ⇒ DateTime
Returns the value of the
time
attribute. -
#time=(value) ⇒ Object
Sets the value of the
time
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Api
Creates a new instance of the OvirtSDK4::Api class.
1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'lib/ovirtsdk4/types.rb', line 1112 def initialize(opts = {}) super(opts) self.authenticated_user = opts[:authenticated_user] self.effective_user = opts[:effective_user] self.product_info = opts[:product_info] self.special_objects = opts[:special_objects] self.summary = opts[:summary] self.time = opts[:time] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
1125 1126 1127 1128 1129 1130 1131 1132 1133 |
# File 'lib/ovirtsdk4/types.rb', line 1125 def ==(other) super && @authenticated_user == other.authenticated_user && @effective_user == other.effective_user && @product_info == other.product_info && @special_objects == other.special_objects && @summary == other.summary && @time == other.time end |
#authenticated_user ⇒ User
Returns the value of the authenticated_user
attribute.
954 955 956 |
# File 'lib/ovirtsdk4/types.rb', line 954 def authenticated_user @authenticated_user end |
#authenticated_user=(value) ⇒ Object
Sets the value of the authenticated_user
attribute.
The value
parameter can be an instance of 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.
967 968 969 970 971 972 |
# File 'lib/ovirtsdk4/types.rb', line 967 def authenticated_user=(value) if value.is_a?(Hash) value = User.new(value) end @authenticated_user = value end |
#effective_user ⇒ User
Returns the value of the effective_user
attribute.
979 980 981 |
# File 'lib/ovirtsdk4/types.rb', line 979 def effective_user @effective_user end |
#effective_user=(value) ⇒ Object
Sets the value of the effective_user
attribute.
The value
parameter can be an instance of 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.
992 993 994 995 996 997 |
# File 'lib/ovirtsdk4/types.rb', line 992 def effective_user=(value) if value.is_a?(Hash) value = User.new(value) end @effective_user = value end |
#hash ⇒ Object
Generates a hash value for this object.
1138 1139 1140 1141 1142 1143 1144 1145 1146 |
# File 'lib/ovirtsdk4/types.rb', line 1138 def hash super + @authenticated_user.hash + @effective_user.hash + @product_info.hash + @special_objects.hash + @summary.hash + @time.hash end |
#product_info ⇒ ProductInfo
Returns the value of the product_info
attribute.
1004 1005 1006 |
# File 'lib/ovirtsdk4/types.rb', line 1004 def product_info @product_info end |
#product_info=(value) ⇒ Object
Sets the value of the product_info
attribute.
The value
parameter can be an instance of 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.
1017 1018 1019 1020 1021 1022 |
# File 'lib/ovirtsdk4/types.rb', line 1017 def product_info=(value) if value.is_a?(Hash) value = ProductInfo.new(value) end @product_info = value end |
#special_objects ⇒ SpecialObjects
Returns the value of the special_objects
attribute.
1029 1030 1031 |
# File 'lib/ovirtsdk4/types.rb', line 1029 def special_objects @special_objects end |
#special_objects=(value) ⇒ Object
Sets the value of the special_objects
attribute.
The value
parameter can be an instance of 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.
1042 1043 1044 1045 1046 1047 |
# File 'lib/ovirtsdk4/types.rb', line 1042 def special_objects=(value) if value.is_a?(Hash) value = SpecialObjects.new(value) end @special_objects = value end |
#summary ⇒ ApiSummary
Returns the value of the summary
attribute.
1054 1055 1056 |
# File 'lib/ovirtsdk4/types.rb', line 1054 def summary @summary end |
#summary=(value) ⇒ Object
Sets the value of the summary
attribute.
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.
1067 1068 1069 1070 1071 1072 |
# File 'lib/ovirtsdk4/types.rb', line 1067 def summary=(value) if value.is_a?(Hash) value = ApiSummary.new(value) end @summary = value end |
#time ⇒ DateTime
Returns the value of the time
attribute.
1079 1080 1081 |
# File 'lib/ovirtsdk4/types.rb', line 1079 def time @time end |
#time=(value) ⇒ Object
Sets the value of the time
attribute.
1088 1089 1090 |
# File 'lib/ovirtsdk4/types.rb', line 1088 def time=(value) @time = value end |