akeyless 5.0.28 → 5.0.31

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 (176) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +54 -1
  3. data/docs/AccountGeneralSettings.md +4 -0
  4. data/docs/AerospikeTargetDetails.md +82 -0
  5. data/docs/AnthropicTargetDetails.md +20 -0
  6. data/docs/AuthMethod.md +3 -1
  7. data/docs/AuthMethodAccessInfo.md +2 -0
  8. data/docs/AuthMethodCreateSAML.md +3 -1
  9. data/docs/AuthMethodCreateUniversalIdentity.md +2 -0
  10. data/docs/AuthMethodUpdateSAML.md +3 -1
  11. data/docs/AuthMethodUpdateUniversalIdentity.md +2 -0
  12. data/docs/BedrockTargetDetails.md +20 -0
  13. data/docs/CertificateDiscovery.md +2 -0
  14. data/docs/CertificatePayload.md +2 -0
  15. data/docs/CreateAuthMethodSAML.md +3 -1
  16. data/docs/CreateAuthMethodUniversalIdentity.md +2 -0
  17. data/docs/CreateDBTarget.md +2 -0
  18. data/docs/CreateMcpSecretBearerToken.md +46 -0
  19. data/docs/CreateMcpSecretOAuthAuthCode.md +56 -0
  20. data/docs/CreateMcpSecretOAuthClientCreds.md +52 -0
  21. data/docs/CreatePKICertIssuer.md +1 -1
  22. data/docs/CustomDnsTargetDetails.md +20 -0
  23. data/docs/DSProducerDetails.md +2 -0
  24. data/docs/DbTargetDetails.md +2 -0
  25. data/docs/DecryptGPG.md +3 -1
  26. data/docs/EmailCustomization.md +28 -0
  27. data/docs/EmailCustomizationAccountInformation.md +24 -0
  28. data/docs/EmailCustomizationAccountInformationValues.md +24 -0
  29. data/docs/EncryptGPG.md +3 -1
  30. data/docs/EsmGetSecretOutput.md +4 -0
  31. data/docs/FileDownloadInstructions.md +20 -0
  32. data/docs/FileInfo.md +50 -0
  33. data/docs/GatewayCreateMigration.md +4 -0
  34. data/docs/GatewayUpdateMigration.md +4 -0
  35. data/docs/GetKubeExecCreds.md +1 -1
  36. data/docs/GetPKICertificate.md +1 -1
  37. data/docs/GrokTargetDetails.md +22 -0
  38. data/docs/HashiPayload.md +2 -0
  39. data/docs/Item.md +2 -0
  40. data/docs/KeycloakTargetDetails.md +24 -0
  41. data/docs/OktaTargetDetails.md +20 -0
  42. data/docs/RuntimeAuthorityCommand.md +4 -0
  43. data/docs/SAMLAccessRules.md +3 -1
  44. data/docs/StaticSecretDetailsInfo.md +2 -0
  45. data/docs/TargetCreateAerospike.md +64 -0
  46. data/docs/TargetCreateAnthropic.md +36 -0
  47. data/docs/TargetCreateBedrock.md +36 -0
  48. data/docs/TargetCreateCustomDns.md +36 -0
  49. data/docs/TargetCreateDB.md +2 -0
  50. data/docs/TargetCreateGrok.md +38 -0
  51. data/docs/TargetCreateKeycloak.md +40 -0
  52. data/docs/TargetCreateOkta.md +36 -0
  53. data/docs/TargetTypeDetailsInput.md +14 -0
  54. data/docs/TargetUpdateAerospike.md +70 -0
  55. data/docs/TargetUpdateAnthropic.md +42 -0
  56. data/docs/TargetUpdateBedrock.md +42 -0
  57. data/docs/TargetUpdateCustomDns.md +40 -0
  58. data/docs/TargetUpdateDB.md +2 -0
  59. data/docs/TargetUpdateGrok.md +44 -0
  60. data/docs/TargetUpdateKeycloak.md +44 -0
  61. data/docs/TargetUpdateOkta.md +40 -0
  62. data/docs/UidExpirationEvent.md +18 -0
  63. data/docs/UpdateAuthMethodSAML.md +3 -1
  64. data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
  65. data/docs/UpdateDBTarget.md +2 -0
  66. data/docs/UpdateMcpSecretBearerToken.md +40 -0
  67. data/docs/UpdateMcpSecretOAuthAuthCode.md +50 -0
  68. data/docs/UpdateMcpSecretOAuthClientCreds.md +46 -0
  69. data/docs/UpdatePKICertIssuer.md +1 -1
  70. data/docs/UscGetSecretOutput.md +4 -0
  71. data/docs/V2Api.md +1260 -0
  72. data/lib/akeyless/api/v2_api.rb +1410 -130
  73. data/lib/akeyless/models/account_general_settings.rb +20 -1
  74. data/lib/akeyless/models/aerospike_target_details.rb +512 -0
  75. data/lib/akeyless/models/anthropic_target_details.rb +224 -0
  76. data/lib/akeyless/models/auth_method.rb +15 -4
  77. data/lib/akeyless/models/auth_method_access_info.rb +13 -1
  78. data/lib/akeyless/models/auth_method_create_saml.rb +14 -4
  79. data/lib/akeyless/models/auth_method_create_universal_identity.rb +13 -1
  80. data/lib/akeyless/models/auth_method_update_saml.rb +14 -4
  81. data/lib/akeyless/models/auth_method_update_universal_identity.rb +13 -1
  82. data/lib/akeyless/models/bedrock_target_details.rb +224 -0
  83. data/lib/akeyless/models/certificate_discovery.rb +11 -1
  84. data/lib/akeyless/models/certificate_payload.rb +12 -1
  85. data/lib/akeyless/models/create_auth_method_saml.rb +14 -4
  86. data/lib/akeyless/models/create_auth_method_universal_identity.rb +13 -1
  87. data/lib/akeyless/models/create_db_target.rb +11 -1
  88. data/lib/akeyless/models/create_mcp_secret_bearer_token.rb +371 -0
  89. data/lib/akeyless/models/create_mcp_secret_o_auth_auth_code.rb +423 -0
  90. data/lib/akeyless/models/create_mcp_secret_o_auth_client_creds.rb +403 -0
  91. data/lib/akeyless/models/create_pki_cert_issuer.rb +1 -1
  92. data/lib/akeyless/models/custom_dns_target_details.rb +225 -0
  93. data/lib/akeyless/models/db_target_details.rb +11 -1
  94. data/lib/akeyless/models/decrypt_gpg.rb +14 -4
  95. data/lib/akeyless/models/ds_producer_details.rb +11 -1
  96. data/lib/akeyless/models/email_customization.rb +259 -0
  97. data/lib/akeyless/models/email_customization_account_information.rb +242 -0
  98. data/lib/akeyless/models/email_customization_account_information_values.rb +241 -0
  99. data/lib/akeyless/models/encrypt_gpg.rb +14 -4
  100. data/lib/akeyless/models/esm_get_secret_output.rb +19 -1
  101. data/lib/akeyless/models/file_download_instructions.rb +223 -0
  102. data/lib/akeyless/models/file_info.rb +358 -0
  103. data/lib/akeyless/models/gateway_create_migration.rb +21 -1
  104. data/lib/akeyless/models/gateway_update_migration.rb +21 -1
  105. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  106. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  107. data/lib/akeyless/models/grok_target_details.rb +234 -0
  108. data/lib/akeyless/models/hashi_payload.rb +10 -1
  109. data/lib/akeyless/models/item.rb +10 -1
  110. data/lib/akeyless/models/keycloak_target_details.rb +242 -0
  111. data/lib/akeyless/models/okta_target_details.rb +224 -0
  112. data/lib/akeyless/models/runtime_authority_command.rb +21 -1
  113. data/lib/akeyless/models/saml_access_rules.rb +14 -4
  114. data/lib/akeyless/models/static_secret_details_info.rb +10 -1
  115. data/lib/akeyless/models/target_create_aerospike.rb +454 -0
  116. data/lib/akeyless/models/target_create_anthropic.rb +317 -0
  117. data/lib/akeyless/models/target_create_bedrock.rb +317 -0
  118. data/lib/akeyless/models/target_create_custom_dns.rb +330 -0
  119. data/lib/akeyless/models/target_create_db.rb +11 -1
  120. data/lib/akeyless/models/target_create_grok.rb +327 -0
  121. data/lib/akeyless/models/target_create_keycloak.rb +334 -0
  122. data/lib/akeyless/models/target_create_okta.rb +314 -0
  123. data/lib/akeyless/models/target_type_details_input.rb +64 -1
  124. data/lib/akeyless/models/target_update_aerospike.rb +488 -0
  125. data/lib/akeyless/models/target_update_anthropic.rb +351 -0
  126. data/lib/akeyless/models/target_update_bedrock.rb +351 -0
  127. data/lib/akeyless/models/target_update_custom_dns.rb +350 -0
  128. data/lib/akeyless/models/target_update_db.rb +11 -1
  129. data/lib/akeyless/models/target_update_grok.rb +361 -0
  130. data/lib/akeyless/models/target_update_keycloak.rb +354 -0
  131. data/lib/akeyless/models/target_update_okta.rb +334 -0
  132. data/lib/akeyless/models/uid_expiration_event.rb +214 -0
  133. data/lib/akeyless/models/update_auth_method_saml.rb +14 -4
  134. data/lib/akeyless/models/update_auth_method_universal_identity.rb +13 -1
  135. data/lib/akeyless/models/update_db_target.rb +11 -1
  136. data/lib/akeyless/models/update_mcp_secret_bearer_token.rb +338 -0
  137. data/lib/akeyless/models/update_mcp_secret_o_auth_auth_code.rb +390 -0
  138. data/lib/akeyless/models/update_mcp_secret_o_auth_client_creds.rb +370 -0
  139. data/lib/akeyless/models/update_pki_cert_issuer.rb +1 -1
  140. data/lib/akeyless/models/usc_get_secret_output.rb +19 -1
  141. data/lib/akeyless/version.rb +1 -1
  142. data/lib/akeyless.rb +33 -0
  143. data/spec/models/aerospike_target_details_spec.rb +228 -0
  144. data/spec/models/anthropic_target_details_spec.rb +42 -0
  145. data/spec/models/bedrock_target_details_spec.rb +42 -0
  146. data/spec/models/create_mcp_secret_bearer_token_spec.rb +120 -0
  147. data/spec/models/create_mcp_secret_o_auth_auth_code_spec.rb +150 -0
  148. data/spec/models/create_mcp_secret_o_auth_client_creds_spec.rb +138 -0
  149. data/spec/models/custom_dns_target_details_spec.rb +42 -0
  150. data/spec/models/email_customization_account_information_spec.rb +54 -0
  151. data/spec/models/email_customization_account_information_values_spec.rb +54 -0
  152. data/spec/models/email_customization_spec.rb +66 -0
  153. data/spec/models/file_download_instructions_spec.rb +42 -0
  154. data/spec/models/file_info_spec.rb +132 -0
  155. data/spec/models/grok_target_details_spec.rb +48 -0
  156. data/spec/models/keycloak_target_details_spec.rb +54 -0
  157. data/spec/models/okta_target_details_spec.rb +42 -0
  158. data/spec/models/target_create_aerospike_spec.rb +174 -0
  159. data/spec/models/target_create_anthropic_spec.rb +90 -0
  160. data/spec/models/target_create_bedrock_spec.rb +90 -0
  161. data/spec/models/target_create_custom_dns_spec.rb +90 -0
  162. data/spec/models/target_create_grok_spec.rb +96 -0
  163. data/spec/models/target_create_keycloak_spec.rb +102 -0
  164. data/spec/models/target_create_okta_spec.rb +90 -0
  165. data/spec/models/target_update_aerospike_spec.rb +192 -0
  166. data/spec/models/target_update_anthropic_spec.rb +108 -0
  167. data/spec/models/target_update_bedrock_spec.rb +108 -0
  168. data/spec/models/target_update_custom_dns_spec.rb +102 -0
  169. data/spec/models/target_update_grok_spec.rb +114 -0
  170. data/spec/models/target_update_keycloak_spec.rb +114 -0
  171. data/spec/models/target_update_okta_spec.rb +102 -0
  172. data/spec/models/uid_expiration_event_spec.rb +36 -0
  173. data/spec/models/update_mcp_secret_bearer_token_spec.rb +102 -0
  174. data/spec/models/update_mcp_secret_o_auth_auth_code_spec.rb +132 -0
  175. data/spec/models/update_mcp_secret_o_auth_client_creds_spec.rb +120 -0
  176. metadata +1314 -1182
