akeyless 3.2.6 → 3.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -1
  3. data/docs/CertAccessRules.md +2 -0
  4. data/docs/CreateAuthMethodCert.md +2 -0
  5. data/docs/CreateCertificate.md +1 -1
  6. data/docs/CreateClassicKey.md +1 -1
  7. data/docs/CreateDynamicSecret.md +1 -1
  8. data/docs/CreateLinkedTarget.md +1 -3
  9. data/docs/CreateRotatedSecret.md +1 -1
  10. data/docs/CreateSecret.md +1 -1
  11. data/docs/CreateWindowsTarget.md +2 -4
  12. data/docs/DecryptFile.md +6 -0
  13. data/docs/DescribeAssoc.md +24 -0
  14. data/docs/EncryptFile.md +0 -2
  15. data/docs/GatewayCreateProducerArtifactory.md +1 -1
  16. data/docs/GatewayCreateProducerAws.md +1 -1
  17. data/docs/GatewayCreateProducerAzure.md +1 -1
  18. data/docs/GatewayCreateProducerCassandra.md +1 -1
  19. data/docs/GatewayCreateProducerCertificateAutomation.md +1 -1
  20. data/docs/GatewayCreateProducerChef.md +1 -1
  21. data/docs/GatewayCreateProducerCustom.md +1 -1
  22. data/docs/GatewayCreateProducerDockerhub.md +1 -1
  23. data/docs/GatewayCreateProducerEks.md +1 -1
  24. data/docs/GatewayCreateProducerGcp.md +1 -1
  25. data/docs/GatewayCreateProducerGke.md +1 -1
  26. data/docs/GatewayCreateProducerHanaDb.md +1 -1
  27. data/docs/GatewayCreateProducerLdap.md +1 -1
  28. data/docs/GatewayCreateProducerMSSQL.md +1 -1
  29. data/docs/GatewayCreateProducerMongo.md +1 -1
  30. data/docs/GatewayCreateProducerMySQL.md +1 -1
  31. data/docs/GatewayCreateProducerNativeK8S.md +1 -1
  32. data/docs/GatewayCreateProducerOracleDb.md +1 -1
  33. data/docs/GatewayCreateProducerPing.md +1 -1
  34. data/docs/GatewayCreateProducerPostgreSQL.md +1 -1
  35. data/docs/GatewayCreateProducerRabbitMQ.md +1 -1
  36. data/docs/GatewayCreateProducerRdp.md +1 -1
  37. data/docs/GatewayCreateProducerRedshift.md +1 -1
  38. data/docs/GatewayCreateProducerSnowflake.md +1 -1
  39. data/docs/GatewayDownloadCustomerFragments.md +22 -0
  40. data/docs/GatewayDownloadCustomerFragmentsOutput.md +18 -0
  41. data/docs/GatewayUpdateProducerArtifactory.md +1 -1
  42. data/docs/GatewayUpdateProducerAws.md +1 -1
  43. data/docs/GatewayUpdateProducerAzure.md +1 -1
  44. data/docs/GatewayUpdateProducerCassandra.md +1 -1
  45. data/docs/GatewayUpdateProducerCertificateAutomation.md +1 -1
  46. data/docs/GatewayUpdateProducerChef.md +1 -1
  47. data/docs/GatewayUpdateProducerCustom.md +1 -1
  48. data/docs/GatewayUpdateProducerDockerhub.md +1 -1
  49. data/docs/GatewayUpdateProducerEks.md +1 -1
  50. data/docs/GatewayUpdateProducerGcp.md +1 -1
  51. data/docs/GatewayUpdateProducerGke.md +1 -1
  52. data/docs/GatewayUpdateProducerHanaDb.md +1 -1
  53. data/docs/GatewayUpdateProducerLdap.md +1 -1
  54. data/docs/GatewayUpdateProducerMSSQL.md +1 -1
  55. data/docs/GatewayUpdateProducerMongo.md +1 -1
  56. data/docs/GatewayUpdateProducerMySQL.md +1 -1
  57. data/docs/GatewayUpdateProducerNativeK8S.md +1 -1
  58. data/docs/GatewayUpdateProducerOracleDb.md +1 -1
  59. data/docs/GatewayUpdateProducerPing.md +1 -1
  60. data/docs/GatewayUpdateProducerPostgreSQL.md +1 -1
  61. data/docs/GatewayUpdateProducerRabbitMQ.md +1 -1
  62. data/docs/GatewayUpdateProducerRdp.md +1 -1
  63. data/docs/GatewayUpdateProducerRedshift.md +1 -1
  64. data/docs/GatewayUpdateProducerSnowflake.md +1 -1
  65. data/docs/GeneralConfigPart.md +2 -0
  66. data/docs/ImportPasswords.md +32 -0
  67. data/docs/ImportPasswordsOutput.md +22 -0
  68. data/docs/Item.md +2 -0
  69. data/docs/LinkedDetails.md +18 -0
  70. data/docs/RoleAssociationDetails.md +26 -0
  71. data/docs/TargetTypeDetailsInput.md +1 -3
  72. data/docs/UpdateAuthMethodCert.md +2 -0
  73. data/docs/UpdateLinkedTarget.md +2 -4
  74. data/docs/UpdateWindowsTarget.md +2 -4
  75. data/docs/V2Api.md +191 -2
  76. data/lib/akeyless/api/v2_api.rb +192 -0
  77. data/lib/akeyless/models/cert_access_rules.rb +13 -1
  78. data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
  79. data/lib/akeyless/models/create_certificate.rb +1 -1
  80. data/lib/akeyless/models/create_classic_key.rb +1 -1
  81. data/lib/akeyless/models/create_dynamic_secret.rb +1 -1
  82. data/lib/akeyless/models/create_linked_target.rb +2 -17
  83. data/lib/akeyless/models/create_rotated_secret.rb +1 -1
  84. data/lib/akeyless/models/create_secret.rb +1 -1
  85. data/lib/akeyless/models/create_windows_target.rb +9 -19
  86. data/lib/akeyless/models/decrypt_file.rb +35 -1
  87. data/lib/akeyless/models/describe_assoc.rb +257 -0
  88. data/lib/akeyless/models/encrypt_file.rb +1 -13
  89. data/lib/akeyless/models/gateway_create_producer_artifactory.rb +1 -1
  90. data/lib/akeyless/models/gateway_create_producer_aws.rb +1 -1
  91. data/lib/akeyless/models/gateway_create_producer_azure.rb +1 -1
  92. data/lib/akeyless/models/gateway_create_producer_cassandra.rb +1 -1
  93. data/lib/akeyless/models/gateway_create_producer_certificate_automation.rb +1 -1
  94. data/lib/akeyless/models/gateway_create_producer_chef.rb +1 -1
  95. data/lib/akeyless/models/gateway_create_producer_custom.rb +1 -1
  96. data/lib/akeyless/models/gateway_create_producer_dockerhub.rb +1 -1
  97. data/lib/akeyless/models/gateway_create_producer_eks.rb +1 -1
  98. data/lib/akeyless/models/gateway_create_producer_gcp.rb +1 -1
  99. data/lib/akeyless/models/gateway_create_producer_gke.rb +1 -1
  100. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +1 -1
  101. data/lib/akeyless/models/gateway_create_producer_ldap.rb +1 -1
  102. data/lib/akeyless/models/gateway_create_producer_mongo.rb +1 -1
  103. data/lib/akeyless/models/gateway_create_producer_mssql.rb +1 -1
  104. data/lib/akeyless/models/gateway_create_producer_my_sql.rb +1 -1
  105. data/lib/akeyless/models/gateway_create_producer_native_k8_s.rb +1 -1
  106. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +1 -1
  107. data/lib/akeyless/models/gateway_create_producer_ping.rb +1 -1
  108. data/lib/akeyless/models/gateway_create_producer_postgre_sql.rb +1 -1
  109. data/lib/akeyless/models/gateway_create_producer_rabbit_mq.rb +1 -1
  110. data/lib/akeyless/models/gateway_create_producer_rdp.rb +1 -1
  111. data/lib/akeyless/models/gateway_create_producer_redshift.rb +1 -1
  112. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +1 -1
  113. data/lib/akeyless/models/gateway_download_customer_fragments.rb +243 -0
  114. data/lib/akeyless/models/gateway_download_customer_fragments_output.rb +221 -0
  115. data/lib/akeyless/models/gateway_update_producer_artifactory.rb +1 -1
  116. data/lib/akeyless/models/gateway_update_producer_aws.rb +1 -1
  117. data/lib/akeyless/models/gateway_update_producer_azure.rb +1 -1
  118. data/lib/akeyless/models/gateway_update_producer_cassandra.rb +1 -1
  119. data/lib/akeyless/models/gateway_update_producer_certificate_automation.rb +1 -1
  120. data/lib/akeyless/models/gateway_update_producer_chef.rb +1 -1
  121. data/lib/akeyless/models/gateway_update_producer_custom.rb +1 -1
  122. data/lib/akeyless/models/gateway_update_producer_dockerhub.rb +1 -1
  123. data/lib/akeyless/models/gateway_update_producer_eks.rb +1 -1
  124. data/lib/akeyless/models/gateway_update_producer_gcp.rb +1 -1
  125. data/lib/akeyless/models/gateway_update_producer_gke.rb +1 -1
  126. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
  127. data/lib/akeyless/models/gateway_update_producer_ldap.rb +1 -1
  128. data/lib/akeyless/models/gateway_update_producer_mongo.rb +1 -1
  129. data/lib/akeyless/models/gateway_update_producer_mssql.rb +1 -1
  130. data/lib/akeyless/models/gateway_update_producer_my_sql.rb +1 -1
  131. data/lib/akeyless/models/gateway_update_producer_native_k8_s.rb +1 -1
  132. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +1 -1
  133. data/lib/akeyless/models/gateway_update_producer_ping.rb +1 -1
  134. data/lib/akeyless/models/gateway_update_producer_postgre_sql.rb +1 -1
  135. data/lib/akeyless/models/gateway_update_producer_rabbit_mq.rb +1 -1
  136. data/lib/akeyless/models/gateway_update_producer_rdp.rb +1 -1
  137. data/lib/akeyless/models/gateway_update_producer_redshift.rb +1 -1
  138. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +1 -1
  139. data/lib/akeyless/models/general_config_part.rb +10 -1
  140. data/lib/akeyless/models/import_passwords.rb +304 -0
  141. data/lib/akeyless/models/import_passwords_output.rb +237 -0
  142. data/lib/akeyless/models/item.rb +10 -1
  143. data/lib/akeyless/models/linked_details.rb +221 -0
  144. data/lib/akeyless/models/role_association_details.rb +258 -0
  145. data/lib/akeyless/models/target_type_details_input.rb +3 -12
  146. data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
  147. data/lib/akeyless/models/update_linked_target.rb +3 -18
  148. data/lib/akeyless/models/update_windows_target.rb +9 -19
  149. data/lib/akeyless/version.rb +1 -1
  150. data/lib/akeyless.rb +7 -0
  151. data/spec/models/describe_assoc_spec.rb +52 -0
  152. data/spec/models/gateway_download_customer_fragments_output_spec.rb +34 -0
  153. data/spec/models/gateway_download_customer_fragments_spec.rb +46 -0
  154. data/spec/models/import_passwords_output_spec.rb +46 -0
  155. data/spec/models/import_passwords_spec.rb +76 -0
  156. data/spec/models/linked_details_spec.rb +34 -0
  157. data/spec/models/role_association_details_spec.rb +58 -0
  158. metadata +30 -2
