akeyless 3.1.2 → 3.2.1

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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/docs/CreateAWSTarget.md +3 -1
  4. data/docs/CreateArtifactoryTarget.md +3 -1
  5. data/docs/CreateAzureTarget.md +3 -1
  6. data/docs/CreateDBTarget.md +3 -1
  7. data/docs/CreateDockerhubTarget.md +3 -1
  8. data/docs/CreateEKSTarget.md +3 -1
  9. data/docs/CreateEventForwarder.md +3 -1
  10. data/docs/CreateGKETarget.md +3 -1
  11. data/docs/CreateGcpTarget.md +3 -1
  12. data/docs/CreateGithubTarget.md +3 -1
  13. data/docs/CreateLdapTarget.md +3 -1
  14. data/docs/CreateNativeK8STarget.md +3 -1
  15. data/docs/CreatePingTarget.md +40 -0
  16. data/docs/CreatePingTargetOutput.md +18 -0
  17. data/docs/CreateRabbitMQTarget.md +3 -1
  18. data/docs/CreateRole.md +3 -1
  19. data/docs/CreateRotatedSecret.md +2 -0
  20. data/docs/CreateSSHTarget.md +3 -1
  21. data/docs/CreateSalesforceTarget.md +3 -1
  22. data/docs/CreateWebTarget.md +3 -1
  23. data/docs/DSProducerDetails.md +40 -0
  24. data/docs/GatewayCreateProducerEks.md +1 -1
  25. data/docs/GatewayCreateProducerPing.md +66 -0
  26. data/docs/GatewayCreateProducerPingOutput.md +18 -0
  27. data/docs/GatewayUpdateProducerEks.md +1 -1
  28. data/docs/GatewayUpdateProducerPing.md +68 -0
  29. data/docs/GatewayUpdateProducerPingOutput.md +18 -0
  30. data/docs/GetKubeExecCreds.md +5 -3
  31. data/docs/GetPKICertificate.md +5 -3
  32. data/docs/ImporterInfo.md +20 -0
  33. data/docs/ItemGeneralInfo.md +2 -0
  34. data/docs/RequestAccess.md +3 -1
  35. data/docs/SecureRemoteAccess.md +2 -0
  36. data/docs/TargetTypeDetailsInput.md +10 -0
  37. data/docs/UidCreateChildToken.md +3 -1
  38. data/docs/UpdateAWSTarget.md +3 -1
  39. data/docs/UpdateArtifactoryTarget.md +3 -1
  40. data/docs/UpdateAzureTarget.md +3 -1
  41. data/docs/UpdateDBTarget.md +3 -1
  42. data/docs/UpdateDockerhubTarget.md +3 -1
  43. data/docs/UpdateEKSTarget.md +3 -1
  44. data/docs/UpdateEventForwarder.md +3 -1
  45. data/docs/UpdateGKETarget.md +3 -1
  46. data/docs/UpdateGcpTarget.md +3 -1
  47. data/docs/UpdateGithubTarget.md +3 -1
  48. data/docs/UpdateLdapTarget.md +3 -1
  49. data/docs/UpdateNativeK8STarget.md +3 -1
  50. data/docs/UpdatePingTarget.md +46 -0
  51. data/docs/UpdateRabbitMQTarget.md +3 -1
  52. data/docs/UpdateRole.md +3 -1
  53. data/docs/UpdateRotatedSecret.md +2 -0
  54. data/docs/UpdateSSHTarget.md +3 -1
  55. data/docs/UpdateSalesforceTarget.md +3 -1
  56. data/docs/UpdateTarget.md +3 -1
  57. data/docs/UpdateWebTarget.md +3 -1
  58. data/docs/V2Api.md +252 -0
  59. data/lib/akeyless/api/v2_api.rb +256 -0
  60. data/lib/akeyless/models/create_artifactory_target.rb +12 -2
  61. data/lib/akeyless/models/create_aws_target.rb +12 -2
  62. data/lib/akeyless/models/create_azure_target.rb +12 -2
  63. data/lib/akeyless/models/create_db_target.rb +12 -2
  64. data/lib/akeyless/models/create_dockerhub_target.rb +12 -2
  65. data/lib/akeyless/models/create_eks_target.rb +12 -2
  66. data/lib/akeyless/models/create_event_forwarder.rb +12 -2
  67. data/lib/akeyless/models/create_gcp_target.rb +12 -2
  68. data/lib/akeyless/models/create_github_target.rb +12 -2
  69. data/lib/akeyless/models/create_gke_target.rb +12 -2
  70. data/lib/akeyless/models/create_ldap_target.rb +12 -2
  71. data/lib/akeyless/models/create_native_k8_s_target.rb +12 -2
  72. data/lib/akeyless/models/create_ping_target.rb +339 -0
  73. data/lib/akeyless/models/create_ping_target_output.rb +219 -0
  74. data/lib/akeyless/models/create_rabbit_mq_target.rb +12 -2
  75. data/lib/akeyless/models/create_role.rb +12 -2
  76. data/lib/akeyless/models/create_rotated_secret.rb +13 -1
  77. data/lib/akeyless/models/create_salesforce_target.rb +12 -2
  78. data/lib/akeyless/models/create_ssh_target.rb +12 -2
  79. data/lib/akeyless/models/create_web_target.rb +12 -2
  80. data/lib/akeyless/models/ds_producer_details.rb +196 -1
  81. data/lib/akeyless/models/gateway_create_producer_eks.rb +1 -1
  82. data/lib/akeyless/models/gateway_create_producer_ping.rb +482 -0
  83. data/lib/akeyless/models/gateway_create_producer_ping_output.rb +219 -0
  84. data/lib/akeyless/models/gateway_update_producer_eks.rb +1 -1
  85. data/lib/akeyless/models/gateway_update_producer_ping.rb +492 -0
  86. data/lib/akeyless/models/gateway_update_producer_ping_output.rb +219 -0
  87. data/lib/akeyless/models/get_kube_exec_creds.rb +14 -4
  88. data/lib/akeyless/models/get_pki_certificate.rb +14 -4
  89. data/lib/akeyless/models/importer_info.rb +228 -0
  90. data/lib/akeyless/models/item_general_info.rb +10 -1
  91. data/lib/akeyless/models/request_access.rb +12 -2
  92. data/lib/akeyless/models/secure_remote_access.rb +10 -1
  93. data/lib/akeyless/models/target_type_details_input.rb +46 -1
  94. data/lib/akeyless/models/uid_create_child_token.rb +12 -2
  95. data/lib/akeyless/models/update_artifactory_target.rb +12 -2
  96. data/lib/akeyless/models/update_aws_target.rb +12 -2
  97. data/lib/akeyless/models/update_azure_target.rb +12 -2
  98. data/lib/akeyless/models/update_db_target.rb +12 -2
  99. data/lib/akeyless/models/update_dockerhub_target.rb +12 -2
  100. data/lib/akeyless/models/update_eks_target.rb +12 -2
  101. data/lib/akeyless/models/update_event_forwarder.rb +14 -2
  102. data/lib/akeyless/models/update_gcp_target.rb +12 -2
  103. data/lib/akeyless/models/update_github_target.rb +12 -2
  104. data/lib/akeyless/models/update_gke_target.rb +12 -2
  105. data/lib/akeyless/models/update_ldap_target.rb +12 -2
  106. data/lib/akeyless/models/update_native_k8_s_target.rb +12 -2
  107. data/lib/akeyless/models/update_ping_target.rb +368 -0
  108. data/lib/akeyless/models/update_rabbit_mq_target.rb +12 -2
  109. data/lib/akeyless/models/update_role.rb +14 -2
  110. data/lib/akeyless/models/update_rotated_secret.rb +13 -1
  111. data/lib/akeyless/models/update_salesforce_target.rb +12 -2
  112. data/lib/akeyless/models/update_ssh_target.rb +12 -2
  113. data/lib/akeyless/models/update_target.rb +14 -2
  114. data/lib/akeyless/models/update_web_target.rb +12 -2
  115. data/lib/akeyless/version.rb +1 -1
  116. data/lib/akeyless.rb +8 -0
  117. data/spec/models/create_ping_target_output_spec.rb +34 -0
  118. data/spec/models/create_ping_target_spec.rb +94 -0
  119. data/spec/models/gateway_create_producer_ping_output_spec.rb +34 -0
  120. data/spec/models/gateway_create_producer_ping_spec.rb +178 -0
  121. data/spec/models/gateway_update_producer_ping_output_spec.rb +34 -0
  122. data/spec/models/gateway_update_producer_ping_spec.rb +184 -0
  123. data/spec/models/importer_info_spec.rb +40 -0
  124. data/spec/models/update_ping_target_spec.rb +112 -0
  125. metadata +594 -562
