akeyless 3.5.4 → 3.6.0

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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -2
  3. data/docs/AssocTargetItem.md +8 -0
  4. data/docs/AuthMethod.md +2 -0
  5. data/docs/CertificateChainInfo.md +4 -0
  6. data/docs/CertificateVersionInfo.md +22 -0
  7. data/docs/Connect.md +1 -1
  8. data/docs/CreateAuthMethod.md +2 -0
  9. data/docs/CreateAuthMethodAWSIAM.md +2 -0
  10. data/docs/CreateAuthMethodAzureAD.md +3 -1
  11. data/docs/CreateAuthMethodCert.md +2 -0
  12. data/docs/CreateAuthMethodEmail.md +2 -0
  13. data/docs/CreateAuthMethodGCP.md +2 -0
  14. data/docs/CreateAuthMethodHuawei.md +2 -0
  15. data/docs/CreateAuthMethodK8S.md +2 -0
  16. data/docs/CreateAuthMethodLDAP.md +2 -0
  17. data/docs/CreateAuthMethodOAuth2.md +2 -0
  18. data/docs/CreateAuthMethodOIDC.md +2 -0
  19. data/docs/CreateAuthMethodSAML.md +2 -0
  20. data/docs/CreateAuthMethodUniversalIdentity.md +2 -0
  21. data/docs/CreateEventForwarder.md +1 -1
  22. data/docs/CreateLinkedTarget.md +2 -0
  23. data/docs/CreateRole.md +4 -0
  24. data/docs/CreateRotatedSecret.md +7 -1
  25. data/docs/CreateSSHCertIssuer.md +4 -4
  26. data/docs/CreateSecret.md +2 -0
  27. data/docs/GatewayCreateMigration.md +2 -0
  28. data/docs/GatewayCreateProducerCassandra.md +4 -0
  29. data/docs/GatewayUpdateItem.md +2 -0
  30. data/docs/GatewayUpdateMigration.md +2 -0
  31. data/docs/GatewayUpdateProducerCassandra.md +4 -0
  32. data/docs/GenerateCsr.md +1 -1
  33. data/docs/GwClusterIdentity.md +2 -0
  34. data/docs/ImportPasswords.md +3 -1
  35. data/docs/ImportPasswordsOutput.md +3 -1
  36. data/docs/ItemVersion.md +2 -0
  37. data/docs/ProvisionCertificate.md +28 -0
  38. data/docs/ProvisionCertificateOutput.md +24 -0
  39. data/docs/RenewCertificate.md +28 -0
  40. data/docs/RenewCertificateOutput.md +28 -0
  41. data/docs/SecureRemoteAccess.md +2 -0
  42. data/docs/ServerInventoryPayload.md +2 -0
  43. data/docs/SetRoleRule.md +1 -1
  44. data/docs/SignDataWithClassicKey.md +2 -0
  45. data/docs/SignEcDsa.md +5 -1
  46. data/docs/SignPKCS1.md +9 -1
  47. data/docs/SignPKCS1Output.md +1 -1
  48. data/docs/SignRsaSsaPss.md +5 -1
  49. data/docs/StaticSecretDetailsInfo.md +2 -0
  50. data/docs/TargetItemVersion.md +2 -0
  51. data/docs/UpdateAuthMethod.md +2 -0
  52. data/docs/UpdateAuthMethodAWSIAM.md +2 -0
  53. data/docs/UpdateAuthMethodAzureAD.md +3 -1
  54. data/docs/UpdateAuthMethodCert.md +2 -0
  55. data/docs/UpdateAuthMethodGCP.md +2 -0
  56. data/docs/UpdateAuthMethodK8S.md +2 -0
  57. data/docs/UpdateAuthMethodLDAP.md +2 -0
  58. data/docs/UpdateAuthMethodOAuth2.md +2 -0
  59. data/docs/UpdateAuthMethodOIDC.md +2 -0
  60. data/docs/UpdateAuthMethodSAML.md +2 -0
  61. data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
  62. data/docs/UpdateCertificateValue.md +2 -0
  63. data/docs/UpdateItem.md +6 -0
  64. data/docs/UpdateLinkedTarget.md +2 -0
  65. data/docs/UpdateRole.md +4 -0
  66. data/docs/UpdateSSHCertIssuer.md +3 -3
  67. data/docs/UpdateSecretVal.md +2 -0
  68. data/docs/V2Api.md +138 -9
  69. data/docs/VerifyEcDsa.md +5 -1
  70. data/docs/VerifyPKCS1.md +9 -1
  71. data/docs/VerifyRsaSsaPss.md +5 -1
  72. data/lib/akeyless/api/v2_api.rb +146 -7
  73. data/lib/akeyless/models/assoc_target_item.rb +43 -1
  74. data/lib/akeyless/models/auth_method.rb +10 -1
  75. data/lib/akeyless/models/certificate_chain_info.rb +19 -1
  76. data/lib/akeyless/models/certificate_version_info.rb +232 -0
  77. data/lib/akeyless/models/connect.rb +1 -1
  78. data/lib/akeyless/models/create_auth_method.rb +11 -1
  79. data/lib/akeyless/models/create_auth_method_awsiam.rb +11 -1
  80. data/lib/akeyless/models/create_auth_method_azure_ad.rb +12 -2
  81. data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
  82. data/lib/akeyless/models/create_auth_method_email.rb +11 -1
  83. data/lib/akeyless/models/create_auth_method_gcp.rb +11 -1
  84. data/lib/akeyless/models/create_auth_method_huawei.rb +11 -1
  85. data/lib/akeyless/models/create_auth_method_k8_s.rb +11 -1
  86. data/lib/akeyless/models/create_auth_method_ldap.rb +11 -1
  87. data/lib/akeyless/models/create_auth_method_o_auth2.rb +11 -1
  88. data/lib/akeyless/models/create_auth_method_oidc.rb +11 -1
  89. data/lib/akeyless/models/create_auth_method_saml.rb +11 -1
  90. data/lib/akeyless/models/create_auth_method_universal_identity.rb +11 -1
  91. data/lib/akeyless/models/create_event_forwarder.rb +1 -1
  92. data/lib/akeyless/models/create_linked_target.rb +11 -1
  93. data/lib/akeyless/models/create_role.rb +21 -1
  94. data/lib/akeyless/models/create_rotated_secret.rb +35 -2
  95. data/lib/akeyless/models/create_secret.rb +11 -1
  96. data/lib/akeyless/models/create_ssh_cert_issuer.rb +9 -9
  97. data/lib/akeyless/models/gateway_create_migration.rb +11 -1
  98. data/lib/akeyless/models/gateway_create_producer_cassandra.rb +23 -1
  99. data/lib/akeyless/models/gateway_update_item.rb +11 -1
  100. data/lib/akeyless/models/gateway_update_migration.rb +11 -1
  101. data/lib/akeyless/models/gateway_update_producer_cassandra.rb +23 -1
  102. data/lib/akeyless/models/generate_csr.rb +1 -1
  103. data/lib/akeyless/models/gw_cluster_identity.rb +10 -1
  104. data/lib/akeyless/models/import_passwords.rb +13 -4
  105. data/lib/akeyless/models/import_passwords_output.rb +13 -4
  106. data/lib/akeyless/models/item_version.rb +10 -1
  107. data/lib/akeyless/models/provision_certificate.rb +275 -0
  108. data/lib/akeyless/models/provision_certificate_output.rb +243 -0
  109. data/lib/akeyless/models/renew_certificate.rb +267 -0
  110. data/lib/akeyless/models/renew_certificate_output.rb +259 -0
  111. data/lib/akeyless/models/secure_remote_access.rb +12 -1
  112. data/lib/akeyless/models/server_inventory_payload.rb +12 -1
  113. data/lib/akeyless/models/set_role_rule.rb +1 -1
  114. data/lib/akeyless/models/sign_data_with_classic_key.rb +13 -1
  115. data/lib/akeyless/models/sign_ec_dsa.rb +24 -4
  116. data/lib/akeyless/models/sign_pkcs1.rb +44 -4
  117. data/lib/akeyless/models/sign_pkcs1_output.rb +2 -4
  118. data/lib/akeyless/models/sign_rsa_ssa_pss.rb +24 -4
  119. data/lib/akeyless/models/static_secret_details_info.rb +10 -1
  120. data/lib/akeyless/models/target_item_version.rb +10 -1
  121. data/lib/akeyless/models/update_auth_method.rb +11 -1
  122. data/lib/akeyless/models/update_auth_method_awsiam.rb +11 -1
  123. data/lib/akeyless/models/update_auth_method_azure_ad.rb +12 -2
  124. data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
  125. data/lib/akeyless/models/update_auth_method_gcp.rb +11 -1
  126. data/lib/akeyless/models/update_auth_method_k8_s.rb +11 -1
  127. data/lib/akeyless/models/update_auth_method_ldap.rb +11 -1
  128. data/lib/akeyless/models/update_auth_method_o_auth2.rb +11 -1
  129. data/lib/akeyless/models/update_auth_method_oidc.rb +11 -1
  130. data/lib/akeyless/models/update_auth_method_saml.rb +11 -1
  131. data/lib/akeyless/models/update_auth_method_universal_identity.rb +11 -1
  132. data/lib/akeyless/models/update_certificate_value.rb +11 -1
  133. data/lib/akeyless/models/update_item.rb +32 -1
  134. data/lib/akeyless/models/update_linked_target.rb +11 -1
  135. data/lib/akeyless/models/update_role.rb +21 -1
  136. data/lib/akeyless/models/update_secret_val.rb +11 -1
  137. data/lib/akeyless/models/update_ssh_cert_issuer.rb +8 -8
  138. data/lib/akeyless/models/verify_ec_dsa.rb +24 -4
  139. data/lib/akeyless/models/verify_pkcs1.rb +44 -4
  140. data/lib/akeyless/models/verify_rsa_ssa_pss.rb +24 -4
  141. data/lib/akeyless/version.rb +1 -1
  142. data/lib/akeyless.rb +5 -0
  143. data/spec/models/certificate_version_info_spec.rb +48 -0
  144. data/spec/models/provision_certificate_output_spec.rb +54 -0
  145. data/spec/models/provision_certificate_spec.rb +66 -0
  146. data/spec/models/renew_certificate_output_spec.rb +66 -0
  147. data/spec/models/renew_certificate_spec.rb +66 -0
  148. metadata +23 -3
