akeyless 5.0.38 → 5.0.39

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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -2
  3. data/docs/AssocTargetItem.md +5 -1
  4. data/docs/ClientEvent.md +26 -0
  5. data/docs/ClientEventOutput.md +18 -0
  6. data/docs/Connect.md +2 -0
  7. data/docs/CreateEventForwarder.md +1 -1
  8. data/docs/CreateLdapTarget.md +3 -1
  9. data/docs/CreatePKICertIssuer.md +6 -0
  10. data/docs/DSProducerDetails.md +2 -0
  11. data/docs/DigiCertTargetDetails.md +8 -0
  12. data/docs/EventForwarderCreateEmail.md +1 -1
  13. data/docs/EventForwarderCreateServiceNow.md +1 -1
  14. data/docs/EventForwarderCreateSlack.md +1 -1
  15. data/docs/EventForwarderCreateTeams.md +1 -1
  16. data/docs/EventForwarderCreateWebhook.md +1 -1
  17. data/docs/EventForwarderUpdateEmail.md +1 -1
  18. data/docs/EventForwarderUpdateServiceNow.md +1 -1
  19. data/docs/EventForwarderUpdateSlack.md +1 -1
  20. data/docs/EventForwarderUpdateTeams.md +1 -1
  21. data/docs/EventForwarderUpdateWebhook.md +1 -1
  22. data/docs/GatewayCreateAllowedAccess.md +1 -1
  23. data/docs/GatewayUpdateAllowedAccess.md +1 -1
  24. data/docs/GenerateIntermediateCA.md +48 -0
  25. data/docs/GenerateIntermediateCAOutput.md +26 -0
  26. data/docs/GoogleTrustTargetDetails.md +8 -0
  27. data/docs/InjectorCertificateEvent.md +28 -0
  28. data/docs/Item.md +2 -0
  29. data/docs/LdapTargetDetails.md +3 -1
  30. data/docs/LetsEncryptTargetDetails.md +8 -0
  31. data/docs/ListSRASessions.md +2 -0
  32. data/docs/ListSraSessionsOutput.md +3 -3
  33. data/docs/LockItem.md +1 -1
  34. data/docs/MigrationGeneral.md +6 -0
  35. data/docs/PKICertificateIssueDetails.md +4 -0
  36. data/docs/RequestAccess.md +2 -0
  37. data/docs/RotatedSecretCreateOkta.md +82 -0
  38. data/docs/RotatedSecretUpdateOkta.md +84 -0
  39. data/docs/Target.md +2 -0
  40. data/docs/TargetCreateDigiCert.md +8 -0
  41. data/docs/TargetCreateGoogleTrust.md +8 -0
  42. data/docs/TargetCreateLdap.md +3 -1
  43. data/docs/TargetCreateLetsEncrypt.md +8 -0
  44. data/docs/TargetUpdateDigiCert.md +8 -0
  45. data/docs/TargetUpdateGoogleTrust.md +8 -0
  46. data/docs/TargetUpdateLdap.md +3 -1
  47. data/docs/TargetUpdateLetsEncrypt.md +8 -0
  48. data/docs/UpdateLdapTarget.md +3 -1
  49. data/docs/UpdatePKICertIssuer.md +6 -0
  50. data/docs/V2Api.md +257 -3
  51. data/lib/akeyless/api/v2_api.rb +260 -0
  52. data/lib/akeyless/models/assoc_target_item.rb +24 -2
  53. data/lib/akeyless/models/client_event.rb +256 -0
  54. data/lib/akeyless/models/client_event_output.rb +214 -0
  55. data/lib/akeyless/models/connect.rb +11 -1
  56. data/lib/akeyless/models/create_event_forwarder.rb +1 -1
  57. data/lib/akeyless/models/create_ldap_target.rb +14 -4
  58. data/lib/akeyless/models/create_pki_cert_issuer.rb +31 -1
  59. data/lib/akeyless/models/digi_cert_target_details.rb +43 -1
  60. data/lib/akeyless/models/ds_producer_details.rb +10 -1
  61. data/lib/akeyless/models/event_forwarder_create_email.rb +1 -1
  62. data/lib/akeyless/models/event_forwarder_create_service_now.rb +1 -1
  63. data/lib/akeyless/models/event_forwarder_create_slack.rb +1 -1
  64. data/lib/akeyless/models/event_forwarder_create_teams.rb +1 -1
  65. data/lib/akeyless/models/event_forwarder_create_webhook.rb +1 -1
  66. data/lib/akeyless/models/event_forwarder_update_email.rb +1 -1
  67. data/lib/akeyless/models/event_forwarder_update_service_now.rb +1 -1
  68. data/lib/akeyless/models/event_forwarder_update_slack.rb +1 -1
  69. data/lib/akeyless/models/event_forwarder_update_teams.rb +1 -1
  70. data/lib/akeyless/models/event_forwarder_update_webhook.rb +1 -1
  71. data/lib/akeyless/models/gateway_create_allowed_access.rb +1 -1
  72. data/lib/akeyless/models/gateway_update_allowed_access.rb +1 -1
  73. data/lib/akeyless/models/generate_intermediate_ca.rb +379 -0
  74. data/lib/akeyless/models/generate_intermediate_ca_output.rb +250 -0
  75. data/lib/akeyless/models/google_trust_target_details.rb +43 -1
  76. data/lib/akeyless/models/injector_certificate_event.rb +259 -0
  77. data/lib/akeyless/models/item.rb +10 -1
  78. data/lib/akeyless/models/ldap_target_details.rb +13 -4
  79. data/lib/akeyless/models/lets_encrypt_target_details.rb +43 -1
  80. data/lib/akeyless/models/list_sra_sessions.rb +12 -2
  81. data/lib/akeyless/models/list_sra_sessions_output.rb +3 -0
  82. data/lib/akeyless/models/lock_item.rb +1 -1
  83. data/lib/akeyless/models/migration_general.rb +28 -1
  84. data/lib/akeyless/models/pki_certificate_issue_details.rb +21 -1
  85. data/lib/akeyless/models/request_access.rb +11 -1
  86. data/lib/akeyless/models/rotated_secret_create_okta.rb +556 -0
  87. data/lib/akeyless/models/rotated_secret_update_okta.rb +563 -0
  88. data/lib/akeyless/models/target.rb +10 -1
  89. data/lib/akeyless/models/target_create_digi_cert.rb +43 -1
  90. data/lib/akeyless/models/target_create_google_trust.rb +43 -1
  91. data/lib/akeyless/models/target_create_ldap.rb +14 -4
  92. data/lib/akeyless/models/target_create_lets_encrypt.rb +43 -1
  93. data/lib/akeyless/models/target_update_digi_cert.rb +43 -1
  94. data/lib/akeyless/models/target_update_google_trust.rb +43 -1
  95. data/lib/akeyless/models/target_update_ldap.rb +14 -4
  96. data/lib/akeyless/models/target_update_lets_encrypt.rb +43 -1
  97. data/lib/akeyless/models/update_ldap_target.rb +14 -4
  98. data/lib/akeyless/models/update_pki_cert_issuer.rb +31 -1
  99. data/lib/akeyless/version.rb +1 -1
  100. data/lib/akeyless.rb +7 -0
  101. data/spec/models/client_event_output_spec.rb +36 -0
  102. data/spec/models/client_event_spec.rb +60 -0
  103. data/spec/models/generate_intermediate_ca_output_spec.rb +60 -0
  104. data/spec/models/generate_intermediate_ca_spec.rb +126 -0
  105. data/spec/models/injector_certificate_event_spec.rb +66 -0
  106. data/spec/models/rotated_secret_create_okta_spec.rb +228 -0
  107. data/spec/models/rotated_secret_update_okta_spec.rb +234 -0
  108. metadata +30 -2