@@ -0,0 +1,237 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class ImportPasswordsOutput
18
+ attr_accessor :imported
19
+
20
+ attr_accessor :passwords_in_file
21
+
22
+ attr_accessor :successfully_parsed
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'imported' => :'imported',
28
+ :'passwords_in_file' => :'passwords_in_file',
29
+ :'successfully_parsed' => :'successfully_parsed'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'imported' => :'Integer',
42
+ :'passwords_in_file' => :'Integer',
43
+ :'successfully_parsed' => :'Integer'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ImportPasswordsOutput` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ImportPasswordsOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'imported')
69
+ self.imported = attributes[:'imported']
70
+ end
71
+
72
+ if attributes.key?(:'passwords_in_file')
73
+ self.passwords_in_file = attributes[:'passwords_in_file']
74
+ end
75
+
76
+ if attributes.key?(:'successfully_parsed')
77
+ self.successfully_parsed = attributes[:'successfully_parsed']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ imported == o.imported &&
100
+ passwords_in_file == o.passwords_in_file &&
101
+ successfully_parsed == o.successfully_parsed
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [imported, passwords_in_file, successfully_parsed].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = Akeyless.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -72,6 +72,8 @@ module Akeyless
72
72
 
73
73
  attr_accessor :last_version
74
74
 
75
+ attr_accessor :linked_details
76
+
75
77
  attr_accessor :modification_date
76
78
 
77
79
  attr_accessor :next_rotation_date
@@ -121,6 +123,7 @@ module Akeyless
121
123
  :'item_type' => :'item_type',
122
124
  :'item_versions' => :'item_versions',
123
125
  :'last_version' => :'last_version',
126
+ :'linked_details' => :'linked_details',
124
127
  :'modification_date' => :'modification_date',
125
128
  :'next_rotation_date' => :'next_rotation_date',
126
129
  :'protection_key_name' => :'protection_key_name',
@@ -169,6 +172,7 @@ module Akeyless
169
172
  :'item_type' => :'String',
170
173
  :'item_versions' => :'Array<ItemVersion>',
171
174
  :'last_version' => :'Integer',
175
+ :'linked_details' => :'LinkedDetails',
172
176
  :'modification_date' => :'Time',
173
177
  :'next_rotation_date' => :'Time',
174
178
  :'protection_key_name' => :'String',
@@ -324,6 +328,10 @@ module Akeyless
324
328
  self.last_version = attributes[:'last_version']
325
329
  end
326
330
 
331
+ if attributes.key?(:'linked_details')
332
+ self.linked_details = attributes[:'linked_details']
333
+ end
334
+
327
335
  if attributes.key?(:'modification_date')
328
336
  self.modification_date = attributes[:'modification_date']
329
337
  end
@@ -409,6 +417,7 @@ module Akeyless
409
417
  item_type == o.item_type &&
410
418
  item_versions == o.item_versions &&
411
419
  last_version == o.last_version &&
420
+ linked_details == o.linked_details &&
412
421
  modification_date == o.modification_date &&
413
422
  next_rotation_date == o.next_rotation_date &&
414
423
  protection_key_name == o.protection_key_name &&
@@ -429,7 +438,7 @@ module Akeyless
429
438
  # Calculates hash code according to all attributes.
430
439
  # @return [Integer] Hash code
431
440
  def hash
432
- [access_date, access_request_status, auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, gateway_details, is_access_request_enabled, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, with_customer_fragment].hash
441
+ [access_date, access_request_status, auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, gateway_details, is_access_request_enabled, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, linked_details, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, with_customer_fragment].hash
433
442
  end
434
443
 
435
444
  # Builds the object from hash
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class LinkedDetails
18
+ attr_accessor :hosts
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'hosts' => :'hosts'
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
+ :'hosts' => :'Hash<String, 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::LinkedDetails` 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::LinkedDetails`. 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?(:'hosts')
61
+ if (value = attributes[:'hosts']).is_a?(Hash)
62
+ self.hosts = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
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
+ hosts == o.hosts
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
+ [hosts].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
+ new.build_from_hash(attributes)
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{key}=", nil)
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = Akeyless.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end