akeyless 2.15.29 → 2.15.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -9
  3. data/docs/Auth.md +1 -1
  4. data/docs/ConfigHash.md +2 -0
  5. data/docs/DSProducerDetails.md +4 -0
  6. data/docs/GatewayCreateProducerHanaDb.md +54 -0
  7. data/docs/GatewayCreateProducerHanaDbOutput.md +18 -0
  8. data/docs/GatewayCreateProducerMongo.md +1 -1
  9. data/docs/GatewayUpdateProducerHanaDb.md +56 -0
  10. data/docs/GatewayUpdateProducerHanaDbOutput.md +18 -0
  11. data/docs/GatewayUpdateProducerMongo.md +1 -1
  12. data/docs/KMIPConfigPart.md +5 -1
  13. data/docs/KMIPServer.md +26 -0
  14. data/docs/ListAuthMethods.md +2 -0
  15. data/docs/TargetItemAssociation.md +2 -0
  16. data/docs/UpdateDBTarget.md +4 -0
  17. data/docs/V2Api.md +63 -0
  18. data/git_push.sh +0 -0
  19. data/lib/akeyless/api/v2_api.rb +64 -0
  20. data/lib/akeyless/api_client.rb +0 -6
  21. data/lib/akeyless/configuration.rb +2 -1
  22. data/lib/akeyless/models/auth.rb +1 -1
  23. data/lib/akeyless/models/config_hash.rb +10 -1
  24. data/lib/akeyless/models/ds_producer_details.rb +19 -1
  25. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +411 -0
  26. data/lib/akeyless/models/gateway_create_producer_hana_db_output.rb +219 -0
  27. data/lib/akeyless/models/gateway_create_producer_mongo.rb +0 -2
  28. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +421 -0
  29. data/lib/akeyless/models/gateway_update_producer_hana_db_output.rb +219 -0
  30. data/lib/akeyless/models/gateway_update_producer_mongo.rb +0 -2
  31. data/lib/akeyless/models/kmip_config_part.rb +23 -1
  32. data/lib/akeyless/models/kmip_server.rb +259 -0
  33. data/lib/akeyless/models/list_auth_methods.rb +13 -1
  34. data/lib/akeyless/models/target_item_association.rb +10 -1
  35. data/lib/akeyless/models/update_db_target.rb +21 -1
  36. data/lib/akeyless/version.rb +1 -1
  37. data/lib/akeyless.rb +5 -0
  38. data/spec/models/gateway_create_producer_hana_db_output_spec.rb +34 -0
  39. data/spec/models/gateway_create_producer_hana_db_spec.rb +142 -0
  40. data/spec/models/gateway_update_producer_hana_db_output_spec.rb +34 -0
  41. data/spec/models/gateway_update_producer_hana_db_spec.rb +148 -0
  42. data/spec/models/kmip_server_spec.rb +58 -0
  43. metadata +476 -456
@@ -35,6 +35,8 @@ module Akeyless
35
35
 
36
36
  attr_accessor :m_queue
37
37
 
38
+ attr_accessor :migration_status
39
+
38
40
  attr_accessor :migrations
39
41
 
40
42
  attr_accessor :producers
@@ -60,6 +62,7 @@ module Akeyless
60
62
  :'leadership' => :'leadership',
61
63
  :'log_forwarding' => :'log_forwarding',
62
64
  :'m_queue' => :'m_queue',
65
+ :'migration_status' => :'migration_status',
63
66
  :'migrations' => :'migrations',
64
67
  :'producers' => :'producers',
65
68
  :'producers_status' => :'producers_status',
@@ -87,6 +90,7 @@ module Akeyless
87
90
  :'leadership' => :'String',
88
91
  :'log_forwarding' => :'String',
89
92
  :'m_queue' => :'String',
93
+ :'migration_status' => :'String',
90
94
  :'migrations' => :'String',
