akeyless 2.15.29 → 2.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -9
  3. data/docs/Auth.md +5 -1
  4. data/docs/AuthMethodAccessInfo.md +2 -0
  5. data/docs/CertAccessRules.md +34 -0
  6. data/docs/ConfigHash.md +2 -0
  7. data/docs/CreateAuthMethodCert.md +48 -0
  8. data/docs/CreateAuthMethodCertOutput.md +18 -0
  9. data/docs/CreateAuthMethodLDAP.md +3 -1
  10. data/docs/CreateAuthMethodOIDC.md +4 -0
  11. data/docs/CreateClassicKey.md +5 -1
  12. data/docs/DSProducerDetails.md +4 -0
  13. data/docs/GatewayCreateProducerCustom.md +4 -0
  14. data/docs/GatewayCreateProducerHanaDb.md +54 -0
  15. data/docs/GatewayCreateProducerHanaDbOutput.md +18 -0
  16. data/docs/GatewayCreateProducerMongo.md +1 -1
  17. data/docs/GatewayCreateProducerOracleDb.md +8 -0
  18. data/docs/GatewayMessageQueueInfo.md +1 -3
  19. data/docs/GatewayUpdateProducerCustom.md +4 -0
  20. data/docs/GatewayUpdateProducerHanaDb.md +56 -0
  21. data/docs/GatewayUpdateProducerHanaDbOutput.md +18 -0
  22. data/docs/GatewayUpdateProducerMongo.md +1 -1
  23. data/docs/GatewayUpdateProducerOracleDb.md +8 -0
  24. data/docs/KMIPClient.md +2 -0
  25. data/docs/KMIPConfigPart.md +5 -1
  26. data/docs/KMIPServer.md +30 -0
  27. data/docs/KmipDeleteServer.md +20 -0
  28. data/docs/KmipDescribeServerOutput.md +4 -0
  29. data/docs/KmipMoveServer.md +22 -0
  30. data/docs/KmipMoveServerOutput.md +20 -0
  31. data/docs/ListAuthMethods.md +4 -0
  32. data/docs/ListRoles.md +2 -0
  33. data/docs/ListTargets.md +2 -0
  34. data/docs/OIDCAccessRules.md +4 -0
  35. data/docs/TargetItemAssociation.md +2 -0
  36. data/docs/UpdateAuthMethodCert.md +50 -0
  37. data/docs/UpdateAuthMethodCertOutput.md +18 -0
  38. data/docs/UpdateAuthMethodLDAP.md +3 -1
  39. data/docs/UpdateAuthMethodOIDC.md +4 -0
  40. data/docs/UpdateDBTarget.md +4 -0
  41. data/docs/UpdateOutput.md +2 -0
  42. data/docs/V2Api.md +319 -0
  43. data/git_push.sh +0 -0
  44. data/lib/akeyless/api/v2_api.rb +312 -0
  45. data/lib/akeyless/api_client.rb +3 -7
  46. data/lib/akeyless/configuration.rb +2 -1
  47. data/lib/akeyless/models/auth.rb +22 -2
  48. data/lib/akeyless/models/auth_method_access_info.rb +10 -1
  49. data/lib/akeyless/models/cert_access_rules.rb +316 -0
  50. data/lib/akeyless/models/config_hash.rb +10 -1
  51. data/lib/akeyless/models/create_auth_method_cert.rb +401 -0
  52. data/lib/akeyless/models/create_auth_method_cert_output.rb +219 -0
  53. data/lib/akeyless/models/create_auth_method_ldap.rb +14 -4
  54. data/lib/akeyless/models/create_auth_method_oidc.rb +23 -1
  55. data/lib/akeyless/models/create_classic_key.rb +26 -4
  56. data/lib/akeyless/models/ds_producer_details.rb +19 -1
  57. data/lib/akeyless/models/gateway_create_producer_custom.rb +23 -1
  58. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +411 -0
  59. data/lib/akeyless/models/gateway_create_producer_hana_db_output.rb +219 -0
  60. data/lib/akeyless/models/gateway_create_producer_mongo.rb +0 -2
  61. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +39 -1
  62. data/lib/akeyless/models/gateway_message_queue_info.rb +4 -13
  63. data/lib/akeyless/models/gateway_update_producer_custom.rb +23 -1
  64. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +421 -0
  65. data/lib/akeyless/models/gateway_update_producer_hana_db_output.rb +219 -0
  66. data/lib/akeyless/models/gateway_update_producer_mongo.rb +0 -2
  67. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +39 -1
  68. data/lib/akeyless/models/kmip_client.rb +10 -1
  69. data/lib/akeyless/models/kmip_config_part.rb +23 -1
  70. data/lib/akeyless/models/kmip_delete_server.rb +231 -0
  71. data/lib/akeyless/models/kmip_describe_server_output.rb +19 -1
  72. data/lib/akeyless/models/kmip_move_server.rb +240 -0
  73. data/lib/akeyless/models/kmip_move_server_output.rb +228 -0
  74. data/lib/akeyless/models/kmip_server.rb +277 -0
  75. data/lib/akeyless/models/list_auth_methods.rb +23 -1
  76. data/lib/akeyless/models/list_roles.rb +11 -1
  77. data/lib/akeyless/models/list_targets.rb +11 -1
  78. data/lib/akeyless/models/oidc_access_rules.rb +23 -1
  79. data/lib/akeyless/models/target_item_association.rb +10 -1
  80. data/lib/akeyless/models/update_auth_method_cert.rb +411 -0
  81. data/lib/akeyless/models/update_auth_method_cert_output.rb +219 -0
  82. data/lib/akeyless/models/update_auth_method_ldap.rb +14 -4
  83. data/lib/akeyless/models/update_auth_method_oidc.rb +23 -1
  84. data/lib/akeyless/models/update_db_target.rb +21 -1
  85. data/lib/akeyless/models/update_output.rb +10 -1
  86. data/lib/akeyless/version.rb +1 -1
  87. data/lib/akeyless.rb +13 -0
  88. data/spec/models/cert_access_rules_spec.rb +82 -0
  89. data/spec/models/create_auth_method_cert_output_spec.rb +34 -0
  90. data/spec/models/create_auth_method_cert_spec.rb +124 -0
  91. data/spec/models/gateway_create_producer_hana_db_output_spec.rb +34 -0
  92. data/spec/models/gateway_create_producer_hana_db_spec.rb +142 -0
  93. data/spec/models/gateway_update_producer_hana_db_output_spec.rb +34 -0
  94. data/spec/models/gateway_update_producer_hana_db_spec.rb +148 -0
  95. data/spec/models/kmip_delete_server_spec.rb +40 -0
  96. data/spec/models/kmip_move_server_output_spec.rb +40 -0
  97. data/spec/models/kmip_move_server_spec.rb +46 -0
  98. data/spec/models/kmip_server_spec.rb +58 -0
  99. data/spec/models/update_auth_method_cert_output_spec.rb +34 -0
  100. data/spec/models/update_auth_method_cert_spec.rb +130 -0
  101. metadata +508 -456