@@ -0,0 +1,334 @@
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 TargetUpdateOkta
18
+ # Okta API token
19
+ attr_accessor :api_token
20
+
21
+ # Protection from accidental deletion of this object [true/false]
22
+ attr_accessor :delete_protection
23
+
24
+ # Description of the object
25
+ attr_accessor :description
26
+
27
+ # Set output format to JSON
28
+ attr_accessor :json
29
+
30
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
31
+ attr_accessor :keep_prev_version
32
+
33
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
34
+ attr_accessor :key
35
+
36
+ # Set the maximum number of versions, limited by the account settings defaults.
37
+ attr_accessor :max_versions
38
+
39
+ # Target name
40
+ attr_accessor :name
41
+
42
+ # New target name
43
+ attr_accessor :new_name
44
+
45
+ # Authentication token (see `/auth` and `/configure`)
46
+ attr_accessor :token
47
+
48
+ # The universal identity token, Required only for universal_identity authentication
49
+ attr_accessor :uid_token
50
+
51
+ # Okta URL
52
+ attr_accessor :url
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'api_token' => :'api-token',
58
+ :'delete_protection' => :'delete_protection',
59
+ :'description' => :'description',
60
+ :'json' => :'json',
61
+ :'keep_prev_version' => :'keep-prev-version',
62
+ :'key' => :'key',
63
+ :'max_versions' => :'max-versions',
64
+ :'name' => :'name',
65
+ :'new_name' => :'new-name',
66
+ :'token' => :'token',
67
+ :'uid_token' => :'uid-token',
68
+ :'url' => :'url'
69
+ }
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'api_token' => :'String',
81
+ :'delete_protection' => :'String',
82
+ :'description' => :'String',
83
+ :'json' => :'Boolean',
84
+ :'keep_prev_version' => :'String',
85
+ :'key' => :'String',
86
+ :'max_versions' => :'String',
87
+ :'name' => :'String',
88
+ :'new_name' => :'String',
89
+ :'token' => :'String',
90
+ :'uid_token' => :'String',
91
+ :'url' => :'String'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TargetUpdateOkta` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TargetUpdateOkta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'api_token')
117
+ self.api_token = attributes[:'api_token']
118
+ end
119
+
120
+ if attributes.key?(:'delete_protection')
121
+ self.delete_protection = attributes[:'delete_protection']
122
+ end
123
+
124
+ if attributes.key?(:'description')
125
+ self.description = attributes[:'description']
126
+ end
127
+
128
+ if attributes.key?(:'json')
129
+ self.json = attributes[:'json']
130
+ else
131
+ self.json = false
132
+ end
133
+
134
+ if attributes.key?(:'keep_prev_version')
135
+ self.keep_prev_version = attributes[:'keep_prev_version']
136
+ end
137
+
138
+ if attributes.key?(:'key')
139
+ self.key = attributes[:'key']
140
+ end
141
+
142
+ if attributes.key?(:'max_versions')
143
+ self.max_versions = attributes[:'max_versions']
144
+ end
145
+
146
+ if attributes.key?(:'name')
147
+ self.name = attributes[:'name']
148
+ else
149
+ self.name = nil
150
+ end
151
+
152
+ if attributes.key?(:'new_name')
153
+ self.new_name = attributes[:'new_name']
154
+ end
155
+
156
+ if attributes.key?(:'token')
157
+ self.token = attributes[:'token']
158
+ end
159
+
160
+ if attributes.key?(:'uid_token')
161
+ self.uid_token = attributes[:'uid_token']
162
+ end
163
+
164
+ if attributes.key?(:'url')
165
+ self.url = attributes[:'url']
166
+ end
167
+ end
168
+
169
+ # Show invalid properties with the reasons. Usually used together with valid?
170
+ # @return Array for valid properties with the reasons
171
+ def list_invalid_properties
172
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
173
+ invalid_properties = Array.new
174
+ if @name.nil?
175
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
176
+ end
177
+
178
+ invalid_properties
179
+ end
180
+
181
+ # Check to see if the all the properties in the model are valid
182
+ # @return true if the model is valid
183
+ def valid?
184
+ warn '[DEPRECATED] the `valid?` method is obsolete'
185
+ return false if @name.nil?
186
+ true
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ api_token == o.api_token &&
195
+ delete_protection == o.delete_protection &&
196
+ description == o.description &&
197
+ json == o.json &&
198
+ keep_prev_version == o.keep_prev_version &&
199
+ key == o.key &&
200
+ max_versions == o.max_versions &&
201
+ name == o.name &&
202
+ new_name == o.new_name &&
203
+ token == o.token &&
204
+ uid_token == o.uid_token &&
205
+ url == o.url
206
+ end
207
+
208
+ # @see the `==` method
209
+ # @param [Object] Object to be compared
210
+ def eql?(o)
211
+ self == o
212
+ end
213
+
214
+ # Calculates hash code according to all attributes.
215
+ # @return [Integer] Hash code
216
+ def hash
217
+ [api_token, delete_protection, description, json, keep_prev_version, key, max_versions, name, new_name, token, uid_token, url].hash
218
+ end
219
+
220
+ # Builds the object from hash
221
+ # @param [Hash] attributes Model attributes in the form of hash
222
+ # @return [Object] Returns the model itself
223
+ def self.build_from_hash(attributes)
224
+ return nil unless attributes.is_a?(Hash)
225
+ attributes = attributes.transform_keys(&:to_sym)
226
+ transformed_hash = {}
227
+ openapi_types.each_pair do |key, type|
228
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
229
+ transformed_hash["#{key}"] = nil
230
+ elsif type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[attribute_map[key]].is_a?(Array)
234
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
235
+ end
236
+ elsif !attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
238
+ end
239
+ end
240
+ new(transformed_hash)
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def self._deserialize(type, value)
248
+ case type.to_sym
249
+ when :Time
250
+ Time.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :Boolean
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
264
+ end
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
278
+ end
279
+ else # model
280
+ # models (e.g. Pet) or oneOf
281
+ klass = Akeyless.const_get(type)
282
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ if value.nil?
305
+ is_nullable = self.class.openapi_nullable.include?(attr)
306
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
307
+ end
308
+
309
+ hash[param] = _to_hash(value)
310
+ end
311
+ hash
312
+ end
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+
332
+ end
333
+
334
+ end
@@ -0,0 +1,214 @@
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 UidExpirationEvent
18
+ attr_accessor :percent_passed
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'percent_passed' => :'percent_passed'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'percent_passed' => :'Integer'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UidExpirationEvent` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UidExpirationEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'percent_passed')
61
+ self.percent_passed = attributes[:'percent_passed']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ percent_passed == o.percent_passed
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Integer] Hash code
96
+ def hash
97
+ [percent_passed].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def self.build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ attributes = attributes.transform_keys(&:to_sym)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
110
+ elsif type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
+ end
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
118
+ end
119
+ end
120
+ new(transformed_hash)
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def self._deserialize(type, value)
128
+ case type.to_sym
129
+ when :Time
130
+ Time.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :Boolean
140
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
141
+ true
142
+ else
143
+ false
144
+ end
145
+ when :Object
146
+ # generic object (usually a Hash), return directly
147
+ value
148
+ when /\AArray<(?<inner_type>.+)>\z/
149
+ inner_type = Regexp.last_match[:inner_type]
150
+ value.map { |v| _deserialize(inner_type, v) }
151
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
152
+ k_type = Regexp.last_match[:k_type]
153
+ v_type = Regexp.last_match[:v_type]
154
+ {}.tap do |hash|
155
+ value.each do |k, v|
156
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
+ end
158
+ end
159
+ else # model
160
+ # models (e.g. Pet) or oneOf
161
+ klass = Akeyless.const_get(type)
162
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ if value.nil?
185
+ is_nullable = self.class.openapi_nullable.include?(attr)
186
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
+ end
188
+
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -79,6 +79,9 @@ module Akeyless
79
79
  # A unique identifier (ID) value should be configured for OAuth2, LDAP and SAML authentication method types and is usually a value such as the email, username, or upn for example. Whenever a user logs in with a token, these authentication types issue a \"sub claim\" that contains details uniquely identifying that user. This sub claim includes a key containing the ID value that you configured, and is used to distinguish between different users from within the same organization.
