akeyless 3.1.2 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/docs/CreateAWSTarget.md +3 -1
  4. data/docs/CreateArtifactoryTarget.md +3 -1
  5. data/docs/CreateAzureTarget.md +3 -1
  6. data/docs/CreateDBTarget.md +3 -1
  7. data/docs/CreateDockerhubTarget.md +3 -1
  8. data/docs/CreateEKSTarget.md +3 -1
  9. data/docs/CreateEventForwarder.md +3 -1
  10. data/docs/CreateGKETarget.md +3 -1
  11. data/docs/CreateGcpTarget.md +3 -1
  12. data/docs/CreateGithubTarget.md +3 -1
  13. data/docs/CreateLdapTarget.md +3 -1
  14. data/docs/CreateNativeK8STarget.md +3 -1
  15. data/docs/CreatePingTarget.md +40 -0
  16. data/docs/CreatePingTargetOutput.md +18 -0
  17. data/docs/CreateRabbitMQTarget.md +3 -1
  18. data/docs/CreateRole.md +3 -1
  19. data/docs/CreateRotatedSecret.md +2 -0
  20. data/docs/CreateSSHTarget.md +3 -1
  21. data/docs/CreateSalesforceTarget.md +3 -1
  22. data/docs/CreateWebTarget.md +3 -1
  23. data/docs/DSProducerDetails.md +40 -0
  24. data/docs/GatewayCreateProducerEks.md +1 -1
  25. data/docs/GatewayCreateProducerPing.md +66 -0
  26. data/docs/GatewayCreateProducerPingOutput.md +18 -0
  27. data/docs/GatewayUpdateProducerEks.md +1 -1
  28. data/docs/GatewayUpdateProducerPing.md +68 -0
  29. data/docs/GatewayUpdateProducerPingOutput.md +18 -0
  30. data/docs/GetKubeExecCreds.md +5 -3
  31. data/docs/GetPKICertificate.md +5 -3
  32. data/docs/ImporterInfo.md +20 -0
  33. data/docs/ItemGeneralInfo.md +2 -0
  34. data/docs/RequestAccess.md +3 -1
  35. data/docs/SecureRemoteAccess.md +2 -0
  36. data/docs/TargetTypeDetailsInput.md +10 -0
  37. data/docs/UidCreateChildToken.md +3 -1
  38. data/docs/UpdateAWSTarget.md +3 -1
  39. data/docs/UpdateArtifactoryTarget.md +3 -1
  40. data/docs/UpdateAzureTarget.md +3 -1
  41. data/docs/UpdateDBTarget.md +3 -1
  42. data/docs/UpdateDockerhubTarget.md +3 -1
  43. data/docs/UpdateEKSTarget.md +3 -1
  44. data/docs/UpdateEventForwarder.md +3 -1
  45. data/docs/UpdateGKETarget.md +3 -1
  46. data/docs/UpdateGcpTarget.md +3 -1
  47. data/docs/UpdateGithubTarget.md +3 -1
  48. data/docs/UpdateLdapTarget.md +3 -1
  49. data/docs/UpdateNativeK8STarget.md +3 -1
  50. data/docs/UpdatePingTarget.md +46 -0
  51. data/docs/UpdateRabbitMQTarget.md +3 -1
  52. data/docs/UpdateRole.md +3 -1
  53. data/docs/UpdateRotatedSecret.md +2 -0
  54. data/docs/UpdateSSHTarget.md +3 -1
  55. data/docs/UpdateSalesforceTarget.md +3 -1
  56. data/docs/UpdateTarget.md +3 -1
  57. data/docs/UpdateWebTarget.md +3 -1
  58. data/docs/V2Api.md +252 -0
  59. data/lib/akeyless/api/v2_api.rb +256 -0
  60. data/lib/akeyless/models/create_artifactory_target.rb +12 -2
  61. data/lib/akeyless/models/create_aws_target.rb +12 -2
  62. data/lib/akeyless/models/create_azure_target.rb +12 -2
  63. data/lib/akeyless/models/create_db_target.rb +12 -2
  64. data/lib/akeyless/models/create_dockerhub_target.rb +12 -2
  65. data/lib/akeyless/models/create_eks_target.rb +12 -2
  66. data/lib/akeyless/models/create_event_forwarder.rb +12 -2
  67. data/lib/akeyless/models/create_gcp_target.rb +12 -2
  68. data/lib/akeyless/models/create_github_target.rb +12 -2
  69. data/lib/akeyless/models/create_gke_target.rb +12 -2
  70. data/lib/akeyless/models/create_ldap_target.rb +12 -2
  71. data/lib/akeyless/models/create_native_k8_s_target.rb +12 -2
  72. data/lib/akeyless/models/create_ping_target.rb +339 -0
  73. data/lib/akeyless/models/create_ping_target_output.rb +219 -0
  74. data/lib/akeyless/models/create_rabbit_mq_target.rb +12 -2
  75. data/lib/akeyless/models/create_role.rb +12 -2
  76. data/lib/akeyless/models/create_rotated_secret.rb +13 -1
  77. data/lib/akeyless/models/create_salesforce_target.rb +12 -2
  78. data/lib/akeyless/models/create_ssh_target.rb +12 -2
  79. data/lib/akeyless/models/create_web_target.rb +12 -2
  80. data/lib/akeyless/models/ds_producer_details.rb +196 -1
  81. data/lib/akeyless/models/gateway_create_producer_eks.rb +1 -1
  82. data/lib/akeyless/models/gateway_create_producer_ping.rb +482 -0
  83. data/lib/akeyless/models/gateway_create_producer_ping_output.rb +219 -0
  84. data/lib/akeyless/models/gateway_update_producer_eks.rb +1 -1
  85. data/lib/akeyless/models/gateway_update_producer_ping.rb +492 -0
  86. data/lib/akeyless/models/gateway_update_producer_ping_output.rb +219 -0
  87. data/lib/akeyless/models/get_kube_exec_creds.rb +14 -4
  88. data/lib/akeyless/models/get_pki_certificate.rb +14 -4
  89. data/lib/akeyless/models/importer_info.rb +228 -0
  90. data/lib/akeyless/models/item_general_info.rb +10 -1
  91. data/lib/akeyless/models/request_access.rb +12 -2
  92. data/lib/akeyless/models/secure_remote_access.rb +10 -1
  93. data/lib/akeyless/models/target_type_details_input.rb +46 -1
  94. data/lib/akeyless/models/uid_create_child_token.rb +12 -2
  95. data/lib/akeyless/models/update_artifactory_target.rb +12 -2
  96. data/lib/akeyless/models/update_aws_target.rb +12 -2
  97. data/lib/akeyless/models/update_azure_target.rb +12 -2
  98. data/lib/akeyless/models/update_db_target.rb +12 -2
  99. data/lib/akeyless/models/update_dockerhub_target.rb +12 -2
  100. data/lib/akeyless/models/update_eks_target.rb +12 -2
  101. data/lib/akeyless/models/update_event_forwarder.rb +14 -2
  102. data/lib/akeyless/models/update_gcp_target.rb +12 -2
  103. data/lib/akeyless/models/update_github_target.rb +12 -2
  104. data/lib/akeyless/models/update_gke_target.rb +12 -2
  105. data/lib/akeyless/models/update_ldap_target.rb +12 -2
  106. data/lib/akeyless/models/update_native_k8_s_target.rb +12 -2
  107. data/lib/akeyless/models/update_ping_target.rb +368 -0
  108. data/lib/akeyless/models/update_rabbit_mq_target.rb +12 -2
  109. data/lib/akeyless/models/update_role.rb +14 -2
  110. data/lib/akeyless/models/update_rotated_secret.rb +13 -1
  111. data/lib/akeyless/models/update_salesforce_target.rb +12 -2
  112. data/lib/akeyless/models/update_ssh_target.rb +12 -2
  113. data/lib/akeyless/models/update_target.rb +14 -2
  114. data/lib/akeyless/models/update_web_target.rb +12 -2
  115. data/lib/akeyless/version.rb +1 -1
  116. data/lib/akeyless.rb +8 -0
  117. data/spec/models/create_ping_target_output_spec.rb +34 -0
  118. data/spec/models/create_ping_target_spec.rb +94 -0
  119. data/spec/models/gateway_create_producer_ping_output_spec.rb +34 -0
  120. data/spec/models/gateway_create_producer_ping_spec.rb +178 -0
  121. data/spec/models/gateway_update_producer_ping_output_spec.rb +34 -0
  122. data/spec/models/gateway_update_producer_ping_spec.rb +184 -0
  123. data/spec/models/importer_info_spec.rb +40 -0
  124. data/spec/models/update_ping_target_spec.rb +112 -0
  125. metadata +594 -562