@@ -46,6 +46,14 @@ module Akeyless
46
46
  # Dynamic producer encryption key
47
47
  attr_accessor :producer_encryption_key_name
48
48
 
49
+ attr_accessor :secure_access_bastion_issuer
50
+
51
+ attr_accessor :secure_access_enable
52
+
53
+ attr_accessor :secure_access_host
54
+
55
+ attr_accessor :secure_access_web
56
+
49
57
  # List of the tags attached to this secret
50
58
  attr_accessor :tags
51
59
 
@@ -74,6 +82,10 @@ module Akeyless
74
82
  :'oracle_service_name' => :'oracle-service-name',
75
83
  :'oracle_username' => :'oracle-username',
76
84
  :'producer_encryption_key_name' => :'producer-encryption-key-name',
85
+ :'secure_access_bastion_issuer' => :'secure-access-bastion-issuer',
86
+ :'secure_access_enable' => :'secure-access-enable',
87
+ :'secure_access_host' => :'secure-access-host',
88
+ :'secure_access_web' => :'secure-access-web',
77
89
  :'tags' => :'tags',
78
90
  :'target_name' => :'target-name',
79
91
  :'token' => :'token',
@@ -100,6 +112,10 @@ module Akeyless
100
112
  :'oracle_service_name' => :'String',