@@ -0,0 +1,219 @@
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.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class GatewayUpdateProducerPingOutput
18
+ attr_accessor :producer_details
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'producer_details' => :'producer_details'
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
+ :'producer_details' => :'DSProducerDetails'
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::GatewayUpdateProducerPingOutput` 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::GatewayUpdateProducerPingOutput`. 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?(:'producer_details')
61
+ self.producer_details = attributes[:'producer_details']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ producer_details == o.producer_details
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [producer_details].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = Akeyless.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -16,15 +16,18 @@ require 'time'
16
16
  module Akeyless
17
17
  # getKubeExecCreds is a command that gets credentials for authentication with Kubernetes cluster based on a PKI cert issuer.
18
18
  class GetKubeExecCreds
19
- # The Subject Alternative Names to be included in the PKI certificate (in a comma-delimited list)
19
+ # The Subject Alternative Names to be included in the PKI certificate (in a comma-separated list) (if CSR is supplied this flag is ignored and any DNS.* names are taken from it)
20
20
  attr_accessor :alt_names
21
21
 
22
22
  # The name of the PKI certificate issuer
23
23
  attr_accessor :cert_issuer_name
24
24
 
25
- # The common name to be included in the PKI certificate
25
+ # The common name to be included in the PKI certificate (if CSR is supplied this flag is ignored and the CSR subject CN is taken)
26
26
  attr_accessor :common_name
