akeyless 5.0.20 → 5.0.22

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 (188) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -1
  3. data/docs/AccountGeneralSettings.md +2 -0
  4. data/docs/ActiveDirectoryPayload.md +6 -0
  5. data/docs/Auth.md +2 -0
  6. data/docs/AuthMethodCreateCert.md +2 -0
  7. data/docs/AuthMethodUpdateCert.md +2 -0
  8. data/docs/AzureADAccessRules.md +2 -0
  9. data/docs/AzureTargetDetails.md +2 -0
  10. data/docs/CertAccessRules.md +2 -0
  11. data/docs/CertificateChainInfo.md +2 -0
  12. data/docs/Configure.md +2 -0
  13. data/docs/ConjurMigration.md +20 -0
  14. data/docs/ConjurPayload.md +24 -0
  15. data/docs/CreateAuthMethodCert.md +2 -0
  16. data/docs/CreateAzureTarget.md +2 -0
  17. data/docs/CreateUSC.md +10 -0
  18. data/docs/DSProducerDetails.md +2 -0
  19. data/docs/DefaultAuthMethodSettings.md +20 -0
  20. data/docs/GCPPayload.md +5 -1
  21. data/docs/GatewayCreateMigration.md +20 -2
  22. data/docs/GatewayUpdateMigration.md +19 -1
  23. data/docs/GetPKICertificateOutput.md +2 -0
  24. data/docs/GithubMetadata.md +28 -0
  25. data/docs/HTTPChallengeInfo.md +26 -0
  26. data/docs/IssuerOverviewInfo.md +22 -0
  27. data/docs/ItemGeneralInfo.md +2 -0
  28. data/docs/LetsEncryptTargetDetails.md +38 -0
  29. data/docs/MigrationStatusReplyObj.md +2 -0
  30. data/docs/MigrationsConfigPart.md +2 -0
  31. data/docs/PoliciesCreateOutput.md +18 -0
  32. data/docs/PoliciesDelete.md +24 -0
  33. data/docs/PoliciesGet.md +24 -0
  34. data/docs/PoliciesGetOutput.md +18 -0
  35. data/docs/PoliciesList.md +30 -0
  36. data/docs/PoliciesListOutput.md +18 -0
  37. data/docs/PolicyCreateKeys.md +34 -0
  38. data/docs/PolicyOutput.md +34 -0
  39. data/docs/PolicyUpdateKeys.md +36 -0
  40. data/docs/RotatedSecretCreateAws.md +4 -2
  41. data/docs/RotatedSecretCreateAzure.md +4 -2
  42. data/docs/RotatedSecretCreateCassandra.md +1 -1
  43. data/docs/RotatedSecretCreateCustom.md +1 -1
  44. data/docs/RotatedSecretCreateDockerhub.md +1 -1
  45. data/docs/RotatedSecretCreateGcp.md +4 -2
  46. data/docs/RotatedSecretCreateHanadb.md +1 -1
  47. data/docs/RotatedSecretCreateLdap.md +1 -1
  48. data/docs/RotatedSecretCreateMongodb.md +1 -1
  49. data/docs/RotatedSecretCreateMssql.md +1 -1
  50. data/docs/RotatedSecretCreateMysql.md +1 -1
  51. data/docs/RotatedSecretCreateOpenAI.md +1 -1
  52. data/docs/RotatedSecretCreateOracledb.md +1 -1
  53. data/docs/RotatedSecretCreatePostgresql.md +1 -1
  54. data/docs/RotatedSecretCreateRedis.md +1 -1
  55. data/docs/RotatedSecretCreateRedshift.md +1 -1
  56. data/docs/RotatedSecretCreateSnowflake.md +1 -1
  57. data/docs/RotatedSecretCreateSplunk.md +68 -0
  58. data/docs/RotatedSecretCreateSsh.md +1 -1
  59. data/docs/RotatedSecretCreateWindows.md +1 -1
  60. data/docs/RotatedSecretDetailsInfo.md +2 -0
  61. data/docs/RotatedSecretUpdateAws.md +3 -1
  62. data/docs/RotatedSecretUpdateAzure.md +3 -1
  63. data/docs/RotatedSecretUpdateGcp.md +3 -1
  64. data/docs/RotatedSecretUpdateSplunk.md +64 -0
  65. data/docs/SecretInfo.md +2 -0
  66. data/docs/SplunkPayload.md +30 -0
  67. data/docs/SplunkTargetDetails.md +34 -0
  68. data/docs/TargetCreateAzure.md +2 -0
  69. data/docs/TargetCreateLetsEncrypt.md +46 -0
  70. data/docs/TargetCreateSplunk.md +42 -0
  71. data/docs/TargetTypeDetailsInput.md +4 -0
  72. data/docs/TargetUpdateAzure.md +2 -0
  73. data/docs/TargetUpdateLetsEncrypt.md +50 -0
  74. data/docs/UpdateAuthMethodCert.md +2 -0
  75. data/docs/UpdateAzureTarget.md +2 -0
  76. data/docs/V2Api.md +756 -0
  77. data/docs/ValidateCertificateChallenge.md +30 -0
  78. data/docs/ValidateCertificateChallengeOutput.md +24 -0
  79. data/docs/VaultAddress.md +20 -0
  80. data/docs/VaultAddressOutput.md +20 -0
  81. data/lib/akeyless/api/v2_api.rb +775 -7
  82. data/lib/akeyless/models/account_general_settings.rb +10 -1
  83. data/lib/akeyless/models/active_directory_payload.rb +30 -1
  84. data/lib/akeyless/models/auth.rb +13 -1
  85. data/lib/akeyless/models/auth_method_create_cert.rb +11 -1
  86. data/lib/akeyless/models/auth_method_update_cert.rb +11 -1
  87. data/lib/akeyless/models/azure_ad_access_rules.rb +11 -1
  88. data/lib/akeyless/models/azure_target_details.rb +10 -1
  89. data/lib/akeyless/models/cert_access_rules.rb +11 -1
  90. data/lib/akeyless/models/certificate_chain_info.rb +11 -1
  91. data/lib/akeyless/models/configure.rb +13 -1
  92. data/lib/akeyless/models/conjur_migration.rb +223 -0
  93. data/lib/akeyless/models/conjur_payload.rb +241 -0
  94. data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
  95. data/lib/akeyless/models/create_azure_target.rb +13 -1
  96. data/lib/akeyless/models/create_usc.rb +54 -1
  97. data/lib/akeyless/models/default_auth_method_settings.rb +223 -0
  98. data/lib/akeyless/models/ds_producer_details.rb +10 -1
  99. data/lib/akeyless/models/gateway_create_migration.rb +97 -5
  100. data/lib/akeyless/models/gateway_update_migration.rb +96 -4
  101. data/lib/akeyless/models/gcp_payload.rb +22 -4
  102. data/lib/akeyless/models/get_pki_certificate_output.rb +10 -1
  103. data/lib/akeyless/models/github_metadata.rb +259 -0
  104. data/lib/akeyless/models/http_challenge_info.rb +251 -0
  105. data/lib/akeyless/models/issuer_overview_info.rb +232 -0
  106. data/lib/akeyless/models/item_general_info.rb +10 -1
  107. data/lib/akeyless/models/lets_encrypt_target_details.rb +315 -0
  108. data/lib/akeyless/models/migration_status_reply_obj.rb +10 -1
  109. data/lib/akeyless/models/migrations_config_part.rb +12 -1
  110. data/lib/akeyless/models/policies_create_output.rb +214 -0
  111. data/lib/akeyless/models/policies_delete.rb +254 -0
  112. data/lib/akeyless/models/policies_get.rb +254 -0
  113. data/lib/akeyless/models/policies_get_output.rb +214 -0
  114. data/lib/akeyless/models/policies_list.rb +283 -0
  115. data/lib/akeyless/models/policies_list_output.rb +216 -0
  116. data/lib/akeyless/models/policy_create_keys.rb +312 -0
  117. data/lib/akeyless/models/policy_output.rb +295 -0
  118. data/lib/akeyless/models/policy_update_keys.rb +322 -0
  119. data/lib/akeyless/models/rotated_secret_create_aws.rb +13 -3
  120. data/lib/akeyless/models/rotated_secret_create_azure.rb +13 -3
  121. data/lib/akeyless/models/rotated_secret_create_cassandra.rb +1 -1
  122. data/lib/akeyless/models/rotated_secret_create_custom.rb +1 -1
  123. data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +1 -1
  124. data/lib/akeyless/models/rotated_secret_create_gcp.rb +13 -3
  125. data/lib/akeyless/models/rotated_secret_create_hanadb.rb +1 -1
  126. data/lib/akeyless/models/rotated_secret_create_ldap.rb +1 -1
  127. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +1 -1
  128. data/lib/akeyless/models/rotated_secret_create_mssql.rb +1 -1
  129. data/lib/akeyless/models/rotated_secret_create_mysql.rb +1 -1
  130. data/lib/akeyless/models/rotated_secret_create_open_ai.rb +1 -1
  131. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +1 -1
  132. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +1 -1
  133. data/lib/akeyless/models/rotated_secret_create_redis.rb +1 -1
  134. data/lib/akeyless/models/rotated_secret_create_redshift.rb +1 -1
  135. data/lib/akeyless/models/rotated_secret_create_snowflake.rb +1 -1
  136. data/lib/akeyless/models/rotated_secret_create_splunk.rb +497 -0
  137. data/lib/akeyless/models/rotated_secret_create_ssh.rb +1 -1
  138. data/lib/akeyless/models/rotated_secret_create_windows.rb +1 -1
  139. data/lib/akeyless/models/rotated_secret_details_info.rb +10 -1
  140. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -2
  141. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -2
  142. data/lib/akeyless/models/rotated_secret_update_gcp.rb +12 -2
  143. data/lib/akeyless/models/rotated_secret_update_splunk.rb +467 -0
  144. data/lib/akeyless/models/secret_info.rb +10 -1
  145. data/lib/akeyless/models/splunk_payload.rb +268 -0
  146. data/lib/akeyless/models/splunk_target_details.rb +294 -0
  147. data/lib/akeyless/models/target_create_azure.rb +13 -1
  148. data/lib/akeyless/models/target_create_lets_encrypt.rb +368 -0
  149. data/lib/akeyless/models/target_create_splunk.rb +354 -0
  150. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  151. data/lib/akeyless/models/target_update_azure.rb +13 -1
  152. data/lib/akeyless/models/target_update_lets_encrypt.rb +388 -0
  153. data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
  154. data/lib/akeyless/models/update_azure_target.rb +13 -1
  155. data/lib/akeyless/models/validate_certificate_challenge.rb +279 -0
  156. data/lib/akeyless/models/validate_certificate_challenge_output.rb +242 -0
  157. data/lib/akeyless/models/vault_address.rb +227 -0
  158. data/lib/akeyless/models/vault_address_output.rb +223 -0
  159. data/lib/akeyless/version.rb +1 -1
  160. data/lib/akeyless.rb +27 -0
  161. data/spec/models/conjur_migration_spec.rb +42 -0
  162. data/spec/models/conjur_payload_spec.rb +54 -0
  163. data/spec/models/default_auth_method_settings_spec.rb +42 -0
  164. data/spec/models/github_metadata_spec.rb +66 -0
  165. data/spec/models/http_challenge_info_spec.rb +60 -0
  166. data/spec/models/issuer_overview_info_spec.rb +48 -0
  167. data/spec/models/lets_encrypt_target_details_spec.rb +96 -0
  168. data/spec/models/policies_create_output_spec.rb +36 -0
  169. data/spec/models/policies_delete_spec.rb +54 -0
  170. data/spec/models/policies_get_output_spec.rb +36 -0
  171. data/spec/models/policies_get_spec.rb +54 -0
  172. data/spec/models/policies_list_output_spec.rb +36 -0
  173. data/spec/models/policies_list_spec.rb +72 -0
  174. data/spec/models/policy_create_keys_spec.rb +84 -0
  175. data/spec/models/policy_output_spec.rb +84 -0
  176. data/spec/models/policy_update_keys_spec.rb +90 -0
  177. data/spec/models/rotated_secret_create_splunk_spec.rb +186 -0
  178. data/spec/models/rotated_secret_update_splunk_spec.rb +174 -0
  179. data/spec/models/splunk_payload_spec.rb +72 -0
  180. data/spec/models/splunk_target_details_spec.rb +84 -0
  181. data/spec/models/target_create_lets_encrypt_spec.rb +120 -0
  182. data/spec/models/target_create_splunk_spec.rb +108 -0
  183. data/spec/models/target_update_lets_encrypt_spec.rb +132 -0
  184. data/spec/models/validate_certificate_challenge_output_spec.rb +54 -0
  185. data/spec/models/validate_certificate_challenge_spec.rb +72 -0
  186. data/spec/models/vault_address_output_spec.rb +42 -0
  187. data/spec/models/vault_address_spec.rb +42 -0
  188. metadata +109 -1