101
113
  :'oracle_username' => :'String',
102
114
  :'producer_encryption_key_name' => :'String',
115
+ :'secure_access_bastion_issuer' => :'String',
116
+ :'secure_access_enable' => :'String',
117
+ :'secure_access_host' => :'Array<String>',
118
+ :'secure_access_web' => :'Boolean',
103
119
  :'tags' => :'Array<String>',
104
120
  :'target_name' => :'String',
105
121
  :'token' => :'String',
@@ -173,6 +189,24 @@ module Akeyless
173
189
  self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
174
190
  end
175
191
 
192
+ if attributes.key?(:'secure_access_bastion_issuer')
193
+ self.secure_access_bastion_issuer = attributes[:'secure_access_bastion_issuer']
194
+ end
195
+
196
+ if attributes.key?(:'secure_access_enable')
197
+ self.secure_access_enable = attributes[:'secure_access_enable']
198
+ end
199
+
200
+ if attributes.key?(:'secure_access_host')
201
+ if (value = attributes[:'secure_access_host']).is_a?(Array)
202
+ self.secure_access_host = value
203
+ end
204
+ end
205
+
206
+ if attributes.key?(:'secure_access_web')
207
+ self.secure_access_web = attributes[:'secure_access_web']
208
+ end
209
+
176
210
  if attributes.key?(:'tags')
177
211
  if (value = attributes[:'tags']).is_a?(Array)
178
212
  self.tags = value
@@ -231,6 +265,10 @@ module Akeyless
231
265
  oracle_service_name == o.oracle_service_name &&
232
266
  oracle_username == o.oracle_username &&
233
267
  producer_encryption_key_name == o.producer_encryption_key_name &&
268
+ secure_access_bastion_issuer == o.secure_access_bastion_issuer &&
269
+ secure_access_enable == o.secure_access_enable &&
270
+ secure_access_host == o.secure_access_host &&
271
+ secure_access_web == o.secure_access_web &&
234
272
  tags == o.tags &&
235
273
  target_name == o.target_name &&
236
274
  token == o.token &&
@@ -247,7 +285,7 @@ module Akeyless
247
285
  # Calculates hash code according to all attributes.
248
286
  # @return [Integer] Hash code
249
287
  def hash
250
- [db_server_certificates, db_server_name, name, oracle_host, oracle_password, oracle_port, oracle_screation_statements, oracle_service_name, oracle_username, producer_encryption_key_name, tags, target_name, token, uid_token, user_ttl].hash
288
+ [db_server_certificates, db_server_name, name, oracle_host, oracle_password, oracle_port, oracle_screation_statements, oracle_service_name, oracle_username, producer_encryption_key_name, secure_access_bastion_issuer, secure_access_enable, secure_access_host, secure_access_web, tags, target_name, token, uid_token, user_ttl].hash
251
289
  end
252
290
 
253
291
  # Builds the object from hash
@@ -21,15 +21,12 @@ module Akeyless
21
21
 
22
22
  attr_accessor :queue_url
23
23
 
24
- attr_accessor :use_new_queue
25
-
26
24
  # Attribute mapping from ruby-style variable name to JSON key.
27
25
  def self.attribute_map
28
26
  {
29
27
  :'mq_type' => :'mq_type',
30
28
  :'queue_name' => :'queue_name',
31
- :'queue_url' => :'queue_url',
32
- :'use_new_queue' => :'use_new_queue'
29
+ :'queue_url' => :'queue_url'
33
30
  }
