Class: OvirtSDK4::Api

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Api

Creates a new instance of the OvirtSDK4::Api class.

Options Hash (opts):

  • :authenticated_user (User, Hash)

    The value of attribute authenticated_user.

  • :effective_user (User, Hash)

    The value of attribute effective_user.

  • :engine_backup (EngineBackupInfo, Hash)

    The value of attribute engine_backup.

  • :product_info (ProductInfo, Hash)

    The value of attribute product_info.

  • :special_objects (SpecialObjects, Hash)

    The value of attribute special_objects.

  • :summary (ApiSummary, Hash)

    The value of attribute summary.

  • :time (DateTime)

    The value of attribute time.



1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
# 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

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
# 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

#authenticated_userUser

Returns the value of the authenticated_user attribute.



957
958
959
# File 'lib/ovirtsdk4/types.rb', line 957

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.



970
971
972
973
974
975
# 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

#effective_userUser

Returns the value of the effective_user attribute.



982
983
984
# File 'lib/ovirtsdk4/types.rb', line 982

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.



995
996
997
998
999
1000
# 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

#engine_backupEngineBackupInfo

Returns the value of the engine_backup attribute.



1007
1008
1009
# File 'lib/ovirtsdk4/types.rb', line 1007

def engine_backup
  @engine_backup
end

#engine_backup=(value) ⇒ Object

Sets the value of the engine_backup attribute.

The value parameter can be an instance of 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.



1020
1021
1022
1023
1024
1025
# 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

#hashObject

Generates a hash value for this object.



1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# 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

#product_infoProductInfo

Returns the value of the product_info attribute.



1032
1033
1034
# File 'lib/ovirtsdk4/types.rb', line 1032

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.



1045
1046
1047
1048
1049
1050
# 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

#special_objectsSpecialObjects

Returns the value of the special_objects attribute.



1057
1058
1059
# File 'lib/ovirtsdk4/types.rb', line 1057

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.



1070
1071
1072
1073
1074
1075
# 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

#summaryApiSummary

Returns the value of the summary attribute.



1082
1083
1084
# File 'lib/ovirtsdk4/types.rb', line 1082

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.



1095
1096
1097
1098
1099
1100
# File 'lib/ovirtsdk4/types.rb', line 1095

def summary=(value)
  if value.is_a?(Hash)
    value = ApiSummary.new(value)
  end
  @summary = value
end

#timeDateTime

Returns the value of the time attribute.



1107
1108
1109
# File 'lib/ovirtsdk4/types.rb', line 1107

def time
  @time
end

#time=(value) ⇒ Object

Sets the value of the time attribute.



1116
1117
1118
# File 'lib/ovirtsdk4/types.rb', line 1116

def time=(value)
  @time = value
end