@@ -0,0 +1,267 @@
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: 7.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class RenewCertificate
18
+ # Generate a new key as part of the certificate renewal
19
+ attr_accessor :generate_key
20
+
21
+ # Certificate item id
22
+ attr_accessor :item_id
23
+
24
+ # Set output format to JSON
25
+ attr_accessor :json
26
+
27
+ # Certificate 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
+ :'generate_key' => :'generate-key',
40
+ :'item_id' => :'item-id',
41
+ :'json' => :'json',
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
+ :'generate_key' => :'Boolean',
57
+ :'item_id' => :'Integer',
58
+ :'json' => :'Boolean',
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::RenewCertificate` 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::RenewCertificate`. 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?(:'generate_key')
87
+ self.generate_key = attributes[:'generate_key']
88
+ end
89
+
90
+ if attributes.key?(:'item_id')
91
+ self.item_id = attributes[:'item_id']
92
+ end
93
+
94
+ if attributes.key?(:'json')
95
+ self.json = attributes[:'json']
96
+ else
97
+ self.json = false
98
+ end
99
+
100
+ if attributes.key?(:'name')
101
+ self.name = attributes[:'name']
102
+ end
103
+
104
+ if attributes.key?(:'token')
105
+ self.token = attributes[:'token']
106
+ end
107
+
108
+ if attributes.key?(:'uid_token')
109
+ self.uid_token = attributes[:'uid_token']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ generate_key == o.generate_key &&
134
+ item_id == o.item_id &&
135
+ json == o.json &&
136
+ name == o.name &&
137
+ token == o.token &&
138
+ uid_token == o.uid_token
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [generate_key, item_id, json, name, token, uid_token].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ attributes = attributes.transform_keys(&:to_sym)
159
+ transformed_hash = {}
160
+ openapi_types.each_pair do |key, type|
161
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = nil
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[attribute_map[key]].is_a?(Array)
167
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
+ end
169
+ elsif !attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
+ end
172
+ end
173
+ new(transformed_hash)
174
+ end
175
+
176
+ # Deserializes the data based on type
177
+ # @param string type Data type
178
+ # @param string value Value to be deserialized
179
+ # @return [Object] Deserialized data
180
+ def self._deserialize(type, value)
181
+ case type.to_sym
182
+ when :Time
183
+ Time.parse(value)
184
+ when :Date
185
+ Date.parse(value)
186
+ when :String
187
+ value.to_s
188
+ when :Integer
189
+ value.to_i
190
+ when :Float
191
+ value.to_f
192
+ when :Boolean
193
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
194
+ true
195
+ else
196
+ false
197
+ end
198
+ when :Object
199
+ # generic object (usually a Hash), return directly
200
+ value
201
+ when /\AArray<(?<inner_type>.+)>\z/
202
+ inner_type = Regexp.last_match[:inner_type]
203
+ value.map { |v| _deserialize(inner_type, v) }
204
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
205
+ k_type = Regexp.last_match[:k_type]
206
+ v_type = Regexp.last_match[:v_type]
207
+ {}.tap do |hash|
208
+ value.each do |k, v|
209
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
210
+ end
211
+ end
212
+ else # model
213
+ # models (e.g. Pet) or oneOf
214
+ klass = Akeyless.const_get(type)
215
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
216
+ end
217
+ end
218
+
219
+ # Returns the string representation of the object
220
+ # @return [String] String presentation of the object
221
+ def to_s
222
+ to_hash.to_s
223
+ end
224
+
225
+ # to_body is an alias to to_hash (backward compatibility)
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_body
228
+ to_hash
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
242
+ hash[param] = _to_hash(value)
243
+ end
244
+ hash
245
+ end
246
+
247
+ # Outputs non-array value in the form of hash
248
+ # For object, use to_hash. Otherwise, just return the value
249
+ # @param [Object] value Any valid value
250
+ # @return [Hash] Returns the value in the form of hash
251
+ def _to_hash(value)
252
+ if value.is_a?(Array)
253
+ value.compact.map { |v| _to_hash(v) }
254
+ elsif value.is_a?(Hash)
255
+ {}.tap do |hash|
256
+ value.each { |k, v| hash[k] = _to_hash(v) }
257
+ end
258
+ elsif value.respond_to? :to_hash
259
+ value.to_hash
260
+ else
261
+ value
262
+ end
263
+ end
264
+
265
+ end
266
+
267
+ end
@@ -0,0 +1,259 @@
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: 7.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class RenewCertificateOutput
18
+ attr_accessor :cert
19
+
20
+ attr_accessor :cert_display_id
21
+
22
+ attr_accessor :item_id
23
+
24
+ attr_accessor :parent_cert
25
+
26
+ attr_accessor :private_key
27
+
28
+ attr_accessor :reading_token
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'cert' => :'cert',
34
+ :'cert_display_id' => :'cert_display_id',
35
+ :'item_id' => :'item_id',
36
+ :'parent_cert' => :'parent_cert',
37
+ :'private_key' => :'private_key',
38
+ :'reading_token' => :'reading_token'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'cert' => :'String',
51
+ :'cert_display_id' => :'String',
52
+ :'item_id' => :'String',
53
+ :'parent_cert' => :'String',
54
+ :'private_key' => :'String',
55
+ :'reading_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::RenewCertificateOutput` 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::RenewCertificateOutput`. 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?(:'cert')
81
+ self.cert = attributes[:'cert']
82
+ end
83
+
84
+ if attributes.key?(:'cert_display_id')
85
+ self.cert_display_id = attributes[:'cert_display_id']
86
+ end
87
+
88
+ if attributes.key?(:'item_id')
89
+ self.item_id = attributes[:'item_id']
90
+ end
91
+
92
+ if attributes.key?(:'parent_cert')
93
+ self.parent_cert = attributes[:'parent_cert']
94
+ end
95
+
96
+ if attributes.key?(:'private_key')
97
+ self.private_key = attributes[:'private_key']
98
+ end
99
+
100
+ if attributes.key?(:'reading_token')
101
+ self.reading_token = attributes[:'reading_token']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ cert == o.cert &&
126
+ cert_display_id == o.cert_display_id &&
127
+ item_id == o.item_id &&
128
+ parent_cert == o.parent_cert &&
129
+ private_key == o.private_key &&
130
+ reading_token == o.reading_token
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [cert, cert_display_id, item_id, parent_cert, private_key, reading_token].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def self._deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = Akeyless.const_get(type)
207
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -71,6 +71,8 @@ module Akeyless
71
71
 