27
27
 
28
+ # Certificate Signing Request contents encoded in base64 to generate the certificate with
29
+ attr_accessor :csr_data_base64
30
+
28
31
  # A comma-separated list of extended key usage requests which will be used for certificate issuance. Supported values: 'clientauth', 'serverauth'.
29
32
  attr_accessor :extended_key_usage
30
33
 
@@ -43,7 +46,7 @@ module Akeyless
43
46
  # The universal identity token, Required only for universal_identity authentication
44
47
  attr_accessor :uid_token
45
48
 
46
- # The URI Subject Alternative Names to be included in the PKI certificate (in a comma-delimited list)
49
+ # The URI Subject Alternative Names to be included in the PKI certificate (in a comma-separated list) (if CSR is supplied this flag is ignored and any URI.* names are taken from it)
47
50
  attr_accessor :uri_sans
48
51
 
49
52
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -52,6 +55,7 @@ module Akeyless
52
55
  :'alt_names' => :'alt-names',
53
56
  :'cert_issuer_name' => :'cert-issuer-name',
54
57
  :'common_name' => :'common-name',
58
+ :'csr_data_base64' => :'csr-data-base64',
55
59
  :'extended_key_usage' => :'extended-key-usage',
56
60
  :'json' => :'json',
57
61
  :'key_data_base64' => :'key-data-base64',
@@ -73,6 +77,7 @@ module Akeyless
73
77
  :'alt_names' => :'String',