@@ -0,0 +1,223 @@
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 ConjurMigration
18
+ attr_accessor :general
19
+
20
+ attr_accessor :payload
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'general' => :'general',
26
+ :'payload' => :'payload'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'general' => :'MigrationGeneral',
39
+ :'payload' => :'ConjurPayload'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ConjurMigration` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ConjurMigration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'general')
65
+ self.general = attributes[:'general']
66
+ end
67
+
68
+ if attributes.key?(:'payload')
69
+ self.payload = attributes[:'payload']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ general == o.general &&
94
+ payload == o.payload
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [general, payload].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
+ end
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
128
+ end
129
+ new(transformed_hash)
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def self._deserialize(type, value)
137
+ case type.to_sym
138
+ when :Time
139
+ Time.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value.to_s
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :Boolean
149
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ # models (e.g. Pet) or oneOf
170
+ klass = Akeyless.const_get(type)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -0,0 +1,241 @@
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 ConjurPayload
18
+ attr_accessor :conjur_account
19
+
20
+ attr_accessor :conjur_api_key
21
+
22
+ attr_accessor :conjur_url
23
+
24
+ attr_accessor :conjur_username
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'conjur_account' => :'conjur_account',
30
+ :'conjur_api_key' => :'conjur_api_key',
31
+ :'conjur_url' => :'conjur_url',
32
+ :'conjur_username' => :'conjur_username'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'conjur_account' => :'String',
45
+ :'conjur_api_key' => :'String',
46
+ :'conjur_url' => :'String',
47
+ :'conjur_username' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ConjurPayload` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ConjurPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'conjur_account')
73
+ self.conjur_account = attributes[:'conjur_account']
74
+ end
75
+
76
+ if attributes.key?(:'conjur_api_key')
77
+ self.conjur_api_key = attributes[:'conjur_api_key']
78
+ end
79
+
80
+ if attributes.key?(:'conjur_url')
81
+ self.conjur_url = attributes[:'conjur_url']
82
+ end
83
+
84
+ if attributes.key?(:'conjur_username')
85
+ self.conjur_username = attributes[:'conjur_username']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ conjur_account == o.conjur_account &&
110
+ conjur_api_key == o.conjur_api_key &&
111
+ conjur_url == o.conjur_url &&
112
+ conjur_username == o.conjur_username
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [conjur_account, conjur_api_key, conjur_url, conjur_username].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def self._deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = Akeyless.const_get(type)
189
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -79,6 +79,9 @@ module Akeyless
79
79
  # Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