72
72
  attr_accessor :target_hosts
73
73
 
74
+ attr_accessor :targets
75
+
74
76
  attr_accessor :url
75
77
 
76
78
  attr_accessor :use_internal_bastion
@@ -108,6 +110,7 @@ module Akeyless
108
110
  :'ssh_private_key' => :'ssh_private_key',
109
111
  :'ssh_user' => :'ssh_user',
110
112
  :'target_hosts' => :'target_hosts',
113
+ :'targets' => :'targets',
111
114
  :'url' => :'url',
112
115
  :'use_internal_bastion' => :'use_internal_bastion',
113
116
  :'web_proxy' => :'web_proxy'
@@ -150,6 +153,7 @@ module Akeyless
150
153
  :'ssh_private_key' => :'Boolean',
151
154
  :'ssh_user' => :'String',
152
155
  :'target_hosts' => :'Array<TargetNameWithHosts>',
156
+ :'targets' => :'Array<String>',
153
157
  :'url' => :'String',
154
158
  :'use_internal_bastion' => :'Boolean',
155
159
  :'web_proxy' => :'Boolean'
@@ -293,6 +297,12 @@ module Akeyless
293
297
  end
294
298
  end
295
299
 
300
+ if attributes.key?(:'targets')
301
+ if (value = attributes[:'targets']).is_a?(Array)
302
+ self.targets = value
303
+ end
304
+ end
305
+
296
306
  if attributes.key?(:'url')