91
95
  :'producers' => :'Object',
92
96
  :'producers_status' => :'String',
@@ -157,6 +161,10 @@ module Akeyless
157
161
  self.m_queue = attributes[:'m_queue']
158
162
  end
159
163
 
164
+ if attributes.key?(:'migration_status')
165
+ self.migration_status = attributes[:'migration_status']
166
+ end
167
+
160
168
  if attributes.key?(:'migrations')
161
169
  self.migrations = attributes[:'migrations']
162
170
  end
@@ -210,6 +218,7 @@ module Akeyless
210
218
  leadership == o.leadership &&
211
219
  log_forwarding == o.log_forwarding &&
212
220
  m_queue == o.m_queue &&
221
+ migration_status == o.migration_status &&
213
222
  migrations == o.migrations &&
214
223
  producers == o.producers &&
215
224
  producers_status == o.producers_status &&
@@ -227,7 +236,7 @@ module Akeyless
227
236
  # Calculates hash code according to all attributes.
228
237
  # @return [Integer] Hash code
229
238
  def hash
230
- [admins, cache, customer_fragements, general, k8s_auths, kmip, ldap, leadership, log_forwarding, m_queue, migrations, producers, producers_status, rotators, saml, universal_identity].hash
239
+ [admins, cache, customer_fragements, general, k8s_auths, kmip, ldap, leadership, log_forwarding, m_queue, migration_status, migrations, producers, producers_status, rotators, saml, universal_identity].hash
231
240
  end
232
241
 
233
242
  # Builds the object from hash
@@ -185,6 +185,10 @@ module Akeyless
185
185
 
186
186
  attr_accessor :groups
187
187
 
188
+ attr_accessor :hanadb_creation_statements
189
+
190
+ attr_accessor :hanadb_revocation_statements
191
+
188
192
  attr_accessor :host_name
189
193
 
190
194
  attr_accessor :host_port
@@ -446,6 +450,8 @@ module Akeyless
446
450
  :'gke_service_account_key' => :'gke_service_account_key',
447
451
  :'gke_service_account_name' => :'gke_service_account_name',
448
452
  :'groups' => :'groups',
453
+ :'hanadb_creation_statements' => :'hanadb_creation_statements',
454
+ :'hanadb_revocation_statements' => :'hanadb_revocation_statements',
449
455
  :'host_name' => :'host_name',
450
456
  :'host_port' => :'host_port',
451
457
  :'is_fixed_user' => :'is_fixed_user',
@@ -624,6 +630,8 @@ module Akeyless
624
630
  :'gke_service_account_key' => :'String',
625
631
  :'gke_service_account_name' => :'String',
626
632
  :'groups' => :'String',
633
+ :'hanadb_creation_statements' => :'String',
634
+ :'hanadb_revocation_statements' => :'String',
627
635
  :'host_name' => :'String',
628
636
  :'host_port' => :'String',
629
637
  :'is_fixed_user' => :'String',
@@ -1073,6 +1081,14 @@ module Akeyless
1073
1081
  self.groups = attributes[:'groups']
1074
1082
  end
1075
1083
 
1084
+ if attributes.key?(:'hanadb_creation_statements')
1085
+ self.hanadb_creation_statements = attributes[:'hanadb_creation_statements']
1086
+ end
1087
+
1088
+ if attributes.key?(:'hanadb_revocation_statements')
1089
+ self.hanadb_revocation_statements = attributes[:'hanadb_revocation_statements']
1090
+ end
1091
+
1076
1092
  if attributes.key?(:'host_name')
1077
1093
  self.host_name = attributes[:'host_name']
1078
1094
  end
@@ -1516,6 +1532,8 @@ module Akeyless
1516
1532
  gke_service_account_key == o.gke_service_account_key &&
1517
1533
  gke_service_account_name == o.gke_service_account_name &&
1518
1534
  groups == o.groups &&