80
80
  attr_accessor :unique_identifier
81
81
 
82
+ # Use dedicated per-access-id SP URLs for login
83
+ attr_accessor :use_dedicated_saml_urls
84
+
82
85
  # Attribute mapping from ruby-style variable name to JSON key.
83
86
  def self.attribute_map
84
87
  {
@@ -102,7 +105,8 @@ module Akeyless
102
105
  :'subclaims_delimiters' => :'subclaims-delimiters',
103
106
  :'token' => :'token',
104
107
  :'uid_token' => :'uid-token',
105
- :'unique_identifier' => :'unique-identifier'
108
+ :'unique_identifier' => :'unique-identifier',
109
+ :'use_dedicated_saml_urls' => :'use-dedicated-saml-urls'
106
110
  }
107
111
  end
108
112
 
@@ -134,7 +138,8 @@ module Akeyless
134
138
  :'subclaims_delimiters' => :'Array<String>',
135
139
  :'token' => :'String',
136
140
  :'uid_token' => :'String',
137
- :'unique_identifier' => :'String'
141
+ :'unique_identifier' => :'String',
142
+ :'use_dedicated_saml_urls' => :'Boolean'
138
143
  }
139
144
  end
140
145
 
@@ -268,6 +273,10 @@ module Akeyless
268
273
  else