297
307
  self.url = attributes[:'url']
298
308
  end
@@ -354,6 +364,7 @@ module Akeyless
354
364
  ssh_private_key == o.ssh_private_key &&
355
365
  ssh_user == o.ssh_user &&
356
366
  target_hosts == o.target_hosts &&
367
+ targets == o.targets &&
357
368
  url == o.url &&
358
369
  use_internal_bastion == o.use_internal_bastion &&
359
370
  web_proxy == o.web_proxy
@@ -368,7 +379,7 @@ module Akeyless
368
379
  # Calculates hash code according to all attributes.
369
380
  # @return [Integer] Hash code
370
381
  def hash
371
- [account_id, allow_port_forwarding, allow_providing_external_username, bastion_api, bastion_issuer, bastion_issuer_id, bastion_ssh, category, dashboard_url, db_name, domain, enable, endpoint, host, host_provider_type, is_cli, is_web, isolated, native, rd_gateway_server, rdp_user, region, rotate_after_disconnect, schema, ssh_password, ssh_private_key, ssh_user, target_hosts, url, use_internal_bastion, web_proxy].hash
382
+ [account_id, allow_port_forwarding, allow_providing_external_username, bastion_api, bastion_issuer, bastion_issuer_id, bastion_ssh, category, dashboard_url, db_name, domain, enable, endpoint, host, host_provider_type, is_cli, is_web, isolated, native, rd_gateway_server, rdp_user, region, rotate_after_disconnect, schema, ssh_password, ssh_private_key, ssh_user, target_hosts, targets, url, use_internal_bastion, web_proxy].hash
372
383
  end