74
78
  :'cert_issuer_name' => :'String',
75
79
  :'common_name' => :'String',
80
+ :'csr_data_base64' => :'String',
76
81
  :'extended_key_usage' => :'String',
77
82
  :'json' => :'Boolean',
78
83
  :'key_data_base64' => :'String',
@@ -116,6 +121,10 @@ module Akeyless
116
121
  self.common_name = attributes[:'common_name']
117
122
  end
118
123
 
124
+ if attributes.key?(:'csr_data_base64')
125
+ self.csr_data_base64 = attributes[:'csr_data_base64']
126
+ end
127
+
119
128
  if attributes.key?(:'extended_key_usage')
120
129
  self.extended_key_usage = attributes[:'extended_key_usage']
121
130
  end
@@ -171,6 +180,7 @@ module Akeyless
171
180
  alt_names == o.alt_names &&
172
181
  cert_issuer_name == o.cert_issuer_name &&
173
182
  common_name == o.common_name &&
183
+ csr_data_base64 == o.csr_data_base64 &&
174
184
  extended_key_usage == o.extended_key_usage &&
175
185
  json == o.json &&
176
186
  key_data_base64 == o.key_data_base64 &&
@@ -189,7 +199,7 @@ module Akeyless
189
199
  # Calculates hash code according to all attributes.
190
200
  # @return [Integer] Hash code
191
201
  def hash
192
- [alt_names, cert_issuer_name, common_name, extended_key_usage, json, key_data_base64, token, ttl, uid_token, uri_sans].hash
202
+ [alt_names, cert_issuer_name, common_name, csr_data_base64, extended_key_usage, json, key_data_base64, token, ttl, uid_token, uri_sans].hash
193
203
  end
194
204
 
195
205
  # Builds the object from hash
@@ -15,15 +15,18 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class GetPKICertificate
18
- # The Subject Alternative Names to be included in the PKI certificate (in a comma-delimited list)
18
+ # The Subject Alternative Names to be included in the PKI certificate (in a comma-separated list) (if CSR is supplied this flag is ignored and any DNS.* names are taken from it)
19
19
  attr_accessor :alt_names
20
20
 
21
21
  # The name of the PKI certificate issuer
22
22
  attr_accessor :cert_issuer_name
23
23
 
24
- # The common name to be included in the PKI certificate
24
+ # The common name to be included in the PKI certificate (if CSR is supplied this flag is ignored and the CSR subject CN is taken)
25
25
  attr_accessor :common_name
26
26
 
27
+ # Certificate Signing Request contents encoded in base64 to generate the certificate with
28
+ attr_accessor :csr_data_base64
29
+
27
30
  # A comma-separated list of extended key usage requests which will be used for certificate issuance. Supported values: 'clientauth', 'serverauth'.
28
31
  attr_accessor :extended_key_usage
29
32
 
@@ -42,7 +45,7 @@ module Akeyless
42
45
  # The universal identity token, Required only for universal_identity authentication
43
46
  attr_accessor :uid_token
44
47
 
45
- # The URI Subject Alternative Names to be included in the PKI certificate (in a comma-delimited list)
48
+ # The URI Subject Alternative Names to be included in the PKI certificate (in a comma-separated list) (if CSR is supplied this flag is ignored and any URI.* names are taken from it)
46
49
  attr_accessor :uri_sans
47
50
 
48
51
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -51,6 +54,7 @@ module Akeyless
51
54
  :'alt_names' => :'alt-names',
52
55
  :'cert_issuer_name' => :'cert-issuer-name',
53
56
  :'common_name' => :'common-name',
57
+ :'csr_data_base64' => :'csr-data-base64',
54
58
  :'extended_key_usage' => :'extended-key-usage',
55
59
  :'json' => :'json',
56
60
  :'key_data_base64' => :'key-data-base64',