269
274
  self.unique_identifier = nil
270
275
  end
276
+
277
+ if attributes.key?(:'use_dedicated_saml_urls')
278
+ self.use_dedicated_saml_urls = attributes[:'use_dedicated_saml_urls']
279
+ end
271
280
  end
272
281
 
273
282
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -320,7 +329,8 @@ module Akeyless
320
329
  subclaims_delimiters == o.subclaims_delimiters &&
321
330
  token == o.token &&
322
331
  uid_token == o.uid_token &&
323
- unique_identifier == o.unique_identifier
332
+ unique_identifier == o.unique_identifier &&
333
+ use_dedicated_saml_urls == o.use_dedicated_saml_urls
324
334
  end
325
335
 
326
336
  # @see the `==` method
@@ -332,7 +342,7 @@ module Akeyless
332
342
  # Calculates hash code according to all attributes.
333
343
  # @return [Integer] Hash code
334
344
  def hash
335
- [access_expires, allowed_client_type, allowed_redirect_uri, audit_logs_claims, bound_ips, delete_protection, description, expiration_event_in, force_sub_claims, gw_bound_ips, idp_metadata_url, idp_metadata_xml_data, json, jwt_ttl, name, new_name, product_type, subclaims_delimiters, token, uid_token, unique_identifier].hash
345
+ [access_expires, allowed_client_type, allowed_redirect_uri, audit_logs_claims, bound_ips, delete_protection, description, expiration_event_in, force_sub_claims, gw_bound_ips, idp_metadata_url, idp_metadata_xml_data, json, jwt_ttl, name, new_name, product_type, subclaims_delimiters, token, uid_token, unique_identifier, use_dedicated_saml_urls].hash
336
346
  end