373
384
 
374
385
  # Builds the object from hash
@@ -27,6 +27,8 @@ module Akeyless
27
27
 
28
28
  attr_accessor :server_targets_path_template
29
29
 
30
+ attr_accessor :user_groups
31
+
30
32
  attr_accessor :users_ignore_list
31
33
 
32
34
  attr_accessor :users_rotated_secrets_path_template
@@ -40,6 +42,7 @@ module Akeyless
40
42
  :'enable_rdp_sra' => :'enable_rdp_sra',
41
43
  :'migration_target_id' => :'migration_target_id',
42
44
  :'server_targets_path_template' => :'server_targets_path_template',
45
+ :'user_groups' => :'user_groups',
43
46
  :'users_ignore_list' => :'users_ignore_list',
44
47
  :'users_rotated_secrets_path_template' => :'users_rotated_secrets_path_template'
45
48
  }
@@ -59,6 +62,7 @@ module Akeyless
59
62
  :'enable_rdp_sra' => :'Boolean',
60
63
  :'migration_target_id' => :'Integer',
61
64
  :'server_targets_path_template' => :'String',
65
+ :'user_groups' => :'Array<String>',
62
66
  :'users_ignore_list' => :'Hash<String, Boolean>',
63
67
  :'users_rotated_secrets_path_template' => :'String'
64
68
  }
@@ -109,6 +113,12 @@ module Akeyless
109
113
  self.server_targets_path_template = attributes[:'server_targets_path_template']
110
114
  end
111
115
 
116
+ if attributes.key?(:'user_groups')
117
+ if (value = attributes[:'user_groups']).is_a?(Array)
118
+ self.user_groups = value
119
+ end
120
+ end
121
+
112
122
  if attributes.key?(:'users_ignore_list')
