akeyless 5.0.40 → 5.0.41

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 (214) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -1
  3. data/docs/AccountGeneralSettings.md +2 -0
  4. data/docs/AnthropicTargetDetails.md +15 -1
  5. data/docs/AtlassianTargetDetails.md +46 -0
  6. data/docs/Auth.md +2 -0
  7. data/docs/AuthMethod.md +2 -0
  8. data/docs/AuthMethodCreateAliCloud.md +2 -0
  9. data/docs/AuthMethodCreateApiKey.md +2 -0
  10. data/docs/AuthMethodCreateAwsIam.md +2 -0
  11. data/docs/AuthMethodCreateAzureAD.md +2 -0
  12. data/docs/AuthMethodCreateCert.md +2 -0
  13. data/docs/AuthMethodCreateEmail.md +2 -0
  14. data/docs/AuthMethodCreateGcp.md +2 -0
  15. data/docs/AuthMethodCreateK8s.md +2 -0
  16. data/docs/AuthMethodCreateKerberos.md +2 -0
  17. data/docs/AuthMethodCreateLdap.md +2 -0
  18. data/docs/AuthMethodCreateOCI.md +2 -0
  19. data/docs/AuthMethodCreateOIDC.md +2 -0
  20. data/docs/AuthMethodCreateOauth2.md +2 -0
  21. data/docs/AuthMethodCreateSAML.md +2 -0
  22. data/docs/AuthMethodCreateUniversalIdentity.md +3 -1
  23. data/docs/AuthMethodList.md +2 -0
  24. data/docs/AuthMethodUpdateAliCloud.md +2 -0
  25. data/docs/AuthMethodUpdateApiKey.md +2 -0
  26. data/docs/AuthMethodUpdateAwsIam.md +2 -0
  27. data/docs/AuthMethodUpdateAzureAD.md +2 -0
  28. data/docs/AuthMethodUpdateCert.md +2 -0
  29. data/docs/AuthMethodUpdateEmail.md +2 -0
  30. data/docs/AuthMethodUpdateGcp.md +2 -0
  31. data/docs/AuthMethodUpdateK8s.md +2 -0
  32. data/docs/AuthMethodUpdateKerberos.md +2 -0
  33. data/docs/AuthMethodUpdateLdap.md +2 -0
  34. data/docs/AuthMethodUpdateOCI.md +2 -0
  35. data/docs/AuthMethodUpdateOIDC.md +2 -0
  36. data/docs/AuthMethodUpdateOauth2.md +2 -0
  37. data/docs/AuthMethodUpdateSAML.md +2 -0
  38. data/docs/AuthMethodUpdateUniversalIdentity.md +3 -1
  39. data/docs/CacheConfigPart.md +2 -0
  40. data/docs/Connect.md +1 -1
  41. data/docs/CreateAuthMethod.md +2 -0
  42. data/docs/CreateAuthMethodAWSIAM.md +2 -0
  43. data/docs/CreateAuthMethodAzureAD.md +2 -0
  44. data/docs/CreateAuthMethodCert.md +2 -0
  45. data/docs/CreateAuthMethodEmail.md +2 -0
  46. data/docs/CreateAuthMethodGCP.md +2 -0
  47. data/docs/CreateAuthMethodHuawei.md +2 -0
  48. data/docs/CreateAuthMethodK8S.md +2 -0
  49. data/docs/CreateAuthMethodLDAP.md +2 -0
  50. data/docs/CreateAuthMethodOAuth2.md +2 -0
  51. data/docs/CreateAuthMethodOCI.md +2 -0
  52. data/docs/CreateAuthMethodOIDC.md +2 -0
  53. data/docs/CreateAuthMethodSAML.md +2 -0
  54. data/docs/CreateAuthMethodUniversalIdentity.md +3 -1
  55. data/docs/CreateEventForwarder.md +1 -1
  56. data/docs/DSProducerDetails.md +28 -0
  57. data/docs/DigiCertTargetDetails.md +2 -0
  58. data/docs/DynamicSecretCreateAliCloud.md +94 -0
  59. data/docs/DynamicSecretUpdateAliCloud.md +96 -0
  60. data/docs/EventForwarderCreateEmail.md +1 -1
  61. data/docs/EventForwarderCreateServiceNow.md +1 -1
  62. data/docs/EventForwarderCreateSlack.md +1 -1
  63. data/docs/EventForwarderCreateTeams.md +1 -1
  64. data/docs/EventForwarderCreateWebhook.md +1 -1
  65. data/docs/EventForwarderUpdateEmail.md +1 -1
  66. data/docs/EventForwarderUpdateServiceNow.md +1 -1
  67. data/docs/EventForwarderUpdateSlack.md +1 -1
  68. data/docs/EventForwarderUpdateTeams.md +1 -1
  69. data/docs/EventForwarderUpdateWebhook.md +1 -1
  70. data/docs/GatewayUpdateCache.md +2 -0
  71. data/docs/ListAuthMethods.md +2 -0
  72. data/docs/ProvisionCertificate.md +2 -0
  73. data/docs/ProvisionCertificateOutput.md +7 -1
  74. data/docs/ProvisionSSHRotatedSecretOutput.md +24 -0
  75. data/docs/RotatedSecretDetailsInfo.md +2 -0
  76. data/docs/RotatedSecretProvisionAssocOutput.md +20 -0
  77. data/docs/RotatedSecretProvisionCreate.md +36 -0
  78. data/docs/RotatedSecretProvisionDelete.md +26 -0
  79. data/docs/RotatedSecretProvisionPush.md +26 -0
  80. data/docs/RotatedSecretProvisionUpdate.md +38 -0
  81. data/docs/TargetCreateAnthropic.md +15 -1
  82. data/docs/TargetCreateAtlassian.md +68 -0
  83. data/docs/TargetCreateDigiCert.md +2 -0
  84. data/docs/TargetTypeDetailsInput.md +2 -0
  85. data/docs/TargetUpdateAnthropic.md +15 -1
  86. data/docs/TargetUpdateAtlassian.md +72 -0
  87. data/docs/TargetUpdateDigiCert.md +2 -0
  88. data/docs/UpdateAccountSettings.md +2 -0
  89. data/docs/UpdateAuthMethod.md +2 -0
  90. data/docs/UpdateAuthMethodAWSIAM.md +2 -0
  91. data/docs/UpdateAuthMethodAzureAD.md +2 -0
  92. data/docs/UpdateAuthMethodCert.md +2 -0
  93. data/docs/UpdateAuthMethodGCP.md +2 -0
  94. data/docs/UpdateAuthMethodK8S.md +2 -0
  95. data/docs/UpdateAuthMethodLDAP.md +2 -0
  96. data/docs/UpdateAuthMethodOAuth2.md +2 -0
  97. data/docs/UpdateAuthMethodOCI.md +2 -0
  98. data/docs/UpdateAuthMethodOIDC.md +2 -0
  99. data/docs/UpdateAuthMethodSAML.md +2 -0
  100. data/docs/UpdateAuthMethodUniversalIdentity.md +3 -1
  101. data/docs/V2Api.md +504 -0
  102. data/lib/akeyless/api/v2_api.rb +512 -0
  103. data/lib/akeyless/models/account_general_settings.rb +11 -1
  104. data/lib/akeyless/models/anthropic_target_details.rb +74 -4
  105. data/lib/akeyless/models/atlassian_target_details.rb +346 -0
  106. data/lib/akeyless/models/auth.rb +11 -1
  107. data/lib/akeyless/models/auth_method.rb +10 -1
  108. data/lib/akeyless/models/auth_method_create_ali_cloud.rb +11 -1
  109. data/lib/akeyless/models/auth_method_create_api_key.rb +11 -1
  110. data/lib/akeyless/models/auth_method_create_aws_iam.rb +11 -1
  111. data/lib/akeyless/models/auth_method_create_azure_ad.rb +11 -1
  112. data/lib/akeyless/models/auth_method_create_cert.rb +11 -1
  113. data/lib/akeyless/models/auth_method_create_email.rb +11 -1
  114. data/lib/akeyless/models/auth_method_create_gcp.rb +11 -1
  115. data/lib/akeyless/models/auth_method_create_k8s.rb +11 -1
  116. data/lib/akeyless/models/auth_method_create_kerberos.rb +11 -1
  117. data/lib/akeyless/models/auth_method_create_ldap.rb +11 -1
  118. data/lib/akeyless/models/auth_method_create_oauth2.rb +11 -1
  119. data/lib/akeyless/models/auth_method_create_oci.rb +11 -1
  120. data/lib/akeyless/models/auth_method_create_oidc.rb +11 -1
  121. data/lib/akeyless/models/auth_method_create_saml.rb +11 -1
  122. data/lib/akeyless/models/auth_method_create_universal_identity.rb +12 -2
  123. data/lib/akeyless/models/auth_method_list.rb +11 -1
  124. data/lib/akeyless/models/auth_method_update_ali_cloud.rb +11 -1
  125. data/lib/akeyless/models/auth_method_update_api_key.rb +11 -1
  126. data/lib/akeyless/models/auth_method_update_aws_iam.rb +11 -1
  127. data/lib/akeyless/models/auth_method_update_azure_ad.rb +11 -1
  128. data/lib/akeyless/models/auth_method_update_cert.rb +11 -1
  129. data/lib/akeyless/models/auth_method_update_email.rb +11 -1
  130. data/lib/akeyless/models/auth_method_update_gcp.rb +11 -1
  131. data/lib/akeyless/models/auth_method_update_k8s.rb +11 -1
  132. data/lib/akeyless/models/auth_method_update_kerberos.rb +11 -1
  133. data/lib/akeyless/models/auth_method_update_ldap.rb +11 -1
  134. data/lib/akeyless/models/auth_method_update_oauth2.rb +11 -1
  135. data/lib/akeyless/models/auth_method_update_oci.rb +11 -1
  136. data/lib/akeyless/models/auth_method_update_oidc.rb +11 -1
  137. data/lib/akeyless/models/auth_method_update_saml.rb +11 -1
  138. data/lib/akeyless/models/auth_method_update_universal_identity.rb +12 -2
  139. data/lib/akeyless/models/cache_config_part.rb +10 -1
  140. data/lib/akeyless/models/connect.rb +1 -1
  141. data/lib/akeyless/models/create_auth_method.rb +12 -1
  142. data/lib/akeyless/models/create_auth_method_awsiam.rb +12 -1
  143. data/lib/akeyless/models/create_auth_method_azure_ad.rb +12 -1
  144. data/lib/akeyless/models/create_auth_method_cert.rb +12 -1
  145. data/lib/akeyless/models/create_auth_method_email.rb +12 -1
  146. data/lib/akeyless/models/create_auth_method_gcp.rb +12 -1
  147. data/lib/akeyless/models/create_auth_method_huawei.rb +11 -1
  148. data/lib/akeyless/models/create_auth_method_k8_s.rb +12 -1
  149. data/lib/akeyless/models/create_auth_method_ldap.rb +12 -1
  150. data/lib/akeyless/models/create_auth_method_o_auth2.rb +12 -1
  151. data/lib/akeyless/models/create_auth_method_oci.rb +12 -1
  152. data/lib/akeyless/models/create_auth_method_oidc.rb +12 -1
  153. data/lib/akeyless/models/create_auth_method_saml.rb +12 -1
  154. data/lib/akeyless/models/create_auth_method_universal_identity.rb +13 -2
  155. data/lib/akeyless/models/create_event_forwarder.rb +1 -1
  156. data/lib/akeyless/models/digi_cert_target_details.rb +11 -1
  157. data/lib/akeyless/models/ds_producer_details.rb +127 -1
  158. data/lib/akeyless/models/dynamic_secret_create_ali_cloud.rb +625 -0
  159. data/lib/akeyless/models/dynamic_secret_update_ali_cloud.rb +635 -0
  160. data/lib/akeyless/models/event_forwarder_create_email.rb +1 -1
  161. data/lib/akeyless/models/event_forwarder_create_service_now.rb +1 -1
  162. data/lib/akeyless/models/event_forwarder_create_slack.rb +1 -1
  163. data/lib/akeyless/models/event_forwarder_create_teams.rb +1 -1
  164. data/lib/akeyless/models/event_forwarder_create_webhook.rb +1 -1
  165. data/lib/akeyless/models/event_forwarder_update_email.rb +1 -1
  166. data/lib/akeyless/models/event_forwarder_update_service_now.rb +1 -1
  167. data/lib/akeyless/models/event_forwarder_update_slack.rb +1 -1
  168. data/lib/akeyless/models/event_forwarder_update_teams.rb +1 -1
  169. data/lib/akeyless/models/event_forwarder_update_webhook.rb +1 -1
  170. data/lib/akeyless/models/gateway_update_cache.rb +11 -1
  171. data/lib/akeyless/models/list_auth_methods.rb +11 -1
  172. data/lib/akeyless/models/provision_certificate.rb +12 -1
  173. data/lib/akeyless/models/provision_certificate_output.rb +35 -4
  174. data/lib/akeyless/models/provision_ssh_rotated_secret_output.rb +243 -0
  175. data/lib/akeyless/models/rotated_secret_details_info.rb +11 -1
  176. data/lib/akeyless/models/rotated_secret_provision_assoc_output.rb +223 -0
  177. data/lib/akeyless/models/rotated_secret_provision_create.rb +322 -0
  178. data/lib/akeyless/models/rotated_secret_provision_delete.rb +271 -0
  179. data/lib/akeyless/models/rotated_secret_provision_push.rb +271 -0
  180. data/lib/akeyless/models/rotated_secret_provision_update.rb +332 -0
  181. data/lib/akeyless/models/target_create_anthropic.rb +74 -4
  182. data/lib/akeyless/models/target_create_atlassian.rb +476 -0
  183. data/lib/akeyless/models/target_create_digi_cert.rb +11 -1
  184. data/lib/akeyless/models/target_type_details_input.rb +10 -1
  185. data/lib/akeyless/models/target_update_anthropic.rb +74 -4
  186. data/lib/akeyless/models/target_update_atlassian.rb +496 -0
  187. data/lib/akeyless/models/target_update_digi_cert.rb +11 -1
  188. data/lib/akeyless/models/update_account_settings.rb +11 -1
  189. data/lib/akeyless/models/update_auth_method.rb +12 -1
  190. data/lib/akeyless/models/update_auth_method_awsiam.rb +12 -1
  191. data/lib/akeyless/models/update_auth_method_azure_ad.rb +12 -1
  192. data/lib/akeyless/models/update_auth_method_cert.rb +12 -1
  193. data/lib/akeyless/models/update_auth_method_gcp.rb +12 -1
  194. data/lib/akeyless/models/update_auth_method_k8_s.rb +12 -1
  195. data/lib/akeyless/models/update_auth_method_ldap.rb +12 -1
  196. data/lib/akeyless/models/update_auth_method_o_auth2.rb +12 -1
  197. data/lib/akeyless/models/update_auth_method_oci.rb +12 -1
  198. data/lib/akeyless/models/update_auth_method_oidc.rb +12 -1
  199. data/lib/akeyless/models/update_auth_method_saml.rb +12 -1
  200. data/lib/akeyless/models/update_auth_method_universal_identity.rb +13 -2
  201. data/lib/akeyless/version.rb +1 -1
  202. data/lib/akeyless.rb +11 -0
  203. data/spec/models/atlassian_target_details_spec.rb +120 -0
  204. data/spec/models/dynamic_secret_create_ali_cloud_spec.rb +264 -0
  205. data/spec/models/dynamic_secret_update_ali_cloud_spec.rb +270 -0
  206. data/spec/models/provision_ssh_rotated_secret_output_spec.rb +54 -0
  207. data/spec/models/rotated_secret_provision_assoc_output_spec.rb +42 -0
  208. data/spec/models/rotated_secret_provision_create_spec.rb +90 -0
  209. data/spec/models/rotated_secret_provision_delete_spec.rb +60 -0
  210. data/spec/models/rotated_secret_provision_push_spec.rb +60 -0
  211. data/spec/models/rotated_secret_provision_update_spec.rb +96 -0
  212. data/spec/models/target_create_atlassian_spec.rb +186 -0
  213. data/spec/models/target_update_atlassian_spec.rb +198 -0
  214. metadata +59 -15