337
347
 
338
348
  # Builds the object from hash
@@ -76,6 +76,9 @@ module Akeyless
76
76
  # Token ttl
77
77
  attr_accessor :ttl
78
78
 
79
+ # Notify when this percent of the token TTL has elapsed (1-99).
80
+ attr_accessor :uid_expiration_event_at
81
+
79
82
  # The universal identity token, Required only for universal_identity authentication
80
83
  attr_accessor :uid_token
81
84
 
@@ -102,6 +105,7 @@ module Akeyless
102
105
  :'token' => :'token',
103
106
  :'tree_length' => :'tree-length',
104
107
  :'ttl' => :'ttl',
108
+ :'uid_expiration_event_at' => :'uid-expiration-event-at',
105
109
  :'uid_token' => :'uid-token'
106
110
  }
107
111
  end
@@ -134,6 +138,7 @@ module Akeyless
134
138
  :'token' => :'String',
135
139
  :'tree_length' => :'Integer',
136
140
  :'ttl' => :'Integer',
141
+ :'uid_expiration_event_at' => :'Array<String>',
137
142
  :'uid_token' => :'String'
138
143
  }
139
144
  end
@@ -265,6 +270,12 @@ module Akeyless
265
270
  self.ttl = 60
266
271
  end
267
272
 