@@ -16,9 +16,12 @@ require 'time'
16
16
  module Akeyless
17
17
  # assocTargetItem is a command that creates an association between target and item.
18
18
  class AssocTargetItem
19
- # Bind the provisioned certificate to an existing client-ssl/server-ssl profile, in the format <type>:<partition>:<name> (relevant only for F5 BIG-IP certificate provisioning). Leave the partition empty to use the certificate's partition. Repeat the parameter to bind several profiles.
19
+ # Bind the provisioned certificate to an existing client-ssl/server-ssl profile, in the format <type>:<partition>:<name> (relevant only for F5 BIG-IP certificate provisioning). Leave the partition empty to use the certificate's partition. For a profile in a folder, add the folder to the partition, for example client-ssl:Common/Shared:my-profile. Repeat the parameter to bind several profiles.
20
20
  attr_accessor :bind_ssl_profiles
21
21
 
22
+ # The format the certificate will be provisioned with, available options: pem,pfx (relevant only for certificate provisioning)
23
+ attr_accessor :certificate_format
24
+
22
25
  # A path on the target to store the certificate pem file (relevant only for certificate provisioning)
23
26
  attr_accessor :certificate_path
24
27
 
@@ -52,6 +55,9 @@ module Akeyless
52
55
  # The item to associate