34
31
  end
35
32
 
@@ -43,8 +40,7 @@ module Akeyless
43
40
  {
44
41
  :'mq_type' => :'String',
45
42
  :'queue_name' => :'String',
46
- :'queue_url' => :'String',
47
- :'use_new_queue' => :'Boolean'
43
+ :'queue_url' => :'String'
48
44
  }
49
45
  end
50
46
 
@@ -80,10 +76,6 @@ module Akeyless
80
76
  if attributes.key?(:'queue_url')
81
77
  self.queue_url = attributes[:'queue_url']
82
78
  end
83
-
84
- if attributes.key?(:'use_new_queue')
85
- self.use_new_queue = attributes[:'use_new_queue']
86
- end
87
79
  end
88
80
 
89
81
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -106,8 +98,7 @@ module Akeyless
106
98
  self.class == o.class &&
107
99
  mq_type == o.mq_type &&
108
100
  queue_name == o.queue_name &&
109
- queue_url == o.queue_url &&
110
- use_new_queue == o.use_new_queue
101
+ queue_url == o.queue_url
111
102
  end
112
103
 
113
104
  # @see the `==` method
@@ -119,7 +110,7 @@ module Akeyless
119
110
  # Calculates hash code according to all attributes.
120
111
  # @return [Integer] Hash code
121
112
  def hash
122
- [mq_type, queue_name, queue_url, use_new_queue].hash
113
+ [mq_type, queue_name, queue_url].hash
123
114
  end
124
115
 
125
116
  # Builds the object from hash
@@ -15,9 +15,15 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class GatewayUpdateProducerCustom
18
+ # Define rotation interval in days
19
+ attr_accessor :admin_rotation_interval_days
20
+
18
21
  # URL of an endpoint that implements /sync/create method, for example https://webhook.example.com/sync/create
19
22
  attr_accessor :create_sync_url
20
23
 
24
+ # Should admin credentials be rotated
25
+ attr_accessor :enable_admin_rotation
26
+
21
27
  # Producer name
22
28
  attr_accessor :name
23
29
 
@@ -54,7 +60,9 @@ module Akeyless
54
60
  # Attribute mapping from ruby-style variable name to JSON key.
55
61
  def self.attribute_map