273
+ if attributes.key?(:'uid_expiration_event_at')
274
+ if (value = attributes[:'uid_expiration_event_at']).is_a?(Array)
275
+ self.uid_expiration_event_at = value
276
+ end
277
+ end
278
+
268
279
  if attributes.key?(:'uid_token')
269
280
  self.uid_token = attributes[:'uid_token']
270
281
  end
@@ -315,6 +326,7 @@ module Akeyless
315
326
  token == o.token &&
316
327
  tree_length == o.tree_length &&
317
328
  ttl == o.ttl &&
329
+ uid_expiration_event_at == o.uid_expiration_event_at &&
318
330
  uid_token == o.uid_token
319
331
  end
320
332
 
@@ -327,7 +339,7 @@ module Akeyless
327
339
  # Calculates hash code according to all attributes.
328
340
  # @return [Integer] Hash code
329
341
  def hash
330
- [access_expires, allowed_client_type, audit_logs_claims, bound_ips, child_ttl_limit, delete_protection, deny_inheritance, deny_rotate, description, expiration_event_in, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, new_name, product_type, token, tree_length, ttl, uid_token].hash
342
+ [access_expires, allowed_client_type, audit_logs_claims, bound_ips, child_ttl_limit, delete_protection, deny_inheritance, deny_rotate, description, expiration_event_in, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, new_name, product_type, token, tree_length, ttl, uid_expiration_event_at, uid_token].hash
331
343
  end
332
344
 
333
345
  # Builds the object from hash