akeyless 5.0.22 → 5.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -1
  3. data/docs/AccountGeneralSettings.md +4 -0
  4. data/docs/AuthMethodCreateUniversalIdentity.md +4 -0
  5. data/docs/AuthMethodUpdateUniversalIdentity.md +4 -0
  6. data/docs/AwsStorage.md +2 -0
  7. data/docs/CreateAuthMethodUniversalIdentity.md +4 -0
  8. data/docs/CreateRotatedSecret.md +3 -1
  9. data/docs/CreateSecret.md +2 -0
  10. data/docs/CreateUSC.md +1 -1
  11. data/docs/DeleteRoleRule.md +1 -1
  12. data/docs/DescribePermissions.md +1 -1
  13. data/docs/DigiCertTargetDetails.md +42 -0
  14. data/docs/EsmListSecretsOutput.md +3 -1
  15. data/docs/GatewayCreateMigration.md +4 -0
  16. data/docs/GatewayUpdateMigration.md +4 -0
  17. data/docs/GatewayUpdateRemoteAccessRdpRecordings.md +2 -0
  18. data/docs/GeneralConfigPart.md +4 -0
  19. data/docs/GoogleTrustTargetDetails.md +42 -0
  20. data/docs/HashiPayload.md +5 -1
  21. data/docs/Item.md +2 -0
  22. data/docs/ItemLockingSetting.md +20 -0
  23. data/docs/LockItem.md +28 -0
  24. data/docs/LockTarget.md +28 -0
  25. data/docs/LockingInfo.md +24 -0
  26. data/docs/MigrationStatusReplyObj.md +2 -0
  27. data/docs/NetappStorage.md +30 -0
  28. data/docs/ReverseRBAC.md +1 -1
  29. data/docs/RotatedSecretCreateAws.md +3 -1
  30. data/docs/RotatedSecretCreateAzure.md +3 -1
  31. data/docs/RotatedSecretCreateCustom.md +3 -1
  32. data/docs/RotatedSecretCreateLdap.md +3 -1
  33. data/docs/RotatedSecretCreateMongodb.md +3 -1
  34. data/docs/RotatedSecretCreateMssql.md +3 -1
  35. data/docs/RotatedSecretCreateMysql.md +3 -1
  36. data/docs/RotatedSecretCreateOracledb.md +3 -1
  37. data/docs/RotatedSecretCreatePostgresql.md +3 -1
  38. data/docs/RotatedSecretCreateRedshift.md +3 -1
  39. data/docs/RotatedSecretCreateSsh.md +3 -1
  40. data/docs/RotatedSecretCreateWindows.md +3 -1
  41. data/docs/RotatedSecretUpdateAws.md +3 -1
  42. data/docs/RotatedSecretUpdateAzure.md +3 -1
  43. data/docs/RotatedSecretUpdateCustom.md +3 -1
  44. data/docs/RotatedSecretUpdateLdap.md +3 -1
  45. data/docs/RotatedSecretUpdateMongodb.md +3 -1
  46. data/docs/RotatedSecretUpdateMssql.md +3 -1
  47. data/docs/RotatedSecretUpdateMysql.md +3 -1
  48. data/docs/RotatedSecretUpdateOracledb.md +3 -1
  49. data/docs/RotatedSecretUpdatePostgresql.md +3 -1
  50. data/docs/RotatedSecretUpdateRedshift.md +3 -1
  51. data/docs/RotatedSecretUpdateSsh.md +3 -1
  52. data/docs/RotatedSecretUpdateWindows.md +3 -1
  53. data/docs/SecretInfo.md +2 -0
  54. data/docs/SecureRemoteAccess.md +4 -0
  55. data/docs/SetRoleRule.md +1 -1
  56. data/docs/SyncCounters.md +22 -0
  57. data/docs/Target.md +2 -0
  58. data/docs/TargetCreateDigiCert.md +50 -0
  59. data/docs/TargetCreateGoogleTrust.md +50 -0
  60. data/docs/TargetCreateLetsEncrypt.md +1 -1
  61. data/docs/TargetCreateSplunk.md +3 -1
  62. data/docs/TargetTypeDetailsInput.md +4 -0
  63. data/docs/TargetUpdateDigiCert.md +54 -0
  64. data/docs/TargetUpdateGoogleTrust.md +54 -0
  65. data/docs/TargetUpdateLetsEncrypt.md +1 -1
  66. data/docs/UniversalIdentityAccessRules.md +4 -0
  67. data/docs/UnlockItem.md +24 -0
  68. data/docs/UnlockTarget.md +24 -0
  69. data/docs/UpdateAccountSettings.md +4 -0
  70. data/docs/UpdateAuthMethodUniversalIdentity.md +4 -0
  71. data/docs/UpdateItem.md +3 -1
  72. data/docs/UpdateRotatedSecret.md +3 -1
  73. data/docs/UscCreate.md +2 -0
  74. data/docs/UscDelete.md +4 -0
  75. data/docs/UscGet.md +4 -0
  76. data/docs/UscListSecretsOutput.md +3 -1
  77. data/docs/UscUpdate.md +4 -0
  78. data/docs/V2Api.md +506 -2
  79. data/docs/WebBastionRdpRecord.md +2 -0
  80. data/lib/akeyless/api/v2_api.rb +512 -0
  81. data/lib/akeyless/models/account_general_settings.rb +19 -1
  82. data/lib/akeyless/models/auth_method_create_universal_identity.rb +25 -1
  83. data/lib/akeyless/models/auth_method_update_universal_identity.rb +25 -1
  84. data/lib/akeyless/models/aws_storage.rb +10 -1
  85. data/lib/akeyless/models/create_auth_method_universal_identity.rb +25 -1
  86. data/lib/akeyless/models/create_rotated_secret.rb +12 -4
  87. data/lib/akeyless/models/create_secret.rb +11 -1
  88. data/lib/akeyless/models/create_usc.rb +1 -1
  89. data/lib/akeyless/models/delete_role_rule.rb +1 -1
  90. data/lib/akeyless/models/describe_permissions.rb +1 -1
  91. data/lib/akeyless/models/digi_cert_target_details.rb +333 -0
  92. data/lib/akeyless/models/esm_list_secrets_output.rb +15 -4
  93. data/lib/akeyless/models/gateway_create_migration.rb +21 -1
  94. data/lib/akeyless/models/gateway_update_migration.rb +21 -1
  95. data/lib/akeyless/models/gateway_update_remote_access_rdp_recordings.rb +11 -1
  96. data/lib/akeyless/models/general_config_part.rb +19 -1
  97. data/lib/akeyless/models/google_trust_target_details.rb +335 -0
  98. data/lib/akeyless/models/hashi_payload.rb +22 -4
  99. data/lib/akeyless/models/item.rb +10 -1
  100. data/lib/akeyless/models/item_locking_setting.rb +223 -0
  101. data/lib/akeyless/models/lock_item.rb +274 -0
  102. data/lib/akeyless/models/lock_target.rb +274 -0
  103. data/lib/akeyless/models/locking_info.rb +243 -0
  104. data/lib/akeyless/models/migration_status_reply_obj.rb +10 -1
  105. data/lib/akeyless/models/netapp_storage.rb +268 -0
  106. data/lib/akeyless/models/reverse_rbac.rb +1 -1
  107. data/lib/akeyless/models/rotated_secret_create_aws.rb +12 -4
  108. data/lib/akeyless/models/rotated_secret_create_azure.rb +12 -4
  109. data/lib/akeyless/models/rotated_secret_create_custom.rb +12 -4
  110. data/lib/akeyless/models/rotated_secret_create_ldap.rb +12 -4
  111. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +12 -4
  112. data/lib/akeyless/models/rotated_secret_create_mssql.rb +12 -4
  113. data/lib/akeyless/models/rotated_secret_create_mysql.rb +12 -4
  114. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +12 -4
  115. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +12 -4
  116. data/lib/akeyless/models/rotated_secret_create_redshift.rb +12 -4
  117. data/lib/akeyless/models/rotated_secret_create_ssh.rb +12 -4
  118. data/lib/akeyless/models/rotated_secret_create_windows.rb +12 -4
  119. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -4
  120. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -4
  121. data/lib/akeyless/models/rotated_secret_update_custom.rb +12 -4
  122. data/lib/akeyless/models/rotated_secret_update_ldap.rb +12 -4
  123. data/lib/akeyless/models/rotated_secret_update_mongodb.rb +12 -4
  124. data/lib/akeyless/models/rotated_secret_update_mssql.rb +12 -4
  125. data/lib/akeyless/models/rotated_secret_update_mysql.rb +12 -4
  126. data/lib/akeyless/models/rotated_secret_update_oracledb.rb +12 -4
  127. data/lib/akeyless/models/rotated_secret_update_postgresql.rb +12 -4
  128. data/lib/akeyless/models/rotated_secret_update_redshift.rb +12 -4
  129. data/lib/akeyless/models/rotated_secret_update_ssh.rb +12 -4
  130. data/lib/akeyless/models/rotated_secret_update_windows.rb +12 -4
  131. data/lib/akeyless/models/secret_info.rb +10 -1
  132. data/lib/akeyless/models/secure_remote_access.rb +19 -1
  133. data/lib/akeyless/models/set_role_rule.rb +1 -1
  134. data/lib/akeyless/models/sync_counters.rb +233 -0
  135. data/lib/akeyless/models/target.rb +10 -1
  136. data/lib/akeyless/models/target_create_digi_cert.rb +398 -0
  137. data/lib/akeyless/models/target_create_google_trust.rb +398 -0
  138. data/lib/akeyless/models/target_create_lets_encrypt.rb +7 -0
  139. data/lib/akeyless/models/target_create_splunk.rb +11 -1
  140. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  141. data/lib/akeyless/models/target_update_digi_cert.rb +418 -0
  142. data/lib/akeyless/models/target_update_google_trust.rb +418 -0
  143. data/lib/akeyless/models/target_update_lets_encrypt.rb +7 -0
  144. data/lib/akeyless/models/universal_identity_access_rules.rb +19 -1
  145. data/lib/akeyless/models/unlock_item.rb +254 -0
  146. data/lib/akeyless/models/unlock_target.rb +254 -0
  147. data/lib/akeyless/models/update_account_settings.rb +21 -1
  148. data/lib/akeyless/models/update_auth_method_universal_identity.rb +25 -1
  149. data/lib/akeyless/models/update_item.rb +12 -4
  150. data/lib/akeyless/models/update_rotated_secret.rb +12 -4
  151. data/lib/akeyless/models/usc_create.rb +10 -1
  152. data/lib/akeyless/models/usc_delete.rb +20 -1
  153. data/lib/akeyless/models/usc_get.rb +20 -1
  154. data/lib/akeyless/models/usc_list_secrets_output.rb +15 -4
  155. data/lib/akeyless/models/usc_update.rb +20 -1
  156. data/lib/akeyless/models/web_bastion_rdp_record.rb +10 -1
  157. data/lib/akeyless/version.rb +1 -1
  158. data/lib/akeyless.rb +14 -0
  159. data/spec/models/digi_cert_target_details_spec.rb +108 -0
  160. data/spec/models/google_trust_target_details_spec.rb +108 -0
  161. data/spec/models/item_locking_setting_spec.rb +42 -0
  162. data/spec/models/lock_item_spec.rb +66 -0
  163. data/spec/models/lock_target_spec.rb +66 -0
  164. data/spec/models/locking_info_spec.rb +54 -0
  165. data/spec/models/netapp_storage_spec.rb +72 -0
  166. data/spec/models/sync_counters_spec.rb +48 -0
  167. data/spec/models/target_create_digi_cert_spec.rb +132 -0
  168. data/spec/models/target_create_google_trust_spec.rb +132 -0
  169. data/spec/models/target_update_digi_cert_spec.rb +144 -0
  170. data/spec/models/target_update_google_trust_spec.rb +144 -0
  171. data/spec/models/unlock_item_spec.rb +54 -0
  172. data/spec/models/unlock_target_spec.rb +54 -0
  173. metadata +1206 -1147