@@ -72,6 +76,7 @@ module Akeyless
72
76
  :'alt_names' => :'String',
73
77
  :'cert_issuer_name' => :'String',
74
78
  :'common_name' => :'String',
79
+ :'csr_data_base64' => :'String',
75
80
  :'extended_key_usage' => :'String',
76
81
  :'json' => :'Boolean',
77
82
  :'key_data_base64' => :'String',
@@ -115,6 +120,10 @@ module Akeyless
115
120
  self.common_name = attributes[:'common_name']
116
121
  end
117
122
 
123
+ if attributes.key?(:'csr_data_base64')
124
+ self.csr_data_base64 = attributes[:'csr_data_base64']
125
+ end
126
+
118
127
  if attributes.key?(:'extended_key_usage')
119
128
  self.extended_key_usage = attributes[:'extended_key_usage']
120
129
  end
@@ -170,6 +179,7 @@ module Akeyless
170
179
  alt_names == o.alt_names &&
171
180
  cert_issuer_name == o.cert_issuer_name &&
172
181
  common_name == o.common_name &&
182
+ csr_data_base64 == o.csr_data_base64 &&
173
183
  extended_key_usage == o.extended_key_usage &&
174
184
  json == o.json &&
175
185
  key_data_base64 == o.key_data_base64 &&
@@ -188,7 +198,7 @@ module Akeyless
188
198
  # Calculates hash code according to all attributes.
189
199
  # @return [Integer] Hash code
190
200
  def hash
191
- [alt_names, cert_issuer_name, common_name, extended_key_usage, json, key_data_base64, token, ttl, uid_token, uri_sans].hash
201
+ [alt_names, cert_issuer_name, common_name, csr_data_base64, extended_key_usage, json, key_data_base64, token, ttl, uid_token, uri_sans].hash
192
202
  end
193
203
 
194
204
  # Builds the object from hash
@@ -0,0 +1,228 @@
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.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class ImporterInfo
18
+ attr_accessor :external_item_id
19
+
20
+ attr_accessor :version
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'external_item_id' => :'external_item_id',
26
+ :'version' => :'version'
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
+ :'external_item_id' => :'String',
39
+ :'version' => :'Integer'
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::ImporterInfo` 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::ImporterInfo`. 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?(:'external_item_id')
65
+ self.external_item_id = attributes[:'external_item_id']
66
+ end
67
+
68
+ if attributes.key?(:'version')
69
+ self.version = attributes[:'version']
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
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ external_item_id == o.external_item_id &&
92
+ version == o.version
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [external_item_id, version].hash
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 self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = Akeyless.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -27,6 +27,8 @@ module Akeyless
27
27
 
28
28
  attr_accessor :dynamic_secret_producer_details
29
29
 
30
+ attr_accessor :importer_info
31
+
30
32
  attr_accessor :password_policy
31
33
 
32
34
  attr_accessor :rotated_secret_details
@@ -46,6 +48,7 @@ module Akeyless
46
48
  :'cluster_gw_url' => :'cluster_gw_url',
47
49
  :'display_metadata' => :'display_metadata',
48
50
  :'dynamic_secret_producer_details' => :'dynamic_secret_producer_details',
51
+ :'importer_info' => :'importer_info',
49
52
  :'password_policy' => :'password_policy',
50
53
  :'rotated_secret_details' => :'rotated_secret_details',
51
54
  :'secure_remote_access_details' => :'secure_remote_access_details',
@@ -68,6 +71,7 @@ module Akeyless
68
71
  :'cluster_gw_url' => :'String',
69
72
  :'display_metadata' => :'String',
70
73
  :'dynamic_secret_producer_details' => :'DynamicSecretProducerInfo',
74
+ :'importer_info' => :'ImporterInfo',
71
75
  :'password_policy' => :'PasswordPolicyInfo',
72
76
  :'rotated_secret_details' => :'RotatedSecretDetailsInfo',
