akeyless 5.0.19 → 5.0.21

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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/CertificateStore.md +2 -0
  4. data/docs/CreateUSC.md +2 -0
  5. data/docs/GCPPayload.md +5 -1
  6. data/docs/GatewayCreateMigration.md +5 -1
  7. data/docs/GatewayUpdateMigration.md +5 -1
  8. data/docs/GatewayUpdateTlsCert.md +2 -0
  9. data/docs/GeneralConfigPart.md +6 -0
  10. data/docs/GetKubeExecCreds.md +1 -1
  11. data/docs/GetPKICertificate.md +1 -1
  12. data/docs/LetsEncryptTargetDetails.md +38 -0
  13. data/docs/PoliciesCreateOutput.md +18 -0
  14. data/docs/PoliciesDelete.md +24 -0
  15. data/docs/PoliciesGet.md +24 -0
  16. data/docs/PoliciesGetOutput.md +18 -0
  17. data/docs/PoliciesList.md +30 -0
  18. data/docs/PoliciesListOutput.md +18 -0
  19. data/docs/PolicyCreateKeys.md +34 -0
  20. data/docs/PolicyOutput.md +34 -0
  21. data/docs/PolicyUpdateKeys.md +36 -0
  22. data/docs/RotatedSecretCreateAws.md +4 -2
  23. data/docs/RotatedSecretCreateAzure.md +4 -2
  24. data/docs/RotatedSecretCreateCassandra.md +1 -1
  25. data/docs/RotatedSecretCreateCustom.md +1 -1
  26. data/docs/RotatedSecretCreateDockerhub.md +1 -1
  27. data/docs/RotatedSecretCreateGcp.md +4 -2
  28. data/docs/RotatedSecretCreateHanadb.md +1 -1
  29. data/docs/RotatedSecretCreateLdap.md +1 -1
  30. data/docs/RotatedSecretCreateMongodb.md +1 -1
  31. data/docs/RotatedSecretCreateMssql.md +1 -1
  32. data/docs/RotatedSecretCreateMysql.md +1 -1
  33. data/docs/RotatedSecretCreateOpenAI.md +1 -1
  34. data/docs/RotatedSecretCreateOracledb.md +1 -1
  35. data/docs/RotatedSecretCreatePostgresql.md +1 -1
  36. data/docs/RotatedSecretCreateRedis.md +1 -1
  37. data/docs/RotatedSecretCreateRedshift.md +1 -1
  38. data/docs/RotatedSecretCreateSnowflake.md +1 -1
  39. data/docs/RotatedSecretCreateSplunk.md +68 -0
  40. data/docs/RotatedSecretCreateSsh.md +1 -1
  41. data/docs/RotatedSecretCreateWindows.md +1 -1
  42. data/docs/RotatedSecretDetailsInfo.md +2 -0
  43. data/docs/RotatedSecretUpdateAws.md +3 -1
  44. data/docs/RotatedSecretUpdateAzure.md +3 -1
  45. data/docs/RotatedSecretUpdateGcp.md +3 -1
  46. data/docs/RotatedSecretUpdateSplunk.md +64 -0
  47. data/docs/SecretInfo.md +2 -0
  48. data/docs/SplunkPayload.md +30 -0
  49. data/docs/SplunkTargetDetails.md +34 -0
  50. data/docs/TargetCreateLetsEncrypt.md +46 -0
  51. data/docs/TargetCreateSplunk.md +42 -0
  52. data/docs/TargetTypeDetailsInput.md +4 -0
  53. data/docs/TargetUpdateLetsEncrypt.md +50 -0
  54. data/docs/UpdateItem.md +2 -0
  55. data/docs/UscCreate.md +2 -0
  56. data/docs/V2Api.md +659 -29
  57. data/lib/akeyless/api/v2_api.rb +640 -0
  58. data/lib/akeyless/models/certificate_store.rb +12 -1
  59. data/lib/akeyless/models/create_usc.rb +11 -1
  60. data/lib/akeyless/models/gateway_create_migration.rb +24 -4
  61. data/lib/akeyless/models/gateway_update_migration.rb +24 -4
  62. data/lib/akeyless/models/gateway_update_tls_cert.rb +13 -1
  63. data/lib/akeyless/models/gcp_payload.rb +22 -4
  64. data/lib/akeyless/models/general_config_part.rb +30 -1
  65. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  66. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  67. data/lib/akeyless/models/lets_encrypt_target_details.rb +315 -0
  68. data/lib/akeyless/models/policies_create_output.rb +214 -0
  69. data/lib/akeyless/models/policies_delete.rb +254 -0
  70. data/lib/akeyless/models/policies_get.rb +254 -0
  71. data/lib/akeyless/models/policies_get_output.rb +214 -0
  72. data/lib/akeyless/models/policies_list.rb +283 -0
  73. data/lib/akeyless/models/policies_list_output.rb +216 -0
  74. data/lib/akeyless/models/policy_create_keys.rb +312 -0
  75. data/lib/akeyless/models/policy_output.rb +295 -0
  76. data/lib/akeyless/models/policy_update_keys.rb +322 -0
  77. data/lib/akeyless/models/rotated_secret_create_aws.rb +13 -3
  78. data/lib/akeyless/models/rotated_secret_create_azure.rb +13 -3
  79. data/lib/akeyless/models/rotated_secret_create_cassandra.rb +1 -1
  80. data/lib/akeyless/models/rotated_secret_create_custom.rb +1 -1
  81. data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +1 -1
  82. data/lib/akeyless/models/rotated_secret_create_gcp.rb +13 -3
  83. data/lib/akeyless/models/rotated_secret_create_hanadb.rb +1 -1
  84. data/lib/akeyless/models/rotated_secret_create_ldap.rb +1 -1
  85. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +1 -1
  86. data/lib/akeyless/models/rotated_secret_create_mssql.rb +1 -1
  87. data/lib/akeyless/models/rotated_secret_create_mysql.rb +1 -1
  88. data/lib/akeyless/models/rotated_secret_create_open_ai.rb +1 -1
  89. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +1 -1
  90. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +1 -1
  91. data/lib/akeyless/models/rotated_secret_create_redis.rb +1 -1
  92. data/lib/akeyless/models/rotated_secret_create_redshift.rb +1 -1
  93. data/lib/akeyless/models/rotated_secret_create_snowflake.rb +1 -1
  94. data/lib/akeyless/models/rotated_secret_create_splunk.rb +497 -0
  95. data/lib/akeyless/models/rotated_secret_create_ssh.rb +1 -1
  96. data/lib/akeyless/models/rotated_secret_create_windows.rb +1 -1
  97. data/lib/akeyless/models/rotated_secret_details_info.rb +10 -1
  98. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -2
  99. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -2
  100. data/lib/akeyless/models/rotated_secret_update_gcp.rb +12 -2
  101. data/lib/akeyless/models/rotated_secret_update_splunk.rb +467 -0
  102. data/lib/akeyless/models/secret_info.rb +10 -1
  103. data/lib/akeyless/models/splunk_payload.rb +268 -0
  104. data/lib/akeyless/models/splunk_target_details.rb +294 -0
  105. data/lib/akeyless/models/target_create_lets_encrypt.rb +368 -0
  106. data/lib/akeyless/models/target_create_splunk.rb +354 -0
  107. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  108. data/lib/akeyless/models/target_update_lets_encrypt.rb +388 -0
  109. data/lib/akeyless/models/update_item.rb +11 -1
  110. data/lib/akeyless/models/usc_create.rb +11 -1
  111. data/lib/akeyless/version.rb +1 -1
  112. data/lib/akeyless.rb +17 -0
  113. data/spec/models/lets_encrypt_target_details_spec.rb +96 -0
  114. data/spec/models/policies_create_output_spec.rb +36 -0
  115. data/spec/models/policies_delete_spec.rb +54 -0
  116. data/spec/models/policies_get_output_spec.rb +36 -0
  117. data/spec/models/policies_get_spec.rb +54 -0
  118. data/spec/models/policies_list_output_spec.rb +36 -0
  119. data/spec/models/policies_list_spec.rb +72 -0
  120. data/spec/models/policy_create_keys_spec.rb +84 -0
  121. data/spec/models/policy_output_spec.rb +84 -0
  122. data/spec/models/policy_update_keys_spec.rb +90 -0
  123. data/spec/models/rotated_secret_create_splunk_spec.rb +186 -0
  124. data/spec/models/rotated_secret_update_splunk_spec.rb +174 -0
  125. data/spec/models/splunk_payload_spec.rb +72 -0
  126. data/spec/models/splunk_target_details_spec.rb +84 -0
  127. data/spec/models/target_create_lets_encrypt_spec.rb +120 -0
  128. data/spec/models/target_create_splunk_spec.rb +108 -0
  129. data/spec/models/target_update_lets_encrypt_spec.rb +132 -0
  130. metadata +69 -1