56
62
  {
63
+ :'admin_rotation_interval_days' => :'admin_rotation_interval_days',
57
64
  :'create_sync_url' => :'create-sync-url',
65
+ :'enable_admin_rotation' => :'enable_admin_rotation',
58
66
  :'name' => :'name',
59
67
  :'new_name' => :'new-name',
60
68
  :'payload' => :'payload',
@@ -77,7 +85,9 @@ module Akeyless
77
85
  # Attribute type mapping.
78
86
  def self.openapi_types
79
87
  {
88
+ :'admin_rotation_interval_days' => :'Integer',
80
89
  :'create_sync_url' => :'String',
90
+ :'enable_admin_rotation' => :'Boolean',
81
91
  :'name' => :'String',
82
92
  :'new_name' => :'String',
83
93
  :'payload' => :'String',
@@ -113,10 +123,20 @@ module Akeyless
113
123
  h[k.to_sym] = v
114
124
  }
115
125
 
126
+ if attributes.key?(:'admin_rotation_interval_days')
127
+ self.admin_rotation_interval_days = attributes[:'admin_rotation_interval_days']
128
+ end
129
+
116
130
  if attributes.key?(:'create_sync_url')
117
131
  self.create_sync_url = attributes[:'create_sync_url']
118
132
  end
119
133
 
134
+ if attributes.key?(:'enable_admin_rotation')
135
+ self.enable_admin_rotation = attributes[:'enable_admin_rotation']
136
+ else
137
+ self.enable_admin_rotation = false
138
+ end
139
+
120
140
  if attributes.key?(:'name')
121
141
  self.name = attributes[:'name']
122
142
  end
@@ -201,7 +221,9 @@ module Akeyless
201
221
  def ==(o)
202
222
  return true if self.equal?(o)
203
223
  self.class == o.class &&
224
+ admin_rotation_interval_days == o.admin_rotation_interval_days &&
204
225
  create_sync_url == o.create_sync_url &&
226
+ enable_admin_rotation == o.enable_admin_rotation &&
205
227
  name == o.name &&
206
228
  new_name == o.new_name &&
207
229
  payload == o.payload &&
@@ -224,7 +246,7 @@ module Akeyless
224
246
  # Calculates hash code according to all attributes.
225
247
  # @return [Integer] Hash code
226
248
  def hash
227
- [create_sync_url, name, new_name, payload, producer_encryption_key_name, revoke_sync_url, rotate_sync_url, tags, timeout_sec, token, uid_token, user_ttl].hash
249
+ [admin_rotation_interval_days, create_sync_url, enable_admin_rotation, name, new_name, payload, producer_encryption_key_name, revoke_sync_url, rotate_sync_url, tags, timeout_sec, token, uid_token, user_ttl].hash
228
250
  end
229
251
 
230
252
  # Builds the object from hash
@@ -0,0 +1,421 @@
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.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # gatewayUpdateProducerHanaDb is a command that updates mssql producer
18
+ class GatewayUpdateProducerHanaDb
19
+ # HanaDb Name
20
+ attr_accessor :hana_dbname
21
+
22
+ # HanaDb Creation statements
23
+ attr_accessor :hanadb_create_statements
24
+
25
+ # HanaDb Host
26
+ attr_accessor :hanadb_host
27
+
28
+ # HanaDb Password
29
+ attr_accessor :hanadb_password
30
+
31
+ # HanaDb Port
32
+ attr_accessor :hanadb_port
33
+
34
+ # HanaDb Revocation statements
35
+ attr_accessor :hanadb_revocation_statements
36
+
37
+ # HanaDb Username
38
+ attr_accessor :hanadb_username
39
+
40
+ # Producer name
41
+ attr_accessor :name
42
+
43
+ # Producer name
44
+ attr_accessor :new_name
45
+
46
+ # Dynamic producer encryption key
47
+ attr_accessor :producer_encryption_key_name
48
+
49
+ attr_accessor :secure_access_bastion_issuer
50
+
51
+ attr_accessor :secure_access_db_schema
52
+
53
+ attr_accessor :secure_access_enable
54
+
55
+ attr_accessor :secure_access_host
56
+
57
+ attr_accessor :secure_access_web
58
+
59
+ # List of the tags attached to this secret
60
+ attr_accessor :tags
61
+
62
+ # Target name
63
+ attr_accessor :target_name
64
+
65
+ # Authentication token (see `/auth` and `/configure`)
66
+ attr_accessor :token
67
+
68
+ # The universal identity token, Required only for universal_identity authentication
69
+ attr_accessor :uid_token
70
+
71
+ # User TTL
72
+ attr_accessor :user_ttl
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'hana_dbname' => :'hana-dbname',
78
+ :'hanadb_create_statements' => :'hanadb-create-statements',
79
+ :'hanadb_host' => :'hanadb-host',
80
+ :'hanadb_password' => :'hanadb-password',
81
+ :'hanadb_port' => :'hanadb-port',
82
+ :'hanadb_revocation_statements' => :'hanadb-revocation-statements',
83
+ :'hanadb_username' => :'hanadb-username',
84
+ :'name' => :'name',
85
+ :'new_name' => :'new-name',
86
+ :'producer_encryption_key_name' => :'producer-encryption-key-name',
87
+ :'secure_access_bastion_issuer' => :'secure-access-bastion-issuer',
88
+ :'secure_access_db_schema' => :'secure-access-db-schema',
89
+ :'secure_access_enable' => :'secure-access-enable',
90
+ :'secure_access_host' => :'secure-access-host',
91
+ :'secure_access_web' => :'secure-access-web',
92
+ :'tags' => :'tags',
93
+ :'target_name' => :'target-name',
94
+ :'token' => :'token',
95
+ :'uid_token' => :'uid-token',
96
+ :'user_ttl' => :'user-ttl'
97
+ }
98
+ end
99
+
100
+ # Returns all the JSON keys this model knows about
101
+ def self.acceptable_attributes
102
+ attribute_map.values
103
+ end
104
+
105
+ # Attribute type mapping.
106
+ def self.openapi_types
107
+ {
108
+ :'hana_dbname' => :'String',
109
+ :'hanadb_create_statements' => :'String',
110
+ :'hanadb_host' => :'String',
111
+ :'hanadb_password' => :'String',
112
+ :'hanadb_port' => :'String',
113
+ :'hanadb_revocation_statements' => :'String',
114
+ :'hanadb_username' => :'String',
115
+ :'name' => :'String',
116
+ :'new_name' => :'String',
117
+ :'producer_encryption_key_name' => :'String',
118
+ :'secure_access_bastion_issuer' => :'String',
119
+ :'secure_access_db_schema' => :'String',
120
+ :'secure_access_enable' => :'String',
121
+ :'secure_access_host' => :'Array<String>',
122
+ :'secure_access_web' => :'Boolean',
123
+ :'tags' => :'Array<String>',
124
+ :'target_name' => :'String',
125
+ :'token' => :'String',
126
+ :'uid_token' => :'String',
127
+ :'user_ttl' => :'String'
128
+ }
129
+ end
130
+
131
+ # List of attributes with nullable: true
132
+ def self.openapi_nullable
133
+ Set.new([
134
+ ])
135
+ end
136
+
137
+ # Initializes the object
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ def initialize(attributes = {})
140
+ if (!attributes.is_a?(Hash))
141
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayUpdateProducerHanaDb` initialize method"
142
+ end
143
+
144
+ # check to see if the attribute exists and convert string to symbol for hash key
145
+ attributes = attributes.each_with_object({}) { |(k, v), h|
146
+ if (!self.class.attribute_map.key?(k.to_sym))
147
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayUpdateProducerHanaDb`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
148
+ end
149
+ h[k.to_sym] = v
150
+ }
151
+
152
+ if attributes.key?(:'hana_dbname')
153
+ self.hana_dbname = attributes[:'hana_dbname']
154
+ end
155
+
156
+ if attributes.key?(:'hanadb_create_statements')
157
+ self.hanadb_create_statements = attributes[:'hanadb_create_statements']
158
+ end
159
+
160
+ if attributes.key?(:'hanadb_host')
161
+ self.hanadb_host = attributes[:'hanadb_host']
162
+ else
163
+ self.hanadb_host = '127.0.0.1'
164
+ end
165
+
166
+ if attributes.key?(:'hanadb_password')
167
+ self.hanadb_password = attributes[:'hanadb_password']
168
+ end
169
+
170
+ if attributes.key?(:'hanadb_port')
171
+ self.hanadb_port = attributes[:'hanadb_port']
172
+ else
173
+ self.hanadb_port = '443'
174
+ end
175
+
176
+ if attributes.key?(:'hanadb_revocation_statements')
177
+ self.hanadb_revocation_statements = attributes[:'hanadb_revocation_statements']
178
+ end
179
+
180
+ if attributes.key?(:'hanadb_username')
181
+ self.hanadb_username = attributes[:'hanadb_username']
182
+ end
183
+
184
+ if attributes.key?(:'name')
185
+ self.name = attributes[:'name']
186
+ end
187
+
188
+ if attributes.key?(:'new_name')
189
+ self.new_name = attributes[:'new_name']
190
+ end
191
+
192
+ if attributes.key?(:'producer_encryption_key_name')
193
+ self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
194
+ end
195
+
196
+ if attributes.key?(:'secure_access_bastion_issuer')
197
+ self.secure_access_bastion_issuer = attributes[:'secure_access_bastion_issuer']
198
+ end
199
+
200
+ if attributes.key?(:'secure_access_db_schema')
201
+ self.secure_access_db_schema = attributes[:'secure_access_db_schema']
202
+ end
203
+
204
+ if attributes.key?(:'secure_access_enable')
205
+ self.secure_access_enable = attributes[:'secure_access_enable']
206
+ end
207
+
208
+ if attributes.key?(:'secure_access_host')
209
+ if (value = attributes[:'secure_access_host']).is_a?(Array)
210
+ self.secure_access_host = value
211
+ end
212
+ end
213
+
214
+ if attributes.key?(:'secure_access_web')
215
+ self.secure_access_web = attributes[:'secure_access_web']
216
+ end
217
+
218
+ if attributes.key?(:'tags')
219
+ if (value = attributes[:'tags']).is_a?(Array)
220
+ self.tags = value
221
+ end
222
+ end
223
+
224
+ if attributes.key?(:'target_name')
225
+ self.target_name = attributes[:'target_name']
226
+ end
227
+
228
+ if attributes.key?(:'token')
229
+ self.token = attributes[:'token']
230
+ end
231
+
232
+ if attributes.key?(:'uid_token')
233
+ self.uid_token = attributes[:'uid_token']
234
+ end
235
+
236
+ if attributes.key?(:'user_ttl')
237
+ self.user_ttl = attributes[:'user_ttl']
238
+ else
239
+ self.user_ttl = '60m'
240
+ end
241
+ end
242
+
243
+ # Show invalid properties with the reasons. Usually used together with valid?
244
+ # @return Array for valid properties with the reasons
245
+ def list_invalid_properties
246
+ invalid_properties = Array.new
247
+ if @name.nil?
248
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
249
+ end
250
+
251
+ invalid_properties
252
+ end
253
+
254
+ # Check to see if the all the properties in the model are valid
255
+ # @return true if the model is valid
256
+ def valid?
257
+ return false if @name.nil?
258
+ true
259
+ end
260
+
261
+ # Checks equality by comparing each attribute.
262
+ # @param [Object] Object to be compared
263
+ def ==(o)
264
+ return true if self.equal?(o)
265
+ self.class == o.class &&
266
+ hana_dbname == o.hana_dbname &&
267
+ hanadb_create_statements == o.hanadb_create_statements &&
268
+ hanadb_host == o.hanadb_host &&
269
+ hanadb_password == o.hanadb_password &&
270
+ hanadb_port == o.hanadb_port &&
271
+ hanadb_revocation_statements == o.hanadb_revocation_statements &&
272
+ hanadb_username == o.hanadb_username &&
273
+ name == o.name &&
274
+ new_name == o.new_name &&
275
+ producer_encryption_key_name == o.producer_encryption_key_name &&
276
+ secure_access_bastion_issuer == o.secure_access_bastion_issuer &&
277
+ secure_access_db_schema == o.secure_access_db_schema &&
278
+ secure_access_enable == o.secure_access_enable &&
279
+ secure_access_host == o.secure_access_host &&
280
+ secure_access_web == o.secure_access_web &&
281
+ tags == o.tags &&
282
+ target_name == o.target_name &&
283
+ token == o.token &&
284
+ uid_token == o.uid_token &&
285
+ user_ttl == o.user_ttl
286
+ end
287
+
288
+ # @see the `==` method
289
+ # @param [Object] Object to be compared
290
+ def eql?(o)
291
+ self == o
292
+ end
293
+
294
+ # Calculates hash code according to all attributes.
295
+ # @return [Integer] Hash code
296
+ def hash
297
+ [hana_dbname, hanadb_create_statements, hanadb_host, hanadb_password, hanadb_port, hanadb_revocation_statements, hanadb_username, name, new_name, producer_encryption_key_name, secure_access_bastion_issuer, secure_access_db_schema, secure_access_enable, secure_access_host, secure_access_web, tags, target_name, token, uid_token, user_ttl].hash
298
+ end
299
+
300
+ # Builds the object from hash
301
+ # @param [Hash] attributes Model attributes in the form of hash
302
+ # @return [Object] Returns the model itself
303
+ def self.build_from_hash(attributes)
304
+ new.build_from_hash(attributes)
305
+ end
306
+
307
+ # Builds the object from hash
308
+ # @param [Hash] attributes Model attributes in the form of hash
309
+ # @return [Object] Returns the model itself
310
+ def build_from_hash(attributes)
311
+ return nil unless attributes.is_a?(Hash)
312
+ attributes = attributes.transform_keys(&:to_sym)
313
+ self.class.openapi_types.each_pair do |key, type|
314
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
315
+ self.send("#{key}=", nil)
316
+ elsif type =~ /\AArray<(.*)>/i
317
+ # check to ensure the input is an array given that the attribute
318
+ # is documented as an array but the input is not
319
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
320
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
321
+ end
322
+ elsif !attributes[self.class.attribute_map[key]].nil?
323
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
324
+ end
325
+ end
326
+
327
+ self
328
+ end
329
+
330
+ # Deserializes the data based on type
331
+ # @param string type Data type
332
+ # @param string value Value to be deserialized
333
+ # @return [Object] Deserialized data
334
+ def _deserialize(type, value)
335
+ case type.to_sym
336
+ when :Time
337
+ Time.parse(value)
338
+ when :Date
339
+ Date.parse(value)
340
+ when :String
341
+ value.to_s
342
+ when :Integer
343
+ value.to_i
344
+ when :Float
345
+ value.to_f
346
+ when :Boolean
347
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
348
+ true
349
+ else
350
+ false
351
+ end
352
+ when :Object
353
+ # generic object (usually a Hash), return directly
354
+ value
355
+ when /\AArray<(?<inner_type>.+)>\z/
356
+ inner_type = Regexp.last_match[:inner_type]
357
+ value.map { |v| _deserialize(inner_type, v) }
358
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
359
+ k_type = Regexp.last_match[:k_type]
360
+ v_type = Regexp.last_match[:v_type]
361
+ {}.tap do |hash|
362
+ value.each do |k, v|
363
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
364
+ end
365
+ end
366
+ else # model
367
+ # models (e.g. Pet) or oneOf
368
+ klass = Akeyless.const_get(type)
369
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
370
+ end
371
+ end
372
+
373
+ # Returns the string representation of the object
374
+ # @return [String] String presentation of the object
375
+ def to_s
376
+ to_hash.to_s
377
+ end
378
+
379
+ # to_body is an alias to to_hash (backward compatibility)
380
+ # @return [Hash] Returns the object in the form of hash
381
+ def to_body
382
+ to_hash
383
+ end
384
+
385
+ # Returns the object in the form of hash
386
+ # @return [Hash] Returns the object in the form of hash
387
+ def to_hash
388
+ hash = {}
389
+ self.class.attribute_map.each_pair do |attr, param|
390
+ value = self.send(attr)
391
+ if value.nil?
392
+ is_nullable = self.class.openapi_nullable.include?(attr)
393
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
394
+ end
395
+
396
+ hash[param] = _to_hash(value)
397
+ end
398
+ hash
399
+ end
400
+
401
+ # Outputs non-array value in the form of hash
402
+ # For object, use to_hash. Otherwise, just return the value
403
+ # @param [Object] value Any valid value
404
+ # @return [Hash] Returns the value in the form of hash
405
+ def _to_hash(value)
406
+ if value.is_a?(Array)
407
+ value.compact.map { |v| _to_hash(v) }
408
+ elsif value.is_a?(Hash)
409
+ {}.tap do |hash|
410
+ value.each { |k, v| hash[k] = _to_hash(v) }
411
+ end
412
+ elsif value.respond_to? :to_hash
413
+ value.to_hash
414
+ else
415
+ value
416
+ end
417
+ end
418
+
419
+ end
420
+
421
+ end