113
123
  if (value = attributes[:'users_ignore_list']).is_a?(Hash)
114
124
  self.users_ignore_list = value
@@ -146,6 +156,7 @@ module Akeyless
146
156
  enable_rdp_sra == o.enable_rdp_sra &&
147
157
  migration_target_id == o.migration_target_id &&
148
158
  server_targets_path_template == o.server_targets_path_template &&
159
+ user_groups == o.user_groups &&
149
160
  users_ignore_list == o.users_ignore_list &&
150
161
  users_rotated_secrets_path_template == o.users_rotated_secrets_path_template
151
162
  end
@@ -159,7 +170,7 @@ module Akeyless
159
170
  # Calculates hash code according to all attributes.
160
171
  # @return [Integer] Hash code
161
172
  def hash
162
- [auto_rotate, auto_rotate_interval_in_days, auto_rotate_rotation_hour, enable_rdp_sra, migration_target_id, server_targets_path_template, users_ignore_list, users_rotated_secrets_path_template].hash
173
+ [auto_rotate, auto_rotate_interval_in_days, auto_rotate_rotation_hour, enable_rdp_sra, migration_target_id, server_targets_path_template, user_groups, users_ignore_list, users_rotated_secrets_path_template].hash
163
174
  end
164
175
 
165
176
  # Builds the object from hash
@@ -27,7 +27,7 @@ module Akeyless
27
27
  # The role name to be updated
28
28
  attr_accessor :role_name
29
29
 
30
- # item-rule, target-rule, role-rule, auth-method-rule, search-rule, reports-rule, gw-reports-rule or sra-reports-rule
30
+ # item-rule, target-rule, role-rule, auth-method-rule, search-rule, reports-rule, gw-reports-rule or sra-reports-rule, sra-rule
31
31
  attr_accessor :rule_type
32
32
 
33
33
  # Authentication token (see `/auth` and `/configure`)
@@ -27,6 +27,9 @@ module Akeyless
27
27
  # HashingMethod
28
28
  attr_accessor :hashing_method
29
29
 
30
+ # Retrieve the Secret value without checking the Gateway's cache [true/false]. This flag is only relevant when using the RestAPI
31
+ attr_accessor :ignore_cache
32
+
30
33
  # Set output format to JSON
31
34
  attr_accessor :json
32
35
 
@@ -49,6 +52,7 @@ module Akeyless
49
52
  :'display_id' => :'display-id',
50
53
  :'hashed' => :'hashed',
51
54
  :'hashing_method' => :'hashing-method',
55
+ :'ignore_cache' => :'ignore-cache',
52
56
  :'json' => :'json',
53
57
  :'name' => :'name',
54
58
  :'token' => :'token',
@@ -69,6 +73,7 @@ module Akeyless
69
73
  :'display_id' => :'String',
70
74
  :'hashed' => :'Boolean',
71
75
  :'hashing_method' => :'String',
76
+ :'ignore_cache' => :'String',
72
77
  :'json' => :'Boolean',
73
78
  :'name' => :'String',
74
79
  :'token' => :'String',
@@ -122,6 +127,12 @@ module Akeyless
122
127
  self.hashing_method = 'SHA256'
123
128
  end
124
129
 
130
+ if attributes.key?(:'ignore_cache')
131
+ self.ignore_cache = attributes[:'ignore_cache']
132
+ else
133
+ self.ignore_cache = 'false'
134
+ end
135
+
125
136
  if attributes.key?(:'json')
126
137
  self.json = attributes[:'json']
127
138
  else
@@ -193,6 +204,7 @@ module Akeyless
193
204
  display_id == o.display_id &&
194
205
  hashed == o.hashed &&
195
206
  hashing_method == o.hashing_method &&
207
+ ignore_cache == o.ignore_cache &&
196
208
  json == o.json &&
197
209
  name == o.name &&
198
210
  token == o.token &&
@@ -209,7 +221,7 @@ module Akeyless
209
221
  # Calculates hash code according to all attributes.
210
222
  # @return [Integer] Hash code
211
223
  def hash
212
- [data, display_id, hashed, hashing_method, json, name, token, uid_token, version].hash
224
+ [data, display_id, hashed, hashing_method, ignore_cache, json, name, token, uid_token, version].hash
213
225
  end
214
226
 
215
227
  # Builds the object from hash