73
77
  :'secure_remote_access_details' => :'SecureRemoteAccess',
@@ -121,6 +125,10 @@ module Akeyless
121
125
  self.dynamic_secret_producer_details = attributes[:'dynamic_secret_producer_details']
122
126
  end
123
127
 
128
+ if attributes.key?(:'importer_info')
129
+ self.importer_info = attributes[:'importer_info']
130
+ end
131
+
124
132
  if attributes.key?(:'password_policy')
125
133
  self.password_policy = attributes[:'password_policy']
126
134
  end
@@ -166,6 +174,7 @@ module Akeyless
166
174
  cluster_gw_url == o.cluster_gw_url &&
167
175
  display_metadata == o.display_metadata &&
168
176
  dynamic_secret_producer_details == o.dynamic_secret_producer_details &&
177
+ importer_info == o.importer_info &&
169
178
  password_policy == o.password_policy &&
170
179
  rotated_secret_details == o.rotated_secret_details &&
171
180
  secure_remote_access_details == o.secure_remote_access_details &&
@@ -182,7 +191,7 @@ module Akeyless
182
191
  # Calculates hash code according to all attributes.
183
192
  # @return [Integer] Hash code
184
193
  def hash
185
- [cert_issue_details, certificate_chain_info, classic_key_details, cluster_gw_url, display_metadata, dynamic_secret_producer_details, password_policy, rotated_secret_details, secure_remote_access_details, static_secret_info, tokenizer_info].hash
194
+ [cert_issue_details, certificate_chain_info, classic_key_details, cluster_gw_url, display_metadata, dynamic_secret_producer_details, importer_info, password_policy, rotated_secret_details, secure_remote_access_details, static_secret_info, tokenizer_info].hash
186
195
  end
187
196
 
188
197
  # Builds the object from hash
@@ -18,9 +18,12 @@ module Akeyless
18
18
  # List of the required capabilities options: [read, update, delete]
19
19
  attr_accessor :capability
20
20
 
21
- # Comment about this request
21
+ # Deprecated - use description
22
22
  attr_accessor :comment
23
23
 
24
+ # Description of the object
25
+ attr_accessor :description
26
+
24
27
  # Set output format to JSON
25
28
  attr_accessor :json
26
29
 
@@ -38,6 +41,7 @@ module Akeyless
38
41
  {
39
42
  :'capability' => :'capability',
40
43
  :'comment' => :'comment',
44
+ :'description' => :'description',
41
45
  :'json' => :'json',
42
46
  :'name' => :'name',
43
47
  :'token' => :'token',
@@ -55,6 +59,7 @@ module Akeyless
55
59
  {
56
60
  :'capability' => :'Array<String>',
57
61
  :'comment' => :'String',
62
+ :'description' => :'String',
58
63
  :'json' => :'Boolean',
59
64
  :'name' => :'String',
60
65
  :'token' => :'String',
@@ -93,6 +98,10 @@ module Akeyless
93
98
  self.comment = attributes[:'comment']
94
99
  end
95
100
 
101
+ if attributes.key?(:'description')
102
+ self.description = attributes[:'description']
103
+ end
104
+
96
105
  if attributes.key?(:'json')
97
106
  self.json = attributes[:'json']
98
107
  end
@@ -140,6 +149,7 @@ module Akeyless
140
149
  self.class == o.class &&
141
150
  capability == o.capability &&
142
151
  comment == o.comment &&
152
+ description == o.description &&
143
153
  json == o.json &&
144
154
  name == o.name &&
145
155
  token == o.token &&
@@ -155,7 +165,7 @@ module Akeyless
155
165
  # Calculates hash code according to all attributes.
156
166
  # @return [Integer] Hash code
157
167
  def hash
158
- [capability, comment, json, name, token, uid_token].hash
168
+ [capability, comment, description, json, name, token, uid_token].hash
159
169
  end
160
170
 
161
171
  # Builds the object from hash