80
80
  attr_accessor :product_type
81
81
 
82
+ # Require certificate CRL distribution points (CDP) and enforce CRL validation during authentication.
83
+ attr_accessor :require_crl_dp
84
+
82
85
  # A list of revoked cert ids
83
86
  attr_accessor :revoked_cert_ids
84
87
 
@@ -115,6 +118,7 @@ module Akeyless
115
118
  :'jwt_ttl' => :'jwt-ttl',
116
119
  :'name' => :'name',
117
120
  :'product_type' => :'product-type',
121
+ :'require_crl_dp' => :'require-crl-dp',
118
122
  :'revoked_cert_ids' => :'revoked-cert-ids',
119
123
  :'token' => :'token',
120
124
  :'uid_token' => :'uid-token',
@@ -151,6 +155,7 @@ module Akeyless
151
155
  :'jwt_ttl' => :'Integer',
152
156
  :'name' => :'String',
153
157
  :'product_type' => :'Array<String>',
158
+ :'require_crl_dp' => :'Boolean',
154
159
  :'revoked_cert_ids' => :'Array<String>',
155
160
  :'token' => :'String',
156
161
  :'uid_token' => :'String',
@@ -295,6 +300,10 @@ module Akeyless
295
300
  end
296
301
  end
297
302
 