1535
+ hanadb_creation_statements == o.hanadb_creation_statements &&
1536
+ hanadb_revocation_statements == o.hanadb_revocation_statements &&
1519
1537
  host_name == o.host_name &&
1520
1538
  host_port == o.host_port &&
1521
1539
  is_fixed_user == o.is_fixed_user &&
@@ -1610,7 +1628,7 @@ module Akeyless
1610
1628
  # Calculates hash code according to all attributes.
1611
1629
  # @return [Integer] Hash code
1612
1630
  def hash
1613
- [active, admin_name, admin_pwd, admin_rotation_interval_days, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, artifactory_token_audience, artifactory_token_scope, aws_access_key_id, aws_access_mode, aws_region, aws_role_arns, aws_secret_access_key, aws_session_token, aws_user_console_access, aws_user_groups, aws_user_policies, aws_user_programmatic_access, azure_app_object_id, azure_client_id, azure_client_secret, azure_fixed_user_name_sub_claim_key, azure_fixed_user_only, azure_tenant_id, azure_user_groups_obj_id, azure_user_portal_access, azure_user_programmatic_access, azure_user_roles_template_id, cassandra_creation_statements, chef_organizations, chef_server_access_mode, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, create_sync_url, db_host_name, db_isolation_level, db_max_idle_conns, db_max_open_conns, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, dynamic_secret_id, dynamic_secret_key, dynamic_secret_name, dynamic_secret_type, eks_access_key_id, eks_assume_role, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, enable_admin_rotation, externally_provided_user, failure_message, fixed_user_only, gcp_key_algo, gcp_service_account_email, gcp_service_account_key, gcp_token_lifetime, gcp_token_scope, gcp_token_type, github_app_id, github_app_private_key, github_base_url, github_installation_id, github_installation_token_permissions, github_installation_token_repositories, github_installation_token_repositories_ids, github_repository_path, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, groups, host_name, host_port, is_fixed_user, item_targets_assoc, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, k8s_namespace, k8s_service_account, last_admin_rotation, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, ldap_user_attr, ldap_user_dn, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_custom_data, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_roles, mongodb_uri_connection, mongodb_uri_options, mongodb_username, mssql_creation_statements, mssql_revocation_statements, mysql_creation_statements, oracle_creation_statements, password, password_length, password_policy, payload, postgres_creation_statements, postgres_revocation_statements, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, rabbitmq_user_conf_permission, rabbitmq_user_read_permission, rabbitmq_user_tags, rabbitmq_user_vhost, rabbitmq_user_write_permission, redshift_creation_statements, revoke_sync_url, rotate_sync_url, scopes, secure_remote_access_details, session_extension_warn_interval_min, sf_account, sf_user_role, sf_warehouse_name, should_stop, ssl_connection_certificate, ssl_connection_mode, tags, timeout_seconds, use_gw_cloud_identity, user_name, user_principal_name, user_ttl, username_length, username_policy, venafi_allow_subdomains, venafi_allowed_domains, venafi_api_key, venafi_auto_generated_folder, venafi_base_url, venafi_root_first_in_chain, venafi_sign_using_akeyless_pki, venafi_signer_key_name, venafi_store_private_key, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone, warn_before_user_expiration_min].hash
1631
+ [active, admin_name, admin_pwd, admin_rotation_interval_days, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, artifactory_token_audience, artifactory_token_scope, aws_access_key_id, aws_access_mode, aws_region, aws_role_arns, aws_secret_access_key, aws_session_token, aws_user_console_access, aws_user_groups, aws_user_policies, aws_user_programmatic_access, azure_app_object_id, azure_client_id, azure_client_secret, azure_fixed_user_name_sub_claim_key, azure_fixed_user_only, azure_tenant_id, azure_user_groups_obj_id, azure_user_portal_access, azure_user_programmatic_access, azure_user_roles_template_id, cassandra_creation_statements, chef_organizations, chef_server_access_mode, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, create_sync_url, db_host_name, db_isolation_level, db_max_idle_conns, db_max_open_conns, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, dynamic_secret_id, dynamic_secret_key, dynamic_secret_name, dynamic_secret_type, eks_access_key_id, eks_assume_role, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, enable_admin_rotation, externally_provided_user, failure_message, fixed_user_only, gcp_key_algo, gcp_service_account_email, gcp_service_account_key, gcp_token_lifetime, gcp_token_scope, gcp_token_type, github_app_id, github_app_private_key, github_base_url, github_installation_id, github_installation_token_permissions, github_installation_token_repositories, github_installation_token_repositories_ids, github_repository_path, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, groups, hanadb_creation_statements, hanadb_revocation_statements, host_name, host_port, is_fixed_user, item_targets_assoc, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, k8s_namespace, k8s_service_account, last_admin_rotation, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, ldap_user_attr, ldap_user_dn, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_custom_data, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_roles, mongodb_uri_connection, mongodb_uri_options, mongodb_username, mssql_creation_statements, mssql_revocation_statements, mysql_creation_statements, oracle_creation_statements, password, password_length, password_policy, payload, postgres_creation_statements, postgres_revocation_statements, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, rabbitmq_user_conf_permission, rabbitmq_user_read_permission, rabbitmq_user_tags, rabbitmq_user_vhost, rabbitmq_user_write_permission, redshift_creation_statements, revoke_sync_url, rotate_sync_url, scopes, secure_remote_access_details, session_extension_warn_interval_min, sf_account, sf_user_role, sf_warehouse_name, should_stop, ssl_connection_certificate, ssl_connection_mode, tags, timeout_seconds, use_gw_cloud_identity, user_name, user_principal_name, user_ttl, username_length, username_policy, venafi_allow_subdomains, venafi_allowed_domains, venafi_api_key, venafi_auto_generated_folder, venafi_base_url, venafi_root_first_in_chain, venafi_sign_using_akeyless_pki, venafi_signer_key_name, venafi_store_private_key, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone, warn_before_user_expiration_min].hash
1614
1632
  end