@@ -250,7 +250,7 @@ module Akeyless
250
250
  if attributes.key?(:'user_ttl')
251
251
  self.user_ttl = attributes[:'user_ttl']
252
252
  else
253
- self.user_ttl = '60m'
253
+ self.user_ttl = '15m'
254
254
  end
255
255
  end
256
256
 
@@ -0,0 +1,492 @@
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: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # gatewayUpdateProducerPing is a command that updates Ping producer
18
+ class GatewayUpdateProducerPing
19
+ # Protection from accidental deletion of this item
20
+ attr_accessor :delete_protection
21
+
22
+ # Set output format to JSON
23
+ attr_accessor :json
24
+
25
+ # Producer name
26
+ attr_accessor :name
27
+
28
+ # Producer New name
29
+ attr_accessor :new_name
30
+
31
+ # Ping Federate administrative port
32
+ attr_accessor :ping_administrative_port
33
+
34
+ # Set a specific Access Token Management (ATM) instance for the created OAuth Client by providing the ATM Id. If no explicit value is given, the default pingfederate server ATM will be set.
35
+ attr_accessor :ping_atm_id
36
+
37
+ # Ping Federate authorization port
38
+ attr_accessor :ping_authorization_port
39
+
40
+ # The subject DN of the client certificate. If no explicit value is given, the producer will create CA certificate and matched client certificate and return it as value. Used in conjunction with ping-issuer-dn (relevant for CLIENT_TLS_CERTIFICATE authentication method)
41
+ attr_accessor :ping_cert_subject_dn
42
+
43
+ # OAuth Client Authentication Type [CLIENT_SECRET, PRIVATE_KEY_JWT, CLIENT_TLS_CERTIFICATE]
44
+ attr_accessor :ping_client_authentication_type
45
+
46
+ # Determines whether PingFederate requires a unique signed JWT from the client for each action (relevant for PRIVATE_KEY_JWT authentication method)
47
+ attr_accessor :ping_enforce_replay_prevention
48
+
49
+ # List of OAuth client grant types [IMPLICIT, AUTHORIZATION_CODE, CLIENT_CREDENTIALS, TOKEN_EXCHANGE, REFRESH_TOKEN, ASSERTION_GRANTS, PASSWORD, RESOURCE_OWNER_CREDENTIALS]. If no explicit value is given, AUTHORIZATION_CODE will be selected as default.
50
+ attr_accessor :ping_grant_types
51
+
52
+ # Issuer DN of trusted CA certificate that imported into Ping Federate server. You may select \\\"Trust Any\\\" to trust all the existing issuers in Ping Federate server. Used in conjunction with ping-cert-subject-dn (relevant for CLIENT_TLS_CERTIFICATE authentication method)
53
+ attr_accessor :ping_issuer_dn
54
+
55
+ # Base64-encoded JSON Web Key Set (JWKS). If no explicit value is given, the producer will create JWKs and matched signed JWT (Sign Algo: RS256) and return it as value (relevant for PRIVATE_KEY_JWT authentication method)
56
+ attr_accessor :ping_jwks
57
+
58
+ # The URL of the JSON Web Key Set (JWKS). If no explicit value is given, the producer will create JWKs and matched signed JWT and return it as value (relevant for PRIVATE_KEY_JWT authentication method)
59
+ attr_accessor :ping_jwks_url
60
+
61
+ # Ping Federate privileged user password
62
+ attr_accessor :ping_password
63
+
64
+ # Ping Federate privileged user
65
+ attr_accessor :ping_privileged_user
66
+
67
+ # List of URIs to which the OAuth authorization server may redirect the resource owner's user agent after authorization is obtained. At least one redirection URI is required for the AUTHORIZATION_CODE and IMPLICIT grant types.
68
+ attr_accessor :ping_redirect_uris
69
+
70
+ # Limit the OAuth client to specific scopes list
71
+ attr_accessor :ping_restricted_scopes
72
+
73
+ # The signing algorithm that the client must use to sign its request objects [RS256,RS384,RS512,ES256,ES384,ES512,PS256,PS384,PS512] If no explicit value is given, the client can use any of the supported signing algorithms (relevant for PRIVATE_KEY_JWT authentication method)
74
+ attr_accessor :ping_signing_algo
75
+
76
+ # Ping URL
77
+ attr_accessor :ping_url
78
+
79
+ # Dynamic producer encryption key
80
+ attr_accessor :producer_encryption_key_name
81
+
82
+ # List of the tags attached to this secret
83
+ attr_accessor :tags
84
+
85
+ # Target name
86
+ attr_accessor :target_name
87
+
88
+ # Authentication token (see `/auth` and `/configure`)
89
+ attr_accessor :token
90
+
91
+ # The universal identity token, Required only for universal_identity authentication
92
+ attr_accessor :uid_token
93
+
94
+ # The time from dynamic secret creation to expiration.
95
+ attr_accessor :user_ttl
96
+
97
+ # Attribute mapping from ruby-style variable name to JSON key.
98
+ def self.attribute_map
99
+ {
100
+ :'delete_protection' => :'delete_protection',
101
+ :'json' => :'json',
102
+ :'name' => :'name',
103
+ :'new_name' => :'new-name',
104
+ :'ping_administrative_port' => :'ping-administrative-port',
105
+ :'ping_atm_id' => :'ping-atm-id',
106
+ :'ping_authorization_port' => :'ping-authorization-port',
107
+ :'ping_cert_subject_dn' => :'ping-cert-subject-dn',
108
+ :'ping_client_authentication_type' => :'ping-client-authentication-type',
109
+ :'ping_enforce_replay_prevention' => :'ping-enforce-replay-prevention',
110
+ :'ping_grant_types' => :'ping-grant-types',
111
+ :'ping_issuer_dn' => :'ping-issuer-dn',
112
+ :'ping_jwks' => :'ping-jwks',
113
+ :'ping_jwks_url' => :'ping-jwks-url',
114
+ :'ping_password' => :'ping-password',
115
+ :'ping_privileged_user' => :'ping-privileged-user',
116
+ :'ping_redirect_uris' => :'ping-redirect-uris',
117
+ :'ping_restricted_scopes' => :'ping-restricted-scopes',
118
+ :'ping_signing_algo' => :'ping-signing-algo',
119
+ :'ping_url' => :'ping-url',
120
+ :'producer_encryption_key_name' => :'producer-encryption-key-name',
121
+ :'tags' => :'tags',
122
+ :'target_name' => :'target-name',
123
+ :'token' => :'token',
124
+ :'uid_token' => :'uid-token',
125
+ :'user_ttl' => :'user-ttl'
126
+ }
127
+ end
128
+
129
+ # Returns all the JSON keys this model knows about
130
+ def self.acceptable_attributes
131
+ attribute_map.values
132
+ end
133
+
134
+ # Attribute type mapping.
135
+ def self.openapi_types
136
+ {
137
+ :'delete_protection' => :'String',
138
+ :'json' => :'Boolean',
139
+ :'name' => :'String',
140
+ :'new_name' => :'String',
141
+ :'ping_administrative_port' => :'String',
142
+ :'ping_atm_id' => :'String',
143
+ :'ping_authorization_port' => :'String',
144
+ :'ping_cert_subject_dn' => :'String',
145
+ :'ping_client_authentication_type' => :'String',
146
+ :'ping_enforce_replay_prevention' => :'String',
147
+ :'ping_grant_types' => :'Array<String>',
148
+ :'ping_issuer_dn' => :'String',
149
+ :'ping_jwks' => :'String',
150
+ :'ping_jwks_url' => :'String',
151
+ :'ping_password' => :'String',
152
+ :'ping_privileged_user' => :'String',
153
+ :'ping_redirect_uris' => :'Array<String>',
154
+ :'ping_restricted_scopes' => :'Array<String>',
155
+ :'ping_signing_algo' => :'String',
156
+ :'ping_url' => :'String',
157
+ :'producer_encryption_key_name' => :'String',
158
+ :'tags' => :'Array<String>',
159
+ :'target_name' => :'String',
160
+ :'token' => :'String',
161
+ :'uid_token' => :'String',
162
+ :'user_ttl' => :'String'
163
+ }
164
+ end
165
+
166
+ # List of attributes with nullable: true
167
+ def self.openapi_nullable
168
+ Set.new([
169
+ ])
170
+ end
171
+
172
+ # Initializes the object
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ def initialize(attributes = {})
175
+ if (!attributes.is_a?(Hash))
176
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayUpdateProducerPing` initialize method"
177
+ end
178
+
179
+ # check to see if the attribute exists and convert string to symbol for hash key
180
+ attributes = attributes.each_with_object({}) { |(k, v), h|
181
+ if (!self.class.attribute_map.key?(k.to_sym))
182
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayUpdateProducerPing`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
183
+ end
184
+ h[k.to_sym] = v
185
+ }
186
+
187
+ if attributes.key?(:'delete_protection')
188
+ self.delete_protection = attributes[:'delete_protection']
189
+ end
190
+
191
+ if attributes.key?(:'json')
192
+ self.json = attributes[:'json']
193
+ end
194
+
195
+ if attributes.key?(:'name')
196
+ self.name = attributes[:'name']
197
+ end
198
+
199
+ if attributes.key?(:'new_name')
200
+ self.new_name = attributes[:'new_name']
201
+ end
202
+
203
+ if attributes.key?(:'ping_administrative_port')
204
+ self.ping_administrative_port = attributes[:'ping_administrative_port']
205
+ else
206
+ self.ping_administrative_port = '9999'
207
+ end
208
+
209
+ if attributes.key?(:'ping_atm_id')
210
+ self.ping_atm_id = attributes[:'ping_atm_id']
211
+ end
212
+
213
+ if attributes.key?(:'ping_authorization_port')
214
+ self.ping_authorization_port = attributes[:'ping_authorization_port']
215
+ else
216
+ self.ping_authorization_port = '9031'
217
+ end
218
+
219
+ if attributes.key?(:'ping_cert_subject_dn')
220
+ self.ping_cert_subject_dn = attributes[:'ping_cert_subject_dn']
221
+ end
222
+
223
+ if attributes.key?(:'ping_client_authentication_type')
224
+ self.ping_client_authentication_type = attributes[:'ping_client_authentication_type']
225
+ else
226
+ self.ping_client_authentication_type = 'CLIENT_SECRET'
227
+ end
228
+
229
+ if attributes.key?(:'ping_enforce_replay_prevention')
230
+ self.ping_enforce_replay_prevention = attributes[:'ping_enforce_replay_prevention']
231
+ end
232
+
233
+ if attributes.key?(:'ping_grant_types')
234
+ if (value = attributes[:'ping_grant_types']).is_a?(Array)
235
+ self.ping_grant_types = value
236
+ end
237
+ end
238
+
239
+ if attributes.key?(:'ping_issuer_dn')
240
+ self.ping_issuer_dn = attributes[:'ping_issuer_dn']
241
+ end
242
+
243
+ if attributes.key?(:'ping_jwks')
244
+ self.ping_jwks = attributes[:'ping_jwks']
245
+ end
246
+
247
+ if attributes.key?(:'ping_jwks_url')
248
+ self.ping_jwks_url = attributes[:'ping_jwks_url']
249
+ end
250
+
251
+ if attributes.key?(:'ping_password')
252
+ self.ping_password = attributes[:'ping_password']
253
+ end
254
+
255
+ if attributes.key?(:'ping_privileged_user')
256
+ self.ping_privileged_user = attributes[:'ping_privileged_user']
257
+ end
258
+
259
+ if attributes.key?(:'ping_redirect_uris')
260
+ if (value = attributes[:'ping_redirect_uris']).is_a?(Array)
261
+ self.ping_redirect_uris = value
262
+ end
263
+ end
264
+
265
+ if attributes.key?(:'ping_restricted_scopes')
266
+ if (value = attributes[:'ping_restricted_scopes']).is_a?(Array)
267
+ self.ping_restricted_scopes = value
268
+ end
269
+ end
270
+
271
+ if attributes.key?(:'ping_signing_algo')
272
+ self.ping_signing_algo = attributes[:'ping_signing_algo']
273
+ end
274
+
275
+ if attributes.key?(:'ping_url')
276
+ self.ping_url = attributes[:'ping_url']
277
+ end
278
+
279
+ if attributes.key?(:'producer_encryption_key_name')
280
+ self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
281
+ end
282
+
283
+ if attributes.key?(:'tags')
284
+ if (value = attributes[:'tags']).is_a?(Array)
285
+ self.tags = value
286
+ end
287
+ end
288
+
289
+ if attributes.key?(:'target_name')
290
+ self.target_name = attributes[:'target_name']
291
+ end
292
+
293
+ if attributes.key?(:'token')
294
+ self.token = attributes[:'token']
295
+ end
296
+
297
+ if attributes.key?(:'uid_token')
298
+ self.uid_token = attributes[:'uid_token']
299
+ end
300
+
301
+ if attributes.key?(:'user_ttl')
302
+ self.user_ttl = attributes[:'user_ttl']
303
+ else
304
+ self.user_ttl = '60m'
305
+ end
306
+ end
307
+
308
+ # Show invalid properties with the reasons. Usually used together with valid?
309
+ # @return Array for valid properties with the reasons
310
+ def list_invalid_properties
311
+ invalid_properties = Array.new
312
+ if @name.nil?
313
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
314
+ end
315
+
316
+ invalid_properties
317
+ end
318
+
319
+ # Check to see if the all the properties in the model are valid
320
+ # @return true if the model is valid
321
+ def valid?
322
+ return false if @name.nil?
323
+ true
324
+ end
325
+
326
+ # Checks equality by comparing each attribute.
327
+ # @param [Object] Object to be compared
328
+ def ==(o)
329
+ return true if self.equal?(o)
330
+ self.class == o.class &&
331
+ delete_protection == o.delete_protection &&
332
+ json == o.json &&
333
+ name == o.name &&
334
+ new_name == o.new_name &&
335
+ ping_administrative_port == o.ping_administrative_port &&
336
+ ping_atm_id == o.ping_atm_id &&
337
+ ping_authorization_port == o.ping_authorization_port &&
338
+ ping_cert_subject_dn == o.ping_cert_subject_dn &&
339
+ ping_client_authentication_type == o.ping_client_authentication_type &&
340
+ ping_enforce_replay_prevention == o.ping_enforce_replay_prevention &&
341
+ ping_grant_types == o.ping_grant_types &&
342
+ ping_issuer_dn == o.ping_issuer_dn &&
343
+ ping_jwks == o.ping_jwks &&
344
+ ping_jwks_url == o.ping_jwks_url &&
345
+ ping_password == o.ping_password &&
346
+ ping_privileged_user == o.ping_privileged_user &&
347
+ ping_redirect_uris == o.ping_redirect_uris &&
348
+ ping_restricted_scopes == o.ping_restricted_scopes &&
349
+ ping_signing_algo == o.ping_signing_algo &&
350
+ ping_url == o.ping_url &&
351
+ producer_encryption_key_name == o.producer_encryption_key_name &&
352
+ tags == o.tags &&
353
+ target_name == o.target_name &&
354
+ token == o.token &&
355
+ uid_token == o.uid_token &&
356
+ user_ttl == o.user_ttl
357
+ end
358
+
359
+ # @see the `==` method
360
+ # @param [Object] Object to be compared
361
+ def eql?(o)
362
+ self == o
363
+ end
364
+
365
+ # Calculates hash code according to all attributes.
366
+ # @return [Integer] Hash code
367
+ def hash
368
+ [delete_protection, json, name, new_name, ping_administrative_port, ping_atm_id, ping_authorization_port, ping_cert_subject_dn, ping_client_authentication_type, ping_enforce_replay_prevention, ping_grant_types, ping_issuer_dn, ping_jwks, ping_jwks_url, ping_password, ping_privileged_user, ping_redirect_uris, ping_restricted_scopes, ping_signing_algo, ping_url, producer_encryption_key_name, tags, target_name, token, uid_token, user_ttl].hash
369
+ end
370
+
371
+ # Builds the object from hash
372
+ # @param [Hash] attributes Model attributes in the form of hash
373
+ # @return [Object] Returns the model itself
374
+ def self.build_from_hash(attributes)
375
+ new.build_from_hash(attributes)
376
+ end
377
+
378
+ # Builds the object from hash
379
+ # @param [Hash] attributes Model attributes in the form of hash
380
+ # @return [Object] Returns the model itself
381
+ def build_from_hash(attributes)
382
+ return nil unless attributes.is_a?(Hash)
383
+ attributes = attributes.transform_keys(&:to_sym)
384
+ self.class.openapi_types.each_pair do |key, type|
385
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
386
+ self.send("#{key}=", nil)
387
+ elsif type =~ /\AArray<(.*)>/i
388
+ # check to ensure the input is an array given that the attribute
389
+ # is documented as an array but the input is not
390
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
391
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
392
+ end
393
+ elsif !attributes[self.class.attribute_map[key]].nil?
394
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
395
+ end
396
+ end
397
+
398
+ self
399
+ end
400
+
401
+ # Deserializes the data based on type
402
+ # @param string type Data type
403
+ # @param string value Value to be deserialized
404
+ # @return [Object] Deserialized data
405
+ def _deserialize(type, value)
406
+ case type.to_sym
407
+ when :Time
408
+ Time.parse(value)
409
+ when :Date
410
+ Date.parse(value)
411
+ when :String
412
+ value.to_s
413
+ when :Integer
414
+ value.to_i
415
+ when :Float
416
+ value.to_f
417
+ when :Boolean
418
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
419
+ true
420
+ else
421
+ false
422
+ end
423
+ when :Object
424
+ # generic object (usually a Hash), return directly
425
+ value
426
+ when /\AArray<(?<inner_type>.+)>\z/
427
+ inner_type = Regexp.last_match[:inner_type]
428
+ value.map { |v| _deserialize(inner_type, v) }
429
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
430
+ k_type = Regexp.last_match[:k_type]
431
+ v_type = Regexp.last_match[:v_type]
432
+ {}.tap do |hash|
433
+ value.each do |k, v|
434
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
435
+ end
436
+ end
437
+ else # model
438
+ # models (e.g. Pet) or oneOf
439
+ klass = Akeyless.const_get(type)
440
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
441
+ end
442
+ end
443
+
444
+ # Returns the string representation of the object
445
+ # @return [String] String presentation of the object
446
+ def to_s
447
+ to_hash.to_s
448
+ end
449
+
450
+ # to_body is an alias to to_hash (backward compatibility)
451
+ # @return [Hash] Returns the object in the form of hash
452
+ def to_body
453
+ to_hash
454
+ end
455
+
456
+ # Returns the object in the form of hash
457
+ # @return [Hash] Returns the object in the form of hash
458
+ def to_hash
459
+ hash = {}
460
+ self.class.attribute_map.each_pair do |attr, param|
461
+ value = self.send(attr)
462
+ if value.nil?
463
+ is_nullable = self.class.openapi_nullable.include?(attr)
464
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
465
+ end
466
+
467
+ hash[param] = _to_hash(value)
468
+ end
469
+ hash
470
+ end
471
+
472
+ # Outputs non-array value in the form of hash
473
+ # For object, use to_hash. Otherwise, just return the value
474
+ # @param [Object] value Any valid value
475
+ # @return [Hash] Returns the value in the form of hash
476
+ def _to_hash(value)
477
+ if value.is_a?(Array)
478
+ value.compact.map { |v| _to_hash(v) }
479
+ elsif value.is_a?(Hash)
480
+ {}.tap do |hash|
481
+ value.each { |k, v| hash[k] = _to_hash(v) }
482
+ end
483
+ elsif value.respond_to? :to_hash
484
+ value.to_hash
485
+ else
486
+ value
487
+ end
488
+ end
489
+
490
+ end
491
+
492
+ end