303
+ if attributes.key?(:'require_crl_dp')
304
+ self.require_crl_dp = attributes[:'require_crl_dp']
305
+ end
306
+
298
307
  if attributes.key?(:'revoked_cert_ids')
299
308
  if (value = attributes[:'revoked_cert_ids']).is_a?(Array)
300
309
  self.revoked_cert_ids = value
@@ -367,6 +376,7 @@ module Akeyless
367
376
  jwt_ttl == o.jwt_ttl &&
368
377
  name == o.name &&
369
378
  product_type == o.product_type &&
379
+ require_crl_dp == o.require_crl_dp &&
370
380
  revoked_cert_ids == o.revoked_cert_ids &&
371
381
  token == o.token &&
372
382
  uid_token == o.uid_token &&
@@ -382,7 +392,7 @@ module Akeyless
382
392
  # Calculates hash code according to all attributes.
383
393
  # @return [Integer] Hash code
384
394
  def hash
385
- [access_expires, allowed_client_type, allowed_cors, audit_logs_claims, bound_common_names, bound_dns_sans, bound_email_sans, bound_extensions, bound_ips, bound_organizational_units, bound_uri_sans, certificate_data, delete_protection, description, expiration_event_in, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, product_type, revoked_cert_ids, token, uid_token, unique_identifier].hash
395
+ [access_expires, allowed_client_type, allowed_cors, audit_logs_claims, bound_common_names, bound_dns_sans, bound_email_sans, bound_extensions, bound_ips, bound_organizational_units, bound_uri_sans, certificate_data, delete_protection, description, expiration_event_in, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, product_type, require_crl_dp, revoked_cert_ids, token, uid_token, unique_identifier].hash
386
396
  end