1615
1633
 
1616
1634
  # Builds the object from hash
@@ -0,0 +1,411 @@
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
+ # gatewayCreateProducerHanaDb is a command that creates hanadb producer
18
+ class GatewayCreateProducerHanaDb
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
+ # Dynamic producer encryption key
44
+ attr_accessor :producer_encryption_key_name
45
+
46
+ attr_accessor :secure_access_bastion_issuer
47
+
48
+ attr_accessor :secure_access_db_schema
49
+
50
+ attr_accessor :secure_access_enable
51
+
52
+ attr_accessor :secure_access_host
53
+
54
+ attr_accessor :secure_access_web
55
+
56
+ # List of the tags attached to this secret
57
+ attr_accessor :tags
58
+
59
+ # Target name
60
+ attr_accessor :target_name
61
+
62
+ # Authentication token (see `/auth` and `/configure`)
63
+ attr_accessor :token
64
+
65
+ # The universal identity token, Required only for universal_identity authentication
66
+ attr_accessor :uid_token
67
+
68
+ # User TTL
69
+ attr_accessor :user_ttl
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'hana_dbname' => :'hana-dbname',
75
+ :'hanadb_create_statements' => :'hanadb-create-statements',
76
+ :'hanadb_host' => :'hanadb-host',
77
+ :'hanadb_password' => :'hanadb-password',
78
+ :'hanadb_port' => :'hanadb-port',
79
+ :'hanadb_revocation_statements' => :'hanadb-revocation-statements',
80
+ :'hanadb_username' => :'hanadb-username',
81
+ :'name' => :'name',
82
+ :'producer_encryption_key_name' => :'producer-encryption-key-name',
83
+ :'secure_access_bastion_issuer' => :'secure-access-bastion-issuer',
84
+ :'secure_access_db_schema' => :'secure-access-db-schema',
85
+ :'secure_access_enable' => :'secure-access-enable',
86
+ :'secure_access_host' => :'secure-access-host',
87
+ :'secure_access_web' => :'secure-access-web',
88
+ :'tags' => :'tags',
89
+ :'target_name' => :'target-name',
90
+ :'token' => :'token',
91
+ :'uid_token' => :'uid-token',
92
+ :'user_ttl' => :'user-ttl'
93
+ }
94
+ end
95
+
96
+ # Returns all the JSON keys this model knows about
97
+ def self.acceptable_attributes
98
+ attribute_map.values
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.openapi_types
103
+ {
104
+ :'hana_dbname' => :'String',
105
+ :'hanadb_create_statements' => :'String',
106
+ :'hanadb_host' => :'String',
107
+ :'hanadb_password' => :'String',
108
+ :'hanadb_port' => :'String',
109
+ :'hanadb_revocation_statements' => :'String',
110
+ :'hanadb_username' => :'String',
111
+ :'name' => :'String',
112
+ :'producer_encryption_key_name' => :'String',
113
+ :'secure_access_bastion_issuer' => :'String',
114
+ :'secure_access_db_schema' => :'String',
115
+ :'secure_access_enable' => :'String',
116
+ :'secure_access_host' => :'Array<String>',
117
+ :'secure_access_web' => :'Boolean',
118
+ :'tags' => :'Array<String>',
119
+ :'target_name' => :'String',
120
+ :'token' => :'String',
121
+ :'uid_token' => :'String',
122
+ :'user_ttl' => :'String'
123
+ }
124
+ end
125
+
126
+ # List of attributes with nullable: true
127
+ def self.openapi_nullable
128
+ Set.new([
129
+ ])
130
+ end
131
+
132
+ # Initializes the object
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ def initialize(attributes = {})
135
+ if (!attributes.is_a?(Hash))
136
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayCreateProducerHanaDb` initialize method"
137
+ end
138
+
139
+ # check to see if the attribute exists and convert string to symbol for hash key
140
+ attributes = attributes.each_with_object({}) { |(k, v), h|
141
+ if (!self.class.attribute_map.key?(k.to_sym))
142
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayCreateProducerHanaDb`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
143
+ end
144
+ h[k.to_sym] = v
145
+ }
146
+
147
+ if attributes.key?(:'hana_dbname')
148
+ self.hana_dbname = attributes[:'hana_dbname']
149
+ end
150
+
151
+ if attributes.key?(:'hanadb_create_statements')
152
+ self.hanadb_create_statements = attributes[:'hanadb_create_statements']
153
+ end
154
+
155
+ if attributes.key?(:'hanadb_host')
156
+ self.hanadb_host = attributes[:'hanadb_host']
157
+ else
158
+ self.hanadb_host = '127.0.0.1'
159
+ end
160
+
161
+ if attributes.key?(:'hanadb_password')
162
+ self.hanadb_password = attributes[:'hanadb_password']
163
+ end
164
+
165
+ if attributes.key?(:'hanadb_port')
166
+ self.hanadb_port = attributes[:'hanadb_port']
167
+ else
168
+ self.hanadb_port = '443'
169
+ end
170
+
171
+ if attributes.key?(:'hanadb_revocation_statements')
172
+ self.hanadb_revocation_statements = attributes[:'hanadb_revocation_statements']
173
+ end
174
+
175
+ if attributes.key?(:'hanadb_username')
176
+ self.hanadb_username = attributes[:'hanadb_username']
177
+ end
178
+
179
+ if attributes.key?(:'name')
180
+ self.name = attributes[:'name']
181
+ end
182
+
183
+ if attributes.key?(:'producer_encryption_key_name')
184
+ self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
185
+ end
186
+
187
+ if attributes.key?(:'secure_access_bastion_issuer')
188
+ self.secure_access_bastion_issuer = attributes[:'secure_access_bastion_issuer']
189
+ end
190
+
191
+ if attributes.key?(:'secure_access_db_schema')
192
+ self.secure_access_db_schema = attributes[:'secure_access_db_schema']
193
+ end
194
+
195
+ if attributes.key?(:'secure_access_enable')
196
+ self.secure_access_enable = attributes[:'secure_access_enable']
197
+ end
198
+
199
+ if attributes.key?(:'secure_access_host')
200
+ if (value = attributes[:'secure_access_host']).is_a?(Array)
201
+ self.secure_access_host = value
202
+ end
203
+ end
204
+
205
+ if attributes.key?(:'secure_access_web')
206
+ self.secure_access_web = attributes[:'secure_access_web']
207
+ end
208
+
209
+ if attributes.key?(:'tags')
210
+ if (value = attributes[:'tags']).is_a?(Array)
211
+ self.tags = value
212
+ end
213
+ end
214
+
215
+ if attributes.key?(:'target_name')
216
+ self.target_name = attributes[:'target_name']
217
+ end
218
+
219
+ if attributes.key?(:'token')
220
+ self.token = attributes[:'token']
221
+ end
222
+
223
+ if attributes.key?(:'uid_token')
224
+ self.uid_token = attributes[:'uid_token']
225
+ end
226
+
227
+ if attributes.key?(:'user_ttl')
228
+ self.user_ttl = attributes[:'user_ttl']
229
+ else
230
+ self.user_ttl = '60m'
231
+ end
232
+ end
233
+
234
+ # Show invalid properties with the reasons. Usually used together with valid?
235
+ # @return Array for valid properties with the reasons
236
+ def list_invalid_properties
237
+ invalid_properties = Array.new
238
+ if @name.nil?
239
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
240
+ end
241
+
242
+ invalid_properties
243
+ end
244
+
245
+ # Check to see if the all the properties in the model are valid
246
+ # @return true if the model is valid
247
+ def valid?
248
+ return false if @name.nil?
249
+ true
250
+ end
251
+
252
+ # Checks equality by comparing each attribute.
253
+ # @param [Object] Object to be compared
254
+ def ==(o)
255
+ return true if self.equal?(o)
256
+ self.class == o.class &&
257
+ hana_dbname == o.hana_dbname &&
258
+ hanadb_create_statements == o.hanadb_create_statements &&
259
+ hanadb_host == o.hanadb_host &&
260
+ hanadb_password == o.hanadb_password &&
261
+ hanadb_port == o.hanadb_port &&
262
+ hanadb_revocation_statements == o.hanadb_revocation_statements &&
263
+ hanadb_username == o.hanadb_username &&
264
+ name == o.name &&
265
+ producer_encryption_key_name == o.producer_encryption_key_name &&
266
+ secure_access_bastion_issuer == o.secure_access_bastion_issuer &&
267
+ secure_access_db_schema == o.secure_access_db_schema &&
268
+ secure_access_enable == o.secure_access_enable &&
269
+ secure_access_host == o.secure_access_host &&
270
+ secure_access_web == o.secure_access_web &&
271
+ tags == o.tags &&
272
+ target_name == o.target_name &&
273
+ token == o.token &&
274
+ uid_token == o.uid_token &&
275
+ user_ttl == o.user_ttl
276
+ end
277
+
278
+ # @see the `==` method
279
+ # @param [Object] Object to be compared
280
+ def eql?(o)
281
+ self == o
282
+ end
283
+
284
+ # Calculates hash code according to all attributes.
285
+ # @return [Integer] Hash code
286
+ def hash
287
+ [hana_dbname, hanadb_create_statements, hanadb_host, hanadb_password, hanadb_port, hanadb_revocation_statements, hanadb_username, 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
288
+ end
289
+
290
+ # Builds the object from hash
291
+ # @param [Hash] attributes Model attributes in the form of hash
292
+ # @return [Object] Returns the model itself
293
+ def self.build_from_hash(attributes)
294
+ new.build_from_hash(attributes)
295
+ end
296
+
297
+ # Builds the object from hash
298
+ # @param [Hash] attributes Model attributes in the form of hash
299
+ # @return [Object] Returns the model itself
300
+ def build_from_hash(attributes)
301
+ return nil unless attributes.is_a?(Hash)
302
+ attributes = attributes.transform_keys(&:to_sym)
303
+ self.class.openapi_types.each_pair do |key, type|
304
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
305
+ self.send("#{key}=", nil)
306
+ elsif type =~ /\AArray<(.*)>/i
307
+ # check to ensure the input is an array given that the attribute
308
+ # is documented as an array but the input is not
309
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
310
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
311
+ end
312
+ elsif !attributes[self.class.attribute_map[key]].nil?
313
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
314
+ end
315
+ end
316
+
317
+ self
318
+ end
319
+
320
+ # Deserializes the data based on type
321
+ # @param string type Data type
322
+ # @param string value Value to be deserialized
323
+ # @return [Object] Deserialized data
324
+ def _deserialize(type, value)
325
+ case type.to_sym
326
+ when :Time
327
+ Time.parse(value)
328
+ when :Date
329
+ Date.parse(value)
330
+ when :String
331
+ value.to_s
332
+ when :Integer
333
+ value.to_i
334
+ when :Float
335
+ value.to_f
336
+ when :Boolean
337
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
338
+ true
339
+ else
340
+ false
341
+ end
342
+ when :Object
343
+ # generic object (usually a Hash), return directly
344
+ value
345
+ when /\AArray<(?<inner_type>.+)>\z/
346
+ inner_type = Regexp.last_match[:inner_type]
347
+ value.map { |v| _deserialize(inner_type, v) }
348
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
349
+ k_type = Regexp.last_match[:k_type]
350
+ v_type = Regexp.last_match[:v_type]
351
+ {}.tap do |hash|
352
+ value.each do |k, v|
353
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
354
+ end
355
+ end
356
+ else # model
357
+ # models (e.g. Pet) or oneOf
358
+ klass = Akeyless.const_get(type)
359
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
360
+ end
361
+ end
362
+
363
+ # Returns the string representation of the object
364
+ # @return [String] String presentation of the object
365
+ def to_s
366
+ to_hash.to_s
367
+ end
368
+
369
+ # to_body is an alias to to_hash (backward compatibility)
370
+ # @return [Hash] Returns the object in the form of hash
371
+ def to_body
372
+ to_hash
373
+ end
374
+
375
+ # Returns the object in the form of hash
376
+ # @return [Hash] Returns the object in the form of hash
377
+ def to_hash
378
+ hash = {}
379
+ self.class.attribute_map.each_pair do |attr, param|
380
+ value = self.send(attr)
381
+ if value.nil?
382
+ is_nullable = self.class.openapi_nullable.include?(attr)
383
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
384
+ end
385
+
386
+ hash[param] = _to_hash(value)
387
+ end
388
+ hash
389
+ end
390
+
391
+ # Outputs non-array value in the form of hash
392
+ # For object, use to_hash. Otherwise, just return the value
393
+ # @param [Object] value Any valid value
394
+ # @return [Hash] Returns the value in the form of hash
395
+ def _to_hash(value)
396
+ if value.is_a?(Array)
397
+ value.compact.map { |v| _to_hash(v) }
398
+ elsif value.is_a?(Hash)
399
+ {}.tap do |hash|
400
+ value.each { |k, v| hash[k] = _to_hash(v) }
401
+ end
402
+ elsif value.respond_to? :to_hash
403
+ value.to_hash
404
+ else
405
+ value
406
+ end
407
+ end
408
+
409
+ end
410
+
411
+ end