Class: Akeyless::GatewayUpdateMigration
- Inherits:
-
Object
- Object
- Akeyless::GatewayUpdateMigration
- Defined in:
- lib/akeyless/models/gateway_update_migration.rb
Overview
gatewayUpdateMigration is a command that update migration
Instance Attribute Summary collapse
-
#aws_key ⇒ Object
AWS Secret Access Key (relevant only for AWS migration).
-
#aws_key_id ⇒ Object
AWS Access Key ID with sufficient permissions to get all secrets, e.g.
-
#aws_region ⇒ Object
AWS region of the required Secrets Manager (relevant only for AWS migration).
-
#azure_client_id ⇒ Object
Azure Key Vault Access client ID, should be Azure AD App with a service principal (relevant only for Azure Key Vault migration).
-
#azure_kv_name ⇒ Object
Azure Key Vault Name (relevant only for Azure Key Vault migration).
-
#azure_secret ⇒ Object
Azure Key Vault secret (relevant only for Azure Key Vault migration).
-
#azure_tenant_id ⇒ Object
Azure Key Vault Access tenant ID (relevant only for Azure Key Vault migration).
-
#gcp_key ⇒ Object
Base64-encoded GCP Service Account private key text with sufficient permissions to Secrets Manager, Minimum required permission is Secret Manager Secret Accessor, e.g.
-
#hashi_json ⇒ Object
Import secret key as json value or independent secrets (relevant only for HasiCorp Vault migration).
-
#hashi_ns ⇒ Object
HashiCorp Vault Namespaces is a comma-separated list of namespaces which need to be imported into Akeyless Vault.
-
#hashi_token ⇒ Object
HashiCorp Vault access token with sufficient permissions to preform list & read operations on secrets objects (relevant only for HasiCorp Vault migration).
-
#hashi_url ⇒ Object
HashiCorp Vault API URL, e.g.
-
#id ⇒ Object
Migration ID (Can be retrieved with gateway-list-migration command).
-
#json ⇒ Object
Set output format to JSON.
-
#k8s_ca_certificate ⇒ Object
For Certificate Authentication method K8s Cluster CA certificate (relevant only for K8s migration with Certificate Authentication method).
-
#k8s_client_certificate ⇒ Object
K8s Client certificate with sufficient permission to list and get secrets in the namespace(s) you selected (relevant only for K8s migration with Certificate Authentication method).
-
#k8s_client_key ⇒ Object
K8s Client key (relevant only for K8s migration with Certificate Authentication method).
-
#k8s_namespace ⇒ Object
K8s Namespace, Use this field to import secrets from a particular namespace only.
-
#k8s_password ⇒ Object
K8s Client password (relevant only for K8s migration with Password Authentication method).
-
#k8s_skip_system ⇒ Object
K8s Skip Control Plane Secrets, This option allows to avoid importing secrets from system namespaces (relevant only for K8s migration).
-
#k8s_token ⇒ Object
For Token Authentication method K8s Bearer Token with sufficient permission to list and get secrets in the namespace(s) you selected (relevant only for K8s migration with Token Authentication method).
-
#k8s_url ⇒ Object
K8s API Server URL, e.g.
-
#k8s_username ⇒ Object
For Password Authentication method K8s Client username with sufficient permission to list and get secrets in the namespace(s) you selected (relevant only for K8s migration with Password Authentication method).
-
#name ⇒ Object
Migration name.
-
#new_name ⇒ Object
New migration name.
-
#op_email ⇒ Object
1Password user email to connect to the API.
-
#op_password ⇒ Object
1Password user password to connect to the API.
-
#op_secret_key ⇒ Object
1Password user secret key to connect to the API.
-
#op_url ⇒ Object
1Password api container url.
-
#op_vaults ⇒ Object
1Password list of vault to get the items from.
-
#protection_key ⇒ Object
The name of the key that protects the classic key value (if empty, the account default key will be used).
-
#target_location ⇒ Object
Target location in Akeyless for imported secrets.
-
#token ⇒ Object
Authentication token (see
/authand/configure). -
#uid_token ⇒ Object
The universal identity token, Required only for universal_identity authentication.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GatewayUpdateMigration
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ GatewayUpdateMigration
Initializes the object
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 214 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayUpdateMigration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayUpdateMigration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'aws_key') self.aws_key = attributes[:'aws_key'] end if attributes.key?(:'aws_key_id') self.aws_key_id = attributes[:'aws_key_id'] end if attributes.key?(:'aws_region') self.aws_region = attributes[:'aws_region'] end if attributes.key?(:'azure_client_id') self.azure_client_id = attributes[:'azure_client_id'] end if attributes.key?(:'azure_kv_name') self.azure_kv_name = attributes[:'azure_kv_name'] end if attributes.key?(:'azure_secret') self.azure_secret = attributes[:'azure_secret'] end if attributes.key?(:'azure_tenant_id') self.azure_tenant_id = attributes[:'azure_tenant_id'] end if attributes.key?(:'gcp_key') self.gcp_key = attributes[:'gcp_key'] end if attributes.key?(:'hashi_json') self.hashi_json = attributes[:'hashi_json'] end if attributes.key?(:'hashi_ns') if (value = attributes[:'hashi_ns']).is_a?(Array) self.hashi_ns = value end end if attributes.key?(:'hashi_token') self.hashi_token = attributes[:'hashi_token'] end if attributes.key?(:'hashi_url') self.hashi_url = attributes[:'hashi_url'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'json') self.json = attributes[:'json'] end if attributes.key?(:'k8s_ca_certificate') if (value = attributes[:'k8s_ca_certificate']).is_a?(Array) self.k8s_ca_certificate = value end end if attributes.key?(:'k8s_client_certificate') if (value = attributes[:'k8s_client_certificate']).is_a?(Array) self.k8s_client_certificate = value end end if attributes.key?(:'k8s_client_key') if (value = attributes[:'k8s_client_key']).is_a?(Array) self.k8s_client_key = value end end if attributes.key?(:'k8s_namespace') self.k8s_namespace = attributes[:'k8s_namespace'] end if attributes.key?(:'k8s_password') self.k8s_password = attributes[:'k8s_password'] end if attributes.key?(:'k8s_skip_system') self.k8s_skip_system = attributes[:'k8s_skip_system'] end if attributes.key?(:'k8s_token') self.k8s_token = attributes[:'k8s_token'] end if attributes.key?(:'k8s_url') self.k8s_url = attributes[:'k8s_url'] end if attributes.key?(:'k8s_username') self.k8s_username = attributes[:'k8s_username'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'new_name') self.new_name = attributes[:'new_name'] end if attributes.key?(:'op_email') self.op_email = attributes[:'op_email'] end if attributes.key?(:'op_password') self.op_password = attributes[:'op_password'] end if attributes.key?(:'op_secret_key') self.op_secret_key = attributes[:'op_secret_key'] end if attributes.key?(:'op_url') self.op_url = attributes[:'op_url'] end if attributes.key?(:'op_vaults') if (value = attributes[:'op_vaults']).is_a?(Array) self.op_vaults = value end end if attributes.key?(:'protection_key') self.protection_key = attributes[:'protection_key'] end if attributes.key?(:'target_location') self.target_location = attributes[:'target_location'] end if attributes.key?(:'token') self.token = attributes[:'token'] end if attributes.key?(:'uid_token') self.uid_token = attributes[:'uid_token'] end end |
Instance Attribute Details
#aws_key ⇒ Object
AWS Secret Access Key (relevant only for AWS migration)
20 21 22 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 20 def aws_key @aws_key end |
#aws_key_id ⇒ Object
AWS Access Key ID with sufficient permissions to get all secrets, e.g. 'arn:aws:secretsmanager:[Region]:[AccountId]:secret:[/path/to/secrets/*]' (relevant only for AWS migration)
23 24 25 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 23 def aws_key_id @aws_key_id end |
#aws_region ⇒ Object
AWS region of the required Secrets Manager (relevant only for AWS migration)
26 27 28 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 26 def aws_region @aws_region end |
#azure_client_id ⇒ Object
Azure Key Vault Access client ID, should be Azure AD App with a service principal (relevant only for Azure Key Vault migration)
29 30 31 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 29 def azure_client_id @azure_client_id end |
#azure_kv_name ⇒ Object
Azure Key Vault Name (relevant only for Azure Key Vault migration)
32 33 34 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 32 def azure_kv_name @azure_kv_name end |
#azure_secret ⇒ Object
Azure Key Vault secret (relevant only for Azure Key Vault migration)
35 36 37 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 35 def azure_secret @azure_secret end |
#azure_tenant_id ⇒ Object
Azure Key Vault Access tenant ID (relevant only for Azure Key Vault migration)
38 39 40 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 38 def azure_tenant_id @azure_tenant_id end |
#gcp_key ⇒ Object
Base64-encoded GCP Service Account private key text with sufficient permissions to Secrets Manager, Minimum required permission is Secret Manager Secret Accessor, e.g. 'roles/secretmanager.secretAccessor' (relevant only for GCP migration)
41 42 43 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 41 def gcp_key @gcp_key end |
#hashi_json ⇒ Object
Import secret key as json value or independent secrets (relevant only for HasiCorp Vault migration)
44 45 46 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 44 def hashi_json @hashi_json end |
#hashi_ns ⇒ Object
HashiCorp Vault Namespaces is a comma-separated list of namespaces which need to be imported into Akeyless Vault. For every provided namespace, all its child namespaces are imported as well, e.g. nmsp/subnmsp1/subnmsp2,nmsp/anothernmsp. By default, import all namespaces (relevant only for HasiCorp Vault migration)
47 48 49 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 47 def hashi_ns @hashi_ns end |
#hashi_token ⇒ Object
HashiCorp Vault access token with sufficient permissions to preform list & read operations on secrets objects (relevant only for HasiCorp Vault migration)
50 51 52 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 50 def hashi_token @hashi_token end |
#hashi_url ⇒ Object
HashiCorp Vault API URL, e.g. https://vault-mgr01:8200 (relevant only for HasiCorp Vault migration)
53 54 55 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 53 def hashi_url @hashi_url end |
#id ⇒ Object
Migration ID (Can be retrieved with gateway-list-migration command)
56 57 58 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 56 def id @id end |
#json ⇒ Object
Set output format to JSON
59 60 61 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 59 def json @json end |
#k8s_ca_certificate ⇒ Object
For Certificate Authentication method K8s Cluster CA certificate (relevant only for K8s migration with Certificate Authentication method)
62 63 64 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 62 def k8s_ca_certificate @k8s_ca_certificate end |
#k8s_client_certificate ⇒ Object
K8s Client certificate with sufficient permission to list and get secrets in the namespace(s) you selected (relevant only for K8s migration with Certificate Authentication method)
65 66 67 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 65 def k8s_client_certificate @k8s_client_certificate end |
#k8s_client_key ⇒ Object
K8s Client key (relevant only for K8s migration with Certificate Authentication method)
68 69 70 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 68 def k8s_client_key @k8s_client_key end |
#k8s_namespace ⇒ Object
K8s Namespace, Use this field to import secrets from a particular namespace only. By default, the secrets are imported from all namespaces (relevant only for K8s migration)
71 72 73 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 71 def k8s_namespace @k8s_namespace end |
#k8s_password ⇒ Object
K8s Client password (relevant only for K8s migration with Password Authentication method)
74 75 76 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 74 def k8s_password @k8s_password end |
#k8s_skip_system ⇒ Object
K8s Skip Control Plane Secrets, This option allows to avoid importing secrets from system namespaces (relevant only for K8s migration)
77 78 79 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 77 def k8s_skip_system @k8s_skip_system end |
#k8s_token ⇒ Object
For Token Authentication method K8s Bearer Token with sufficient permission to list and get secrets in the namespace(s) you selected (relevant only for K8s migration with Token Authentication method)
80 81 82 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 80 def k8s_token @k8s_token end |
#k8s_url ⇒ Object
K8s API Server URL, e.g. https://k8s-api.mycompany.com:6443 (relevant only for K8s migration)
83 84 85 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 83 def k8s_url @k8s_url end |
#k8s_username ⇒ Object
For Password Authentication method K8s Client username with sufficient permission to list and get secrets in the namespace(s) you selected (relevant only for K8s migration with Password Authentication method)
86 87 88 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 86 def k8s_username @k8s_username end |
#name ⇒ Object
Migration name
89 90 91 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 89 def name @name end |
#new_name ⇒ Object
New migration name
92 93 94 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 92 def new_name @new_name end |
#op_email ⇒ Object
1Password user email to connect to the API
95 96 97 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 95 def op_email @op_email end |
#op_password ⇒ Object
1Password user password to connect to the API
98 99 100 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 98 def op_password @op_password end |
#op_secret_key ⇒ Object
1Password user secret key to connect to the API
101 102 103 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 101 def op_secret_key @op_secret_key end |
#op_url ⇒ Object
1Password api container url
104 105 106 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 104 def op_url @op_url end |
#op_vaults ⇒ Object
1Password list of vault to get the items from
107 108 109 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 107 def op_vaults @op_vaults end |
#protection_key ⇒ Object
The name of the key that protects the classic key value (if empty, the account default key will be used)
110 111 112 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 110 def protection_key @protection_key end |
#target_location ⇒ Object
Target location in Akeyless for imported secrets
113 114 115 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 113 def target_location @target_location end |
#token ⇒ Object
Authentication token (see /auth and /configure)
116 117 118 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 116 def token @token end |
#uid_token ⇒ Object
The universal identity token, Required only for universal_identity authentication
119 120 121 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 119 def uid_token @uid_token end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
162 163 164 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 162 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 122 def self.attribute_map { :'aws_key' => :'aws-key', :'aws_key_id' => :'aws-key-id', :'aws_region' => :'aws-region', :'azure_client_id' => :'azure-client-id', :'azure_kv_name' => :'azure-kv-name', :'azure_secret' => :'azure-secret', :'azure_tenant_id' => :'azure-tenant-id', :'gcp_key' => :'gcp-key', :'hashi_json' => :'hashi-json', :'hashi_ns' => :'hashi-ns', :'hashi_token' => :'hashi-token', :'hashi_url' => :'hashi-url', :'id' => :'id', :'json' => :'json', :'k8s_ca_certificate' => :'k8s-ca-certificate', :'k8s_client_certificate' => :'k8s-client-certificate', :'k8s_client_key' => :'k8s-client-key', :'k8s_namespace' => :'k8s-namespace', :'k8s_password' => :'k8s-password', :'k8s_skip_system' => :'k8s-skip-system', :'k8s_token' => :'k8s-token', :'k8s_url' => :'k8s-url', :'k8s_username' => :'k8s-username', :'name' => :'name', :'new_name' => :'new_name', :'op_email' => :'op-email', :'op_password' => :'op-password', :'op_secret_key' => :'op-secret-key', :'op_url' => :'op-url', :'op_vaults' => :'op-vaults', :'protection_key' => :'protection-key', :'target_location' => :'target-location', :'token' => :'token', :'uid_token' => :'uid-token' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
443 444 445 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 443 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
207 208 209 210 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 207 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 167 def self.openapi_types { :'aws_key' => :'String', :'aws_key_id' => :'String', :'aws_region' => :'String', :'azure_client_id' => :'String', :'azure_kv_name' => :'String', :'azure_secret' => :'String', :'azure_tenant_id' => :'String', :'gcp_key' => :'String', :'hashi_json' => :'String', :'hashi_ns' => :'Array<String>', :'hashi_token' => :'String', :'hashi_url' => :'String', :'id' => :'String', :'json' => :'Boolean', :'k8s_ca_certificate' => :'Array<Integer>', :'k8s_client_certificate' => :'Array<Integer>', :'k8s_client_key' => :'Array<Integer>', :'k8s_namespace' => :'String', :'k8s_password' => :'String', :'k8s_skip_system' => :'Boolean', :'k8s_token' => :'String', :'k8s_url' => :'String', :'k8s_username' => :'String', :'name' => :'String', :'new_name' => :'String', :'op_email' => :'String', :'op_password' => :'String', :'op_secret_key' => :'String', :'op_url' => :'String', :'op_vaults' => :'Array<String>', :'protection_key' => :'String', :'target_location' => :'String', :'token' => :'String', :'uid_token' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 389 def ==(o) return true if self.equal?(o) self.class == o.class && aws_key == o.aws_key && aws_key_id == o.aws_key_id && aws_region == o.aws_region && azure_client_id == o.azure_client_id && azure_kv_name == o.azure_kv_name && azure_secret == o.azure_secret && azure_tenant_id == o.azure_tenant_id && gcp_key == o.gcp_key && hashi_json == o.hashi_json && hashi_ns == o.hashi_ns && hashi_token == o.hashi_token && hashi_url == o.hashi_url && id == o.id && json == o.json && k8s_ca_certificate == o.k8s_ca_certificate && k8s_client_certificate == o.k8s_client_certificate && k8s_client_key == o.k8s_client_key && k8s_namespace == o.k8s_namespace && k8s_password == o.k8s_password && k8s_skip_system == o.k8s_skip_system && k8s_token == o.k8s_token && k8s_url == o.k8s_url && k8s_username == o.k8s_username && name == o.name && new_name == o.new_name && op_email == o.op_email && op_password == o.op_password && op_secret_key == o.op_secret_key && op_url == o.op_url && op_vaults == o.op_vaults && protection_key == o.protection_key && target_location == o.target_location && token == o.token && uid_token == o.uid_token end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 474 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Akeyless.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
545 546 547 548 549 550 551 552 553 554 555 556 557 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 545 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 450 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
430 431 432 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 430 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
436 437 438 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 436 def hash [aws_key, aws_key_id, aws_region, azure_client_id, azure_kv_name, azure_secret, azure_tenant_id, gcp_key, hashi_json, hashi_ns, hashi_token, hashi_url, id, json, k8s_ca_certificate, k8s_client_certificate, k8s_client_key, k8s_namespace, k8s_password, k8s_skip_system, k8s_token, k8s_url, k8s_username, name, new_name, op_email, op_password, op_secret_key, op_url, op_vaults, protection_key, target_location, token, uid_token].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
376 377 378 379 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 376 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
521 522 523 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 521 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 527 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
515 516 517 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 515 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
383 384 385 |
# File 'lib/akeyless/models/gateway_update_migration.rb', line 383 def valid? true end |