@@ -0,0 +1,274 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class LockTarget
18
+ # Comma-separated blocked actions (read, update)
19
+ attr_accessor :actions
20
+
21
+ # Set output format to JSON
22
+ attr_accessor :json
23
+
24
+ # Lock TTL in minutes
25
+ attr_accessor :lock_ttl
26
+
27
+ # Target name
28
+ attr_accessor :name
29
+
30
+ # Authentication token (see `/auth` and `/configure`)
31
+ attr_accessor :token
32
+
33
+ # The universal identity token, Required only for universal_identity authentication
34
+ attr_accessor :uid_token
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'actions' => :'actions',
40
+ :'json' => :'json',
41
+ :'lock_ttl' => :'lock-ttl',
42
+ :'name' => :'name',
43
+ :'token' => :'token',
44
+ :'uid_token' => :'uid-token'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'actions' => :'String',
57
+ :'json' => :'Boolean',
58
+ :'lock_ttl' => :'Integer',
59
+ :'name' => :'String',
60
+ :'token' => :'String',
61
+ :'uid_token' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::LockTarget` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::LockTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'actions')
87
+ self.actions = attributes[:'actions']
88
+ end
89
+
90
+ if attributes.key?(:'json')
91
+ self.json = attributes[:'json']
92
+ else
93
+ self.json = false
94
+ end
95
+
96
+ if attributes.key?(:'lock_ttl')
97
+ self.lock_ttl = attributes[:'lock_ttl']
98
+ end
99
+
100
+ if attributes.key?(:'name')
101
+ self.name = attributes[:'name']
102
+ else
103
+ self.name = nil
104
+ end
105
+
106
+ if attributes.key?(:'token')
107
+ self.token = attributes[:'token']
108
+ end
109
+
110
+ if attributes.key?(:'uid_token')
111
+ self.uid_token = attributes[:'uid_token']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @name.nil?
121
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @name.nil?
132
+ true
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] Object to be compared
137
+ def ==(o)
138
+ return true if self.equal?(o)
139
+ self.class == o.class &&
140
+ actions == o.actions &&
141
+ json == o.json &&
142
+ lock_ttl == o.lock_ttl &&
143
+ name == o.name &&
144
+ token == o.token &&
145
+ uid_token == o.uid_token
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [actions, json, lock_ttl, name, token, uid_token].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Deserializes the data based on type
184
+ # @param string type Data type
185
+ # @param string value Value to be deserialized
186
+ # @return [Object] Deserialized data
187
+ def self._deserialize(type, value)
188
+ case type.to_sym
189
+ when :Time
190
+ Time.parse(value)
191
+ when :Date
192
+ Date.parse(value)
193
+ when :String
194
+ value.to_s
195
+ when :Integer
196
+ value.to_i
197
+ when :Float
198
+ value.to_f
199
+ when :Boolean
200
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
201
+ true
202
+ else
203
+ false
204
+ end
205
+ when :Object
206
+ # generic object (usually a Hash), return directly
207
+ value
208
+ when /\AArray<(?<inner_type>.+)>\z/
209
+ inner_type = Regexp.last_match[:inner_type]
210
+ value.map { |v| _deserialize(inner_type, v) }
211
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
212
+ k_type = Regexp.last_match[:k_type]
213
+ v_type = Regexp.last_match[:v_type]
214
+ {}.tap do |hash|
215
+ value.each do |k, v|
216
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
+ end
218
+ end
219
+ else # model
220
+ # models (e.g. Pet) or oneOf
221
+ klass = Akeyless.const_get(type)
222
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
223
+ end
224
+ end
225
+
226
+ # Returns the string representation of the object
227
+ # @return [String] String presentation of the object
228
+ def to_s
229
+ to_hash.to_s
230
+ end
231
+
232
+ # to_body is an alias to to_hash (backward compatibility)
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_body
235
+ to_hash
236
+ end
237
+
238
+ # Returns the object in the form of hash
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_hash
241
+ hash = {}
242
+ self.class.attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ if value.nil?
245
+ is_nullable = self.class.openapi_nullable.include?(attr)
246
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
247
+ end
248
+
249
+ hash[param] = _to_hash(value)
250
+ end
251
+ hash
252
+ end
253
+
254
+ # Outputs non-array value in the form of hash
255
+ # For object, use to_hash. Otherwise, just return the value
256
+ # @param [Object] value Any valid value
257
+ # @return [Hash] Returns the value in the form of hash
258
+ def _to_hash(value)
259
+ if value.is_a?(Array)
260
+ value.compact.map { |v| _to_hash(v) }
261
+ elsif value.is_a?(Hash)
262
+ {}.tap do |hash|
263
+ value.each { |k, v| hash[k] = _to_hash(v) }
264
+ end
265
+ elsif value.respond_to? :to_hash
266
+ value.to_hash
267
+ else
268
+ value
269
+ end
270
+ end
271
+
272
+ end
273
+
274
+ end
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class LockingInfo
18
+ attr_accessor :actions
19
+
20
+ attr_accessor :expire_at
21
+
22
+ attr_accessor :locked_by
23
+
24
+ attr_accessor :unique_identifier
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'actions' => :'actions',
30
+ :'expire_at' => :'expire_at',
31
+ :'locked_by' => :'locked_by',
32
+ :'unique_identifier' => :'unique_identifier'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'actions' => :'Array<String>',
45
+ :'expire_at' => :'Integer',
46
+ :'locked_by' => :'String',
47
+ :'unique_identifier' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::LockingInfo` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::LockingInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'actions')
73
+ if (value = attributes[:'actions']).is_a?(Array)
74
+ self.actions = value
75
+ end
76
+ end
77
+
78
+ if attributes.key?(:'expire_at')
79
+ self.expire_at = attributes[:'expire_at']
80
+ end
81
+
82
+ if attributes.key?(:'locked_by')
83
+ self.locked_by = attributes[:'locked_by']
84
+ end
85
+
86
+ if attributes.key?(:'unique_identifier')
87
+ self.unique_identifier = attributes[:'unique_identifier']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ actions == o.actions &&
112
+ expire_at == o.expire_at &&
113
+ locked_by == o.locked_by &&
114
+ unique_identifier == o.unique_identifier
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [actions, expire_at, locked_by, unique_identifier].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ attributes = attributes.transform_keys(&:to_sym)
135
+ transformed_hash = {}
136
+ openapi_types.each_pair do |key, type|
137
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = nil
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[attribute_map[key]].is_a?(Array)
143
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
144
+ end
145
+ elsif !attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
147
+ end
148
+ end
149
+ new(transformed_hash)
150
+ end
151
+
152
+ # Deserializes the data based on type
153
+ # @param string type Data type
154
+ # @param string value Value to be deserialized
155
+ # @return [Object] Deserialized data
156
+ def self._deserialize(type, value)
157
+ case type.to_sym
158
+ when :Time
159
+ Time.parse(value)
160
+ when :Date
161
+ Date.parse(value)
162
+ when :String
163
+ value.to_s
164
+ when :Integer
165
+ value.to_i
166
+ when :Float
167
+ value.to_f
168
+ when :Boolean
169
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
+ true
171
+ else
172
+ false
173
+ end
174
+ when :Object
175
+ # generic object (usually a Hash), return directly
176
+ value
177
+ when /\AArray<(?<inner_type>.+)>\z/
178
+ inner_type = Regexp.last_match[:inner_type]
179
+ value.map { |v| _deserialize(inner_type, v) }
180
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
+ k_type = Regexp.last_match[:k_type]
182
+ v_type = Regexp.last_match[:v_type]
183
+ {}.tap do |hash|
184
+ value.each do |k, v|
185
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ end
187
+ end
188
+ else # model
189
+ # models (e.g. Pet) or oneOf
190
+ klass = Akeyless.const_get(type)
191
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ # Outputs non-array value in the form of hash
224
+ # For object, use to_hash. Otherwise, just return the value
225
+ # @param [Object] value Any valid value
226
+ # @return [Hash] Returns the value in the form of hash
227
+ def _to_hash(value)
228
+ if value.is_a?(Array)
229
+ value.compact.map { |v| _to_hash(v) }
230
+ elsif value.is_a?(Hash)
231
+ {}.tap do |hash|
232
+ value.each { |k, v| hash[k] = _to_hash(v) }
233
+ end
234
+ elsif value.respond_to? :to_hash
235
+ value.to_hash
236
+ else
237
+ value
238
+ end
239
+ end
240
+
241
+ end
242
+
243
+ end
@@ -45,6 +45,8 @@ module Akeyless
45
45
 