@@ -0,0 +1,254 @@
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 PoliciesDelete
18
+ # Policy id
19
+ attr_accessor :id
20
+
21
+ # Set output format to JSON
22
+ attr_accessor :json
23
+
24
+ # Authentication token (see `/auth` and `/configure`)
25
+ attr_accessor :token
26
+
27
+ # The universal identity token, Required only for universal_identity authentication
28
+ attr_accessor :uid_token
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'id' => :'id',
34
+ :'json' => :'json',
35
+ :'token' => :'token',
36
+ :'uid_token' => :'uid-token'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'id' => :'String',
49
+ :'json' => :'Boolean',
50
+ :'token' => :'String',
51
+ :'uid_token' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::PoliciesDelete` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::PoliciesDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'id')
77
+ self.id = attributes[:'id']
78
+ else
79
+ self.id = nil
80
+ end
81
+
82
+ if attributes.key?(:'json')
83
+ self.json = attributes[:'json']
84
+ else
85
+ self.json = false
86
+ end
87
+
88
+ if attributes.key?(:'token')
89
+ self.token = attributes[:'token']
90
+ end
91
+
92
+ if attributes.key?(:'uid_token')
93
+ self.uid_token = attributes[:'uid_token']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @id.nil?
103
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @id.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ id == o.id &&
123
+ json == o.json &&
124
+ token == o.token &&
125
+ uid_token == o.uid_token
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [id, json, token, uid_token].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
+ end
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
+ end
159
+ end
160
+ new(transformed_hash)
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def self._deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = Akeyless.const_get(type)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -0,0 +1,254 @@
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 PoliciesGet
18
+ # Policy id
19
+ attr_accessor :id
20
+
21
+ # Set output format to JSON
22
+ attr_accessor :json
23
+
24
+ # Authentication token (see `/auth` and `/configure`)
25
+ attr_accessor :token
26
+
27
+ # The universal identity token, Required only for universal_identity authentication
28
+ attr_accessor :uid_token
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'id' => :'id',
34
+ :'json' => :'json',
35
+ :'token' => :'token',
36
+ :'uid_token' => :'uid-token'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'id' => :'String',
49
+ :'json' => :'Boolean',
50
+ :'token' => :'String',
51
+ :'uid_token' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::PoliciesGet` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::PoliciesGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'id')
77
+ self.id = attributes[:'id']
78
+ else
79
+ self.id = nil
80
+ end
81
+
82
+ if attributes.key?(:'json')
83
+ self.json = attributes[:'json']
84
+ else
85
+ self.json = false
86
+ end
87
+
88
+ if attributes.key?(:'token')
89
+ self.token = attributes[:'token']
90
+ end
91
+
92
+ if attributes.key?(:'uid_token')
93
+ self.uid_token = attributes[:'uid_token']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @id.nil?
103
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @id.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ id == o.id &&
123
+ json == o.json &&
124
+ token == o.token &&
125
+ uid_token == o.uid_token
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [id, json, token, uid_token].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
+ end
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
+ end
159
+ end
160
+ new(transformed_hash)
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def self._deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = Akeyless.const_get(type)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end