53
56
  attr_accessor :name
54
57
 
58
+ # Password used to protect the provisioned PFX file. Required when --certificate-format=pfx (relevant only for certificate provisioning)
59
+ attr_accessor :pfx_password
60
+
55
61
  # A custom command to run on the remote target after successful provisioning (relevant only for SSH and Windows certificate provisioning, not supported for F5 BIG-IP)
56
62
  attr_accessor :post_provision_command
57
63
 
@@ -92,6 +98,7 @@ module Akeyless
92
98
  def self.attribute_map
93
99
  {
94
100
  :'bind_ssl_profiles' => :'bind-ssl-profiles',
101
+ :'certificate_format' => :'certificate-format',
95
102
  :'certificate_path' => :'certificate-path',
96
103
  :'chain_path' => :'chain-path',
97
104
  :'disable_previous_key_version' => :'disable-previous-key-version',
@@ -103,6 +110,7 @@ module Akeyless
103
110
  :'location_id' => :'location-id',
104
111
  :'multi_region' => :'multi-region',
105
112
  :'name' => :'name',
113
+ :'pfx_password' => :'pfx-password',
106
114
  :'post_provision_command' => :'post-provision-command',
107
115
  :'private_key_path' => :'private-key-path',
108
116
  :'project_id' => :'project-id',
@@ -127,6 +135,7 @@ module Akeyless
127
135
  def self.openapi_types
128
136
  {
129
137
  :'bind_ssl_profiles' => :'Array<String>',
138
+ :'certificate_format' => :'String',
130
139
  :'certificate_path' => :'String',
131
140
  :'chain_path' => :'String',
132
141
  :'disable_previous_key_version' => :'Boolean',
@@ -138,6 +147,7 @@ module Akeyless
138
147
  :'location_id' => :'String',
139
148
  :'multi_region' => :'String',
140
149
  :'name' => :'String',
150
+ :'pfx_password' => :'String',
141
151
  :'post_provision_command' => :'String',
142
152
  :'private_key_path' => :'String',
143
153
  :'project_id' => :'String',
@@ -180,6 +190,12 @@ module Akeyless
180
190
  end
181
191
  end
182
192
 
193
+ if attributes.key?(:'certificate_format')
194
+ self.certificate_format = attributes[:'certificate_format']
195
+ else
196
+ self.certificate_format = 'pem'
197
+ end
198
+
183
199
  if attributes.key?(:'certificate_path')
184
200
  self.certificate_path = attributes[:'certificate_path']
185
201
  end
@@ -234,6 +250,10 @@ module Akeyless
234
250
  self.name = nil
235
251
  end
236
252
 
253
+ if attributes.key?(:'pfx_password')
254
+ self.pfx_password = attributes[:'pfx_password']
255
+ end
256
+
237
257
  if attributes.key?(:'post_provision_command')
238
258
  self.post_provision_command = attributes[:'post_provision_command']
239
259
  end
@@ -322,6 +342,7 @@ module Akeyless
322
342
  return true if self.equal?(o)
323
343
  self.class == o.class &&
324
344
  bind_ssl_profiles == o.bind_ssl_profiles &&
345
+ certificate_format == o.certificate_format &&
325
346
  certificate_path == o.certificate_path &&
326
347
  chain_path == o.chain_path &&
327
348
  disable_previous_key_version == o.disable_previous_key_version &&
@@ -333,6 +354,7 @@ module Akeyless
333
354
  location_id == o.location_id &&
334
355
  multi_region == o.multi_region &&
335
356
  name == o.name &&
357
+ pfx_password == o.pfx_password &&
336
358
  post_provision_command == o.post_provision_command &&
337
359
  private_key_path == o.private_key_path &&
338
360
  project_id == o.project_id &&
@@ -356,7 +378,7 @@ module Akeyless
356
378
  # Calculates hash code according to all attributes.
357
379
  # @return [Integer] Hash code
358
380
  def hash
359
- [bind_ssl_profiles, certificate_path, chain_path, disable_previous_key_version, external_key_name, json, key_operations, keyring_name, kms_algorithm, location_id, multi_region, name, post_provision_command, private_key_path, project_id, protection_level, purpose, regions, sra_association, target_name, tenant_secret_type, token, uid_token, vault_name].hash
381
+ [bind_ssl_profiles, certificate_format, certificate_path, chain_path, disable_previous_key_version, external_key_name, json, key_operations, keyring_name, kms_algorithm, location_id, multi_region, name, pfx_password, post_provision_command, private_key_path, project_id, protection_level, purpose, regions, sra_association, target_name, tenant_secret_type, token, uid_token, vault_name].hash
360
382
  end
361
383
 
362
384
  # Builds the object from hash
@@ -0,0 +1,256 @@
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 ClientEvent
18
+ # Client event kind. One of: injector-cert
19
+ attr_accessor :event_type
20
+
21
+ attr_accessor :injector_certificate
22
+
23
+ # Set output format to JSON
24
+ attr_accessor :json
25
+
26
+ # Authentication token (see `/auth` and `/configure`)
27
+ attr_accessor :token
28
+
29
+ # The universal identity token, Required only for universal_identity authentication
30
+ attr_accessor :uid_token
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'event_type' => :'event_type',
36
+ :'injector_certificate' => :'injector_certificate',
37
+ :'json' => :'json',
38
+ :'token' => :'token',
39
+ :'uid_token' => :'uid-token'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'event_type' => :'String',
52
+ :'injector_certificate' => :'InjectorCertificateEvent',
53
+ :'json' => :'Boolean',
54
+ :'token' => :'String',
55
+ :'uid_token' => :'String'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ClientEvent` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ClientEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'event_type')
81
+ self.event_type = attributes[:'event_type']
82
+ end
83
+
84
+ if attributes.key?(:'injector_certificate')
85
+ self.injector_certificate = attributes[:'injector_certificate']
86
+ end
87
+
88
+ if attributes.key?(:'json')
89
+ self.json = attributes[:'json']
90
+ else
91
+ self.json = false
92
+ end
93
+
94
+ if attributes.key?(:'token')
95
+ self.token = attributes[:'token']
96
+ end
97
+
98
+ if attributes.key?(:'uid_token')
99
+ self.uid_token = attributes[:'uid_token']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ event_type == o.event_type &&
124
+ injector_certificate == o.injector_certificate &&
125
+ json == o.json &&
126
+ token == o.token &&
127
+ uid_token == o.uid_token
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [event_type, injector_certificate, json, token, uid_token].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Deserializes the data based on type
166
+ # @param string type Data type
167
+ # @param string value Value to be deserialized
168
+ # @return [Object] Deserialized data
169
+ def self._deserialize(type, value)
170
+ case type.to_sym
171
+ when :Time
172
+ Time.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :Boolean
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ # models (e.g. Pet) or oneOf
203
+ klass = Akeyless.const_get(type)
204
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
+ end
206
+ end
207
+
208
+ # Returns the string representation of the object
209
+ # @return [String] String presentation of the object
210
+ def to_s
211
+ to_hash.to_s
212
+ end
213
+
214
+ # to_body is an alias to to_hash (backward compatibility)
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_body
217
+ to_hash
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ if value.nil?
227
+ is_nullable = self.class.openapi_nullable.include?(attr)
228
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
+ end
230
+
231
+ hash[param] = _to_hash(value)
232
+ end
233
+ hash
234
+ end
235
+
236
+ # Outputs non-array value in the form of hash
237
+ # For object, use to_hash. Otherwise, just return the value
238
+ # @param [Object] value Any valid value
239
+ # @return [Hash] Returns the value in the form of hash
240
+ def _to_hash(value)
241
+ if value.is_a?(Array)
242
+ value.compact.map { |v| _to_hash(v) }
243
+ elsif value.is_a?(Hash)
244
+ {}.tap do |hash|
245
+ value.each { |k, v| hash[k] = _to_hash(v) }
246
+ end
247
+ elsif value.respond_to? :to_hash
248
+ value.to_hash
249
+ else
250
+ value
251
+ end
252
+ end
253
+
254
+ end
255
+
256
+ 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 ClientEventOutput
18
+ attr_accessor :response
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'response' => :'response'
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
+ :'response' => :'String'
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::ClientEventOutput` 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::ClientEventOutput`. 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?(:'response')
61
+ self.response = attributes[:'response']
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
+ response == o.response
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
+ [response].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
@@ -50,6 +50,9 @@ module Akeyless
50
50
  # The Secret name (for database and AWS producers - producer name)
51
51
  attr_accessor :name
52
52
 
53
+ # For how long to grant the requested access, in minutes
54
+ attr_accessor :requested_ttl
55
+
53
56
  # The Bastion API path
54
57
  attr_accessor :sra_ctrl_path
55
58
 
@@ -104,6 +107,7 @@ module Akeyless
104
107
  :'json' => :'json',
105
108
  :'justification' => :'justification',
106
109
  :'name' => :'name',
110
+ :'requested_ttl' => :'requested-ttl',
107
111
  :'sra_ctrl_path' => :'sra-ctrl-path',
108
112
  :'sra_ctrl_port' => :'sra-ctrl-port',
109
113
  :'sra_ctrl_proto' => :'sra-ctrl-proto',
@@ -140,6 +144,7 @@ module Akeyless
140
144
  :'json' => :'Boolean',
141
145
  :'justification' => :'String',
142
146
  :'name' => :'String',
147
+ :'requested_ttl' => :'Integer',
143
148
  :'sra_ctrl_path' => :'String',
144
149
  :'sra_ctrl_port' => :'String',
145
150
  :'sra_ctrl_proto' => :'String',
@@ -227,6 +232,10 @@ module Akeyless
227
232
  self.name = attributes[:'name']
228
233
  end
229
234
 
235
+ if attributes.key?(:'requested_ttl')
236
+ self.requested_ttl = attributes[:'requested_ttl']
237
+ end
238
+
230
239
  if attributes.key?(:'sra_ctrl_path')
231
240
  self.sra_ctrl_path = attributes[:'sra_ctrl_path']
232
241
  end
@@ -318,6 +327,7 @@ module Akeyless
318
327
  json == o.json &&
319
328
  justification == o.justification &&
320
329
  name == o.name &&
330
+ requested_ttl == o.requested_ttl &&
321
331
  sra_ctrl_path == o.sra_ctrl_path &&
322
332
  sra_ctrl_port == o.sra_ctrl_port &&
323
333
  sra_ctrl_proto == o.sra_ctrl_proto &&
@@ -342,7 +352,7 @@ module Akeyless
342
352
  # Calculates hash code according to all attributes.
343
353
  # @return [Integer] Hash code
344
354
  def hash
345
- [helper, rc_file_override, bastion_ctrl_path, bastion_ctrl_port, bastion_ctrl_proto, bastion_ctrl_subdomain, cert_issuer_name, gateway_url, identity_file, json, justification, name, sra_ctrl_path, sra_ctrl_port, sra_ctrl_proto, sra_ctrl_subdomain, ssh_command, ssh_extra_args, ssh_legacy_signing_alg, target, token, uid_token, use_ssh_agent, via_bastion, via_sra].hash
355
+ [helper, rc_file_override, bastion_ctrl_path, bastion_ctrl_port, bastion_ctrl_proto, bastion_ctrl_subdomain, cert_issuer_name, gateway_url, identity_file, json, justification, name, requested_ttl, sra_ctrl_path, sra_ctrl_port, sra_ctrl_proto, sra_ctrl_subdomain, ssh_command, ssh_extra_args, ssh_legacy_signing_alg, target, token, uid_token, use_ssh_agent, via_bastion, via_sra].hash
346
356
  end
347
357
 
348
358
  # Builds the object from hash
@@ -49,7 +49,7 @@ module Akeyless
49
49
  # Event Source type [item, target, auth_method, gateway]
50
50
  attr_accessor :event_source_type
51
51
 
52
- # List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
52
+ # List of event types to notify about [request-access, access-request-approved, access-request-denied, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
53
53
  attr_accessor :event_types
54
54
 
55
55
  # Rate of periodic runner repetition in hours
@@ -67,6 +67,9 @@ module Akeyless
67
67
  # The universal identity token, Required only for universal_identity authentication
68
68
  attr_accessor :uid_token
69
69
 
70
+ # Username returned for Rotated Secrets. Use the format required by your application, such as sAMAccountName, with or without the domain.
71
+ attr_accessor :username
72
+
70
73
  # Attribute mapping from ruby-style variable name to JSON key.
71
74
  def self.attribute_map
72
75
  {
@@ -86,7 +89,8 @@ module Akeyless
86
89
  :'server_type' => :'server-type',
87
90
  :'token' => :'token',
88
91
  :'token_expiration' => :'token-expiration',
89
- :'uid_token' => :'uid-token'
92
+ :'uid_token' => :'uid-token',
93
+ :'username' => :'username'
90
94
  }
91
95
  end
92
96
 
@@ -114,7 +118,8 @@ module Akeyless
114
118
  :'server_type' => :'String',
115
119
  :'token' => :'String',
116
120
  :'token_expiration' => :'String',
117
- :'uid_token' => :'String'
121
+ :'uid_token' => :'String',
122
+ :'username' => :'String'
118
123
  }
119
124
  end
120
125
 
@@ -218,6 +223,10 @@ module Akeyless
218
223
  if attributes.key?(:'uid_token')
219
224
  self.uid_token = attributes[:'uid_token']
220
225
  end
226
+
227
+ if attributes.key?(:'username')
228
+ self.username = attributes[:'username']
229
+ end
221
230
  end
222
231
 
223
232
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -276,7 +285,8 @@ module Akeyless
276
285
  server_type == o.server_type &&
277
286
  token == o.token &&
278
287
  token_expiration == o.token_expiration &&
279
- uid_token == o.uid_token
288
+ uid_token == o.uid_token &&
289
+ username == o.username
280
290
  end
281
291
 
282
292
  # @see the `==` method
@@ -288,7 +298,7 @@ module Akeyless
288
298
  # Calculates hash code according to all attributes.
289
299
  # @return [Integer] Hash code
290
300
  def hash
291
- [bind_dn, bind_dn_password, comment, description, json, key, ldap_ca_cert, ldap_url, lock_on_read, lock_ttl, max_versions, name, rotate_on_unlock, server_type, token, token_expiration, uid_token].hash
301
+ [bind_dn, bind_dn_password, comment, description, json, key, ldap_ca_cert, ldap_url, lock_on_read, lock_ttl, max_versions, name, rotate_on_unlock, server_type, token, token_expiration, uid_token, username].hash
292
302
  end
293
303
 
294
304
  # Builds the object from hash