@@ -0,0 +1,271 @@
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 RotatedSecretProvisionDelete
18
+ # Set output format to JSON
19
+ attr_accessor :json
20
+
21
+ # Rotated secret name
22
+ attr_accessor :name
23
+
24
+ # Target name of the provisioning association
25
+ attr_accessor :target_name
26
+
27
+ # Authentication token (see `/auth` and `/configure`)
28
+ attr_accessor :token
29
+
30
+ # The universal identity token, Required only for universal_identity authentication
31
+ attr_accessor :uid_token
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'json' => :'json',
37
+ :'name' => :'name',
38
+ :'target_name' => :'target-name',
39
+ :'token' => :'token',
40
+ :'uid_token' => :'uid-token'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'json' => :'Boolean',
53
+ :'name' => :'String',
54
+ :'target_name' => :'String',
55
+ :'token' => :'String',
56
+ :'uid_token' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RotatedSecretProvisionDelete` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RotatedSecretProvisionDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'json')
82
+ self.json = attributes[:'json']
83
+ else
84
+ self.json = false
85
+ end
86
+
87
+ if attributes.key?(:'name')
88
+ self.name = attributes[:'name']
89
+ else
90
+ self.name = nil
91
+ end
92
+
93
+ if attributes.key?(:'target_name')
94
+ self.target_name = attributes[:'target_name']
95
+ else
96
+ self.target_name = nil
97
+ end
98
+
99
+ if attributes.key?(:'token')
100
+ self.token = attributes[:'token']
101
+ end
102
+
103
+ if attributes.key?(:'uid_token')
104
+ self.uid_token = attributes[:'uid_token']
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @name.nil?
114
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
115
+ end
116
+
117
+ if @target_name.nil?
118
+ invalid_properties.push('invalid value for "target_name", target_name cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ warn '[DEPRECATED] the `valid?` method is obsolete'
128
+ return false if @name.nil?
129
+ return false if @target_name.nil?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ json == o.json &&
139
+ name == o.name &&
140
+ target_name == o.target_name &&
141
+ token == o.token &&
142
+ uid_token == o.uid_token
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [json, name, target_name, token, uid_token].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ attributes = attributes.transform_keys(&:to_sym)
163
+ transformed_hash = {}
164
+ openapi_types.each_pair do |key, type|
165
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = nil
167
+ elsif type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[attribute_map[key]].is_a?(Array)
171
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
+ end
173
+ elsif !attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
+ end
176
+ end
177
+ new(transformed_hash)
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def self._deserialize(type, value)
185
+ case type.to_sym
186
+ when :Time
187
+ Time.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ # models (e.g. Pet) or oneOf
218
+ klass = Akeyless.const_get(type)
219
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
+ end
221
+ end
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # to_body is an alias to to_hash (backward compatibility)
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_body
232
+ to_hash
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ self.class.attribute_map.each_pair do |attr, param|
240
+ value = self.send(attr)
241
+ if value.nil?
242
+ is_nullable = self.class.openapi_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
246
+ hash[param] = _to_hash(value)
247
+ end
248
+ hash
249
+ end
250
+
251
+ # Outputs non-array value in the form of hash
252
+ # For object, use to_hash. Otherwise, just return the value
253
+ # @param [Object] value Any valid value
254
+ # @return [Hash] Returns the value in the form of hash
255
+ def _to_hash(value)
256
+ if value.is_a?(Array)
257
+ value.compact.map { |v| _to_hash(v) }
258
+ elsif value.is_a?(Hash)
259
+ {}.tap do |hash|
260
+ value.each { |k, v| hash[k] = _to_hash(v) }
261
+ end
262
+ elsif value.respond_to? :to_hash
263
+ value.to_hash
264
+ else
265
+ value
266
+ end
267
+ end
268
+
269
+ end
270
+
271
+ end
@@ -0,0 +1,271 @@
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 RotatedSecretProvisionPush
18
+ # Set output format to JSON
19
+ attr_accessor :json
20
+
21
+ # Rotated secret name
22
+ attr_accessor :name
23
+
24
+ # Target name of the provisioning association
25
+ attr_accessor :target_name
26
+
27
+ # Authentication token (see `/auth` and `/configure`)
28
+ attr_accessor :token
29
+
30
+ # The universal identity token, Required only for universal_identity authentication
31
+ attr_accessor :uid_token
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'json' => :'json',
37
+ :'name' => :'name',
38
+ :'target_name' => :'target-name',
39
+ :'token' => :'token',
40
+ :'uid_token' => :'uid-token'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'json' => :'Boolean',
53
+ :'name' => :'String',
54
+ :'target_name' => :'String',
55
+ :'token' => :'String',
56
+ :'uid_token' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RotatedSecretProvisionPush` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RotatedSecretProvisionPush`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'json')
82
+ self.json = attributes[:'json']
83
+ else
84
+ self.json = false
85
+ end
86
+
87
+ if attributes.key?(:'name')
88
+ self.name = attributes[:'name']
89
+ else
90
+ self.name = nil
91
+ end
92
+
93
+ if attributes.key?(:'target_name')
94
+ self.target_name = attributes[:'target_name']
95
+ else
96
+ self.target_name = nil
97
+ end
98
+
99
+ if attributes.key?(:'token')
100
+ self.token = attributes[:'token']
101
+ end
102
+
103
+ if attributes.key?(:'uid_token')
104
+ self.uid_token = attributes[:'uid_token']
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @name.nil?
114
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
115
+ end
116
+
117
+ if @target_name.nil?
118
+ invalid_properties.push('invalid value for "target_name", target_name cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ warn '[DEPRECATED] the `valid?` method is obsolete'
128
+ return false if @name.nil?
129
+ return false if @target_name.nil?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ json == o.json &&
139
+ name == o.name &&
140
+ target_name == o.target_name &&
141
+ token == o.token &&
142
+ uid_token == o.uid_token
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [json, name, target_name, token, uid_token].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ attributes = attributes.transform_keys(&:to_sym)
163
+ transformed_hash = {}
164
+ openapi_types.each_pair do |key, type|
165
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = nil
167
+ elsif type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[attribute_map[key]].is_a?(Array)
171
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
+ end
173
+ elsif !attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
+ end
176
+ end
177
+ new(transformed_hash)
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def self._deserialize(type, value)
185
+ case type.to_sym
186
+ when :Time
187
+ Time.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ # models (e.g. Pet) or oneOf
218
+ klass = Akeyless.const_get(type)
219
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
+ end
221
+ end
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # to_body is an alias to to_hash (backward compatibility)
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_body
232
+ to_hash
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ self.class.attribute_map.each_pair do |attr, param|
240
+ value = self.send(attr)
241
+ if value.nil?
242
+ is_nullable = self.class.openapi_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
246
+ hash[param] = _to_hash(value)
247
+ end
248
+ hash
249
+ end
250
+
251
+ # Outputs non-array value in the form of hash
252
+ # For object, use to_hash. Otherwise, just return the value
253
+ # @param [Object] value Any valid value
254
+ # @return [Hash] Returns the value in the form of hash
255
+ def _to_hash(value)
256
+ if value.is_a?(Array)
257
+ value.compact.map { |v| _to_hash(v) }
258
+ elsif value.is_a?(Hash)
259
+ {}.tap do |hash|
260
+ value.each { |k, v| hash[k] = _to_hash(v) }
261
+ end
262
+ elsif value.respond_to? :to_hash
263
+ value.to_hash
264
+ else
265
+ value
266
+ end
267
+ end
268
+
269
+ end
270
+
271
+ end