46
46
  attr_accessor :start_time
47
47
 
48
+ attr_accessor :sync
49
+
48
50
  attr_accessor :targets
49
51
 
50
52
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -65,6 +67,7 @@ module Akeyless
65
67
  :'migration_type_name' => :'migration_type_name',
66
68
  :'rotated_secrets' => :'rotated_secrets',
67
69
  :'start_time' => :'start_time',
70
+ :'sync' => :'sync',
68
71
  :'targets' => :'targets'
69
72
  }
70
73
  end
@@ -92,6 +95,7 @@ module Akeyless
92
95
  :'migration_type_name' => :'String',
93
96
  :'rotated_secrets' => :'MigrationItems',
94
97
  :'start_time' => :'String',
98
+ :'sync' => :'SyncCounters',
95
99
  :'targets' => :'MigrationItems'
96
100
  }
97
101
  end
@@ -177,6 +181,10 @@ module Akeyless
177
181
  self.start_time = attributes[:'start_time']
178
182
  end
179
183
 
184
+ if attributes.key?(:'sync')
185
+ self.sync = attributes[:'sync']
186
+ end
187
+
180
188
  if attributes.key?(:'targets')
181
189
  self.targets = attributes[:'targets']
182
190
  end
@@ -217,6 +225,7 @@ module Akeyless
217
225
  migration_type_name == o.migration_type_name &&
218
226
  rotated_secrets == o.rotated_secrets &&
219
227
  start_time == o.start_time &&
228
+ sync == o.sync &&
220
229
  targets == o.targets
221
230
  end
222
231
 
@@ -229,7 +238,7 @@ module Akeyless
229
238
  # Calculates hash code according to all attributes.
230
239
  # @return [Integer] Hash code
231
240
  def hash
232
- [certificates, computers, duration_time, error, last_status_message, max_name_length, max_value_length, migration_id, migration_items, migration_name, migration_state, migration_type, migration_type_name, rotated_secrets, start_time, targets].hash
241
+ [certificates, computers, duration_time, error, last_status_message, max_name_length, max_value_length, migration_id, migration_items, migration_name, migration_state, migration_type, migration_type_name, rotated_secrets, start_time, sync, targets].hash
233
242
  end
234
243
 
235
244
  # Builds the object from hash