387
397
 
388
398
  # Builds the object from hash
@@ -16,6 +16,9 @@ require 'time'
16
16
  module Akeyless
17
17
  # createAzureTarget is a command that creates a new target. [Deprecated: Use target-create-azure command]
18
18
  class CreateAzureTarget
19
+ # Azure cloud environment to use. Values: AzureCloud (default), AzureUSGovernment, AzureChinaCloud.
20
+ attr_accessor :azure_cloud
21
+
19
22
  # Azure client/application id
20
23
  attr_accessor :client_id
21
24
 
@@ -67,6 +70,7 @@ module Akeyless
67
70
  # Attribute mapping from ruby-style variable name to JSON key.
68
71
  def self.attribute_map
69
72
  {
73
+ :'azure_cloud' => :'azure-cloud',
70
74
  :'client_id' => :'client-id',
71
75
  :'client_secret' => :'client-secret',
72
76
  :'comment' => :'comment',
@@ -94,6 +98,7 @@ module Akeyless
94
98
  # Attribute type mapping.
95
99
  def self.openapi_types
96
100
  {
101
+ :'azure_cloud' => :'String',
97
102
  :'client_id' => :'String',
98
103
  :'client_secret' => :'String',
99
104
  :'comment' => :'String',
@@ -134,6 +139,12 @@ module Akeyless
134
139
  h[k.to_sym] = v
135
140
  }
136
141
 
142
+ if attributes.key?(:'azure_cloud')
143
+ self.azure_cloud = attributes[:'azure_cloud']
144
+ else
145
+ self.azure_cloud = 'AzureCloud'
146
+ end
147
+
137
148
  if attributes.key?(:'client_id')
138
149
  self.client_id = attributes[:'client_id']
139
150
  end
@@ -230,6 +241,7 @@ module Akeyless
230
241
  def ==(o)
231
242
  return true if self.equal?(o)
232
243
  self.class == o.class &&
244
+ azure_cloud == o.azure_cloud &&
233
245
  client_id == o.client_id &&
234
246
  client_secret == o.client_secret &&
235
247
  comment == o.comment &&
@@ -257,7 +269,7 @@ module Akeyless
257
269
  # Calculates hash code according to all attributes.
258
270
  # @return [Integer] Hash code
259
271
  def hash
260
- [client_id, client_secret, comment, connection_type, description, json, key, max_versions, name, resource_group_name, resource_name, subscription_id, tenant_id, token, uid_token, use_gw_cloud_identity].hash
272
+ [azure_cloud, client_id, client_secret, comment, connection_type, description, json, key, max_versions, name, resource_group_name, resource_name, subscription_id, tenant_id, token, uid_token, use_gw_cloud_identity].hash
261
273
  end
262
274
 
263
275
  # Builds the object from hash