akeyless 3.3.12 → 3.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/docs/AccessPermissionAssignment.md +20 -0
- data/docs/CreateAuthMethodEmail.md +36 -0
- data/docs/CreateAuthMethodEmailOutput.md +18 -0
- data/docs/CreatePKICertIssuer.md +2 -0
- data/docs/EsmDeleteSecretOutput.md +18 -0
- data/docs/EsmGetSecretOutput.md +2 -0
- data/docs/EsmUpdateSecretOutput.md +2 -0
- data/docs/GoogleChronicleForwardingConfig.md +24 -0
- data/docs/ItemGeneralInfo.md +2 -0
- data/docs/LogForwardingConfigPart.md +2 -0
- data/docs/OidcClientInfo.md +34 -0
- data/docs/UpdatePKICertIssuer.md +2 -0
- data/docs/V2Api.md +319 -4
- data/lib/akeyless/api/v2_api.rb +323 -3
- data/lib/akeyless/models/access_permission_assignment.rb +230 -0
- data/lib/akeyless/models/create_auth_method_email.rb +331 -0
- data/lib/akeyless/models/create_auth_method_email_output.rb +219 -0
- data/lib/akeyless/models/create_pki_cert_issuer.rb +11 -1
- data/lib/akeyless/models/esm_delete_secret_output.rb +219 -0
- data/lib/akeyless/models/esm_get_secret_output.rb +10 -1
- data/lib/akeyless/models/esm_update_secret_output.rb +10 -1
- data/lib/akeyless/models/google_chronicle_forwarding_config.rb +246 -0
- data/lib/akeyless/models/item_general_info.rb +10 -1
- data/lib/akeyless/models/log_forwarding_config_part.rb +10 -1
- data/lib/akeyless/models/oidc_client_info.rb +305 -0
- data/lib/akeyless/models/update_pki_cert_issuer.rb +11 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +6 -0
- data/spec/models/access_permission_assignment_spec.rb +40 -0
- data/spec/models/create_auth_method_email_output_spec.rb +34 -0
- data/spec/models/create_auth_method_email_spec.rb +88 -0
- data/spec/models/esm_delete_secret_output_spec.rb +34 -0
- data/spec/models/google_chronicle_forwarding_config_spec.rb +52 -0
- data/spec/models/oidc_client_info_spec.rb +82 -0
- metadata +649 -625
data/lib/akeyless/api/v2_api.rb
CHANGED
@@ -659,6 +659,70 @@ module Akeyless
|
|
659
659
|
return data, status_code, headers
|
660
660
|
end
|
661
661
|
|
662
|
+
# @param body [CreateAuthMethodEmail]
|
663
|
+
# @param [Hash] opts the optional parameters
|
664
|
+
# @return [CreateAuthMethodEmailOutput]
|
665
|
+
def create_auth_method_email(body, opts = {})
|
666
|
+
data, _status_code, _headers = create_auth_method_email_with_http_info(body, opts)
|
667
|
+
data
|
668
|
+
end
|
669
|
+
|
670
|
+
# @param body [CreateAuthMethodEmail]
|
671
|
+
# @param [Hash] opts the optional parameters
|
672
|
+
# @return [Array<(CreateAuthMethodEmailOutput, Integer, Hash)>] CreateAuthMethodEmailOutput data, response status code and response headers
|
673
|
+
def create_auth_method_email_with_http_info(body, opts = {})
|
674
|
+
if @api_client.config.debugging
|
675
|
+
@api_client.config.logger.debug 'Calling API: V2Api.create_auth_method_email ...'
|
676
|
+
end
|
677
|
+
# verify the required parameter 'body' is set
|
678
|
+
if @api_client.config.client_side_validation && body.nil?
|
679
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.create_auth_method_email"
|
680
|
+
end
|
681
|
+
# resource path
|
682
|
+
local_var_path = '/create-auth-method-email'
|
683
|
+
|
684
|
+
# query parameters
|
685
|
+
query_params = opts[:query_params] || {}
|
686
|
+
|
687
|
+
# header parameters
|
688
|
+
header_params = opts[:header_params] || {}
|
689
|
+
# HTTP header 'Accept' (if needed)
|
690
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
691
|
+
# HTTP header 'Content-Type'
|
692
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
693
|
+
if !content_type.nil?
|
694
|
+
header_params['Content-Type'] = content_type
|
695
|
+
end
|
696
|
+
|
697
|
+
# form parameters
|
698
|
+
form_params = opts[:form_params] || {}
|
699
|
+
|
700
|
+
# http body (model)
|
701
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
702
|
+
|
703
|
+
# return_type
|
704
|
+
return_type = opts[:debug_return_type] || 'CreateAuthMethodEmailOutput'
|
705
|
+
|
706
|
+
# auth_names
|
707
|
+
auth_names = opts[:debug_auth_names] || []
|
708
|
+
|
709
|
+
new_options = opts.merge(
|
710
|
+
:operation => :"V2Api.create_auth_method_email",
|
711
|
+
:header_params => header_params,
|
712
|
+
:query_params => query_params,
|
713
|
+
:form_params => form_params,
|
714
|
+
:body => post_body,
|
715
|
+
:auth_names => auth_names,
|
716
|
+
:return_type => return_type
|
717
|
+
)
|
718
|
+
|
719
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
720
|
+
if @api_client.config.debugging
|
721
|
+
@api_client.config.logger.debug "API called: V2Api#create_auth_method_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
722
|
+
end
|
723
|
+
return data, status_code, headers
|
724
|
+
end
|
725
|
+
|
662
726
|
# @param body [CreateAuthMethodGCP]
|
663
727
|
# @param [Hash] opts the optional parameters
|
664
728
|
# @return [CreateAuthMethodGCPOutput]
|
@@ -5013,7 +5077,7 @@ module Akeyless
|
|
5013
5077
|
|
5014
5078
|
# @param body [EsmDelete]
|
5015
5079
|
# @param [Hash] opts the optional parameters
|
5016
|
-
# @return [
|
5080
|
+
# @return [EsmDeleteSecretOutput]
|
5017
5081
|
def esm_delete(body, opts = {})
|
5018
5082
|
data, _status_code, _headers = esm_delete_with_http_info(body, opts)
|
5019
5083
|
data
|
@@ -5021,7 +5085,7 @@ module Akeyless
|
|
5021
5085
|
|
5022
5086
|
# @param body [EsmDelete]
|
5023
5087
|
# @param [Hash] opts the optional parameters
|
5024
|
-
# @return [Array<(
|
5088
|
+
# @return [Array<(EsmDeleteSecretOutput, Integer, Hash)>] EsmDeleteSecretOutput data, response status code and response headers
|
5025
5089
|
def esm_delete_with_http_info(body, opts = {})
|
5026
5090
|
if @api_client.config.debugging
|
5027
5091
|
@api_client.config.logger.debug 'Calling API: V2Api.esm_delete ...'
|
@@ -5053,7 +5117,7 @@ module Akeyless
|
|
5053
5117
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
5054
5118
|
|
5055
5119
|
# return_type
|
5056
|
-
return_type = opts[:debug_return_type] || '
|
5120
|
+
return_type = opts[:debug_return_type] || 'EsmDeleteSecretOutput'
|
5057
5121
|
|
5058
5122
|
# auth_names
|
5059
5123
|
auth_names = opts[:debug_auth_names] || []
|
@@ -5384,6 +5448,70 @@ module Akeyless
|
|
5384
5448
|
return data, status_code, headers
|
5385
5449
|
end
|
5386
5450
|
|
5451
|
+
# @param body [AllowedAccessArgs]
|
5452
|
+
# @param [Hash] opts the optional parameters
|
5453
|
+
# @return [AllowedAccess]
|
5454
|
+
def gateway_create_allowed_access(body, opts = {})
|
5455
|
+
data, _status_code, _headers = gateway_create_allowed_access_with_http_info(body, opts)
|
5456
|
+
data
|
5457
|
+
end
|
5458
|
+
|
5459
|
+
# @param body [AllowedAccessArgs]
|
5460
|
+
# @param [Hash] opts the optional parameters
|
5461
|
+
# @return [Array<(AllowedAccess, Integer, Hash)>] AllowedAccess data, response status code and response headers
|
5462
|
+
def gateway_create_allowed_access_with_http_info(body, opts = {})
|
5463
|
+
if @api_client.config.debugging
|
5464
|
+
@api_client.config.logger.debug 'Calling API: V2Api.gateway_create_allowed_access ...'
|
5465
|
+
end
|
5466
|
+
# verify the required parameter 'body' is set
|
5467
|
+
if @api_client.config.client_side_validation && body.nil?
|
5468
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.gateway_create_allowed_access"
|
5469
|
+
end
|
5470
|
+
# resource path
|
5471
|
+
local_var_path = '/gateway-create-allowed-access'
|
5472
|
+
|
5473
|
+
# query parameters
|
5474
|
+
query_params = opts[:query_params] || {}
|
5475
|
+
|
5476
|
+
# header parameters
|
5477
|
+
header_params = opts[:header_params] || {}
|
5478
|
+
# HTTP header 'Accept' (if needed)
|
5479
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
5480
|
+
# HTTP header 'Content-Type'
|
5481
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
5482
|
+
if !content_type.nil?
|
5483
|
+
header_params['Content-Type'] = content_type
|
5484
|
+
end
|
5485
|
+
|
5486
|
+
# form parameters
|
5487
|
+
form_params = opts[:form_params] || {}
|
5488
|
+
|
5489
|
+
# http body (model)
|
5490
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
5491
|
+
|
5492
|
+
# return_type
|
5493
|
+
return_type = opts[:debug_return_type] || 'AllowedAccess'
|
5494
|
+
|
5495
|
+
# auth_names
|
5496
|
+
auth_names = opts[:debug_auth_names] || []
|
5497
|
+
|
5498
|
+
new_options = opts.merge(
|
5499
|
+
:operation => :"V2Api.gateway_create_allowed_access",
|
5500
|
+
:header_params => header_params,
|
5501
|
+
:query_params => query_params,
|
5502
|
+
:form_params => form_params,
|
5503
|
+
:body => post_body,
|
5504
|
+
:auth_names => auth_names,
|
5505
|
+
:return_type => return_type
|
5506
|
+
)
|
5507
|
+
|
5508
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
5509
|
+
if @api_client.config.debugging
|
5510
|
+
@api_client.config.logger.debug "API called: V2Api#gateway_create_allowed_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
5511
|
+
end
|
5512
|
+
return data, status_code, headers
|
5513
|
+
end
|
5514
|
+
|
5387
5515
|
# @param body [GatewayCreateK8SAuthConfig]
|
5388
5516
|
# @param [Hash] opts the optional parameters
|
5389
5517
|
# @return [GatewayCreateK8SAuthConfigOutput]
|
@@ -7108,6 +7236,70 @@ module Akeyless
|
|
7108
7236
|
return data, status_code, headers
|
7109
7237
|
end
|
7110
7238
|
|
7239
|
+
# @param body [AllowedAccessDeleteArgs]
|
7240
|
+
# @param [Hash] opts the optional parameters
|
7241
|
+
# @return [GatewayDeleteAllowedAccessOutput]
|
7242
|
+
def gateway_delete_allowed_access(body, opts = {})
|
7243
|
+
data, _status_code, _headers = gateway_delete_allowed_access_with_http_info(body, opts)
|
7244
|
+
data
|
7245
|
+
end
|
7246
|
+
|
7247
|
+
# @param body [AllowedAccessDeleteArgs]
|
7248
|
+
# @param [Hash] opts the optional parameters
|
7249
|
+
# @return [Array<(GatewayDeleteAllowedAccessOutput, Integer, Hash)>] GatewayDeleteAllowedAccessOutput data, response status code and response headers
|
7250
|
+
def gateway_delete_allowed_access_with_http_info(body, opts = {})
|
7251
|
+
if @api_client.config.debugging
|
7252
|
+
@api_client.config.logger.debug 'Calling API: V2Api.gateway_delete_allowed_access ...'
|
7253
|
+
end
|
7254
|
+
# verify the required parameter 'body' is set
|
7255
|
+
if @api_client.config.client_side_validation && body.nil?
|
7256
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.gateway_delete_allowed_access"
|
7257
|
+
end
|
7258
|
+
# resource path
|
7259
|
+
local_var_path = '/gateway-delete-allowed-access'
|
7260
|
+
|
7261
|
+
# query parameters
|
7262
|
+
query_params = opts[:query_params] || {}
|
7263
|
+
|
7264
|
+
# header parameters
|
7265
|
+
header_params = opts[:header_params] || {}
|
7266
|
+
# HTTP header 'Accept' (if needed)
|
7267
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
7268
|
+
# HTTP header 'Content-Type'
|
7269
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
7270
|
+
if !content_type.nil?
|
7271
|
+
header_params['Content-Type'] = content_type
|
7272
|
+
end
|
7273
|
+
|
7274
|
+
# form parameters
|
7275
|
+
form_params = opts[:form_params] || {}
|
7276
|
+
|
7277
|
+
# http body (model)
|
7278
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
7279
|
+
|
7280
|
+
# return_type
|
7281
|
+
return_type = opts[:debug_return_type] || 'GatewayDeleteAllowedAccessOutput'
|
7282
|
+
|
7283
|
+
# auth_names
|
7284
|
+
auth_names = opts[:debug_auth_names] || []
|
7285
|
+
|
7286
|
+
new_options = opts.merge(
|
7287
|
+
:operation => :"V2Api.gateway_delete_allowed_access",
|
7288
|
+
:header_params => header_params,
|
7289
|
+
:query_params => query_params,
|
7290
|
+
:form_params => form_params,
|
7291
|
+
:body => post_body,
|
7292
|
+
:auth_names => auth_names,
|
7293
|
+
:return_type => return_type
|
7294
|
+
)
|
7295
|
+
|
7296
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
7297
|
+
if @api_client.config.debugging
|
7298
|
+
@api_client.config.logger.debug "API called: V2Api#gateway_delete_allowed_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
7299
|
+
end
|
7300
|
+
return data, status_code, headers
|
7301
|
+
end
|
7302
|
+
|
7111
7303
|
# @param body [GatewayDeleteK8SAuthConfig]
|
7112
7304
|
# @param [Hash] opts the optional parameters
|
7113
7305
|
# @return [GatewayDeleteK8SAuthConfigOutput]
|
@@ -7364,6 +7556,70 @@ module Akeyless
|
|
7364
7556
|
return data, status_code, headers
|
7365
7557
|
end
|
7366
7558
|
|
7559
|
+
# @param body [AllowedAccessArgs]
|
7560
|
+
# @param [Hash] opts the optional parameters
|
7561
|
+
# @return [AllowedAccess]
|
7562
|
+
def gateway_get_allowed_access(body, opts = {})
|
7563
|
+
data, _status_code, _headers = gateway_get_allowed_access_with_http_info(body, opts)
|
7564
|
+
data
|
7565
|
+
end
|
7566
|
+
|
7567
|
+
# @param body [AllowedAccessArgs]
|
7568
|
+
# @param [Hash] opts the optional parameters
|
7569
|
+
# @return [Array<(AllowedAccess, Integer, Hash)>] AllowedAccess data, response status code and response headers
|
7570
|
+
def gateway_get_allowed_access_with_http_info(body, opts = {})
|
7571
|
+
if @api_client.config.debugging
|
7572
|
+
@api_client.config.logger.debug 'Calling API: V2Api.gateway_get_allowed_access ...'
|
7573
|
+
end
|
7574
|
+
# verify the required parameter 'body' is set
|
7575
|
+
if @api_client.config.client_side_validation && body.nil?
|
7576
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.gateway_get_allowed_access"
|
7577
|
+
end
|
7578
|
+
# resource path
|
7579
|
+
local_var_path = '/gateway-get-allowed-access'
|
7580
|
+
|
7581
|
+
# query parameters
|
7582
|
+
query_params = opts[:query_params] || {}
|
7583
|
+
|
7584
|
+
# header parameters
|
7585
|
+
header_params = opts[:header_params] || {}
|
7586
|
+
# HTTP header 'Accept' (if needed)
|
7587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
7588
|
+
# HTTP header 'Content-Type'
|
7589
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
7590
|
+
if !content_type.nil?
|
7591
|
+
header_params['Content-Type'] = content_type
|
7592
|
+
end
|
7593
|
+
|
7594
|
+
# form parameters
|
7595
|
+
form_params = opts[:form_params] || {}
|
7596
|
+
|
7597
|
+
# http body (model)
|
7598
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
7599
|
+
|
7600
|
+
# return_type
|
7601
|
+
return_type = opts[:debug_return_type] || 'AllowedAccess'
|
7602
|
+
|
7603
|
+
# auth_names
|
7604
|
+
auth_names = opts[:debug_auth_names] || []
|
7605
|
+
|
7606
|
+
new_options = opts.merge(
|
7607
|
+
:operation => :"V2Api.gateway_get_allowed_access",
|
7608
|
+
:header_params => header_params,
|
7609
|
+
:query_params => query_params,
|
7610
|
+
:form_params => form_params,
|
7611
|
+
:body => post_body,
|
7612
|
+
:auth_names => auth_names,
|
7613
|
+
:return_type => return_type
|
7614
|
+
)
|
7615
|
+
|
7616
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
7617
|
+
if @api_client.config.debugging
|
7618
|
+
@api_client.config.logger.debug "API called: V2Api#gateway_get_allowed_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
7619
|
+
end
|
7620
|
+
return data, status_code, headers
|
7621
|
+
end
|
7622
|
+
|
7367
7623
|
# @param body [GatewayGetConfig]
|
7368
7624
|
# @param [Hash] opts the optional parameters
|
7369
7625
|
# @return [AkeylessGatewayConfig]
|
@@ -8320,6 +8576,70 @@ module Akeyless
|
|
8320
8576
|
return data, status_code, headers
|
8321
8577
|
end
|
8322
8578
|
|
8579
|
+
# @param body [AllowedAccessUpdateArgs]
|
8580
|
+
# @param [Hash] opts the optional parameters
|
8581
|
+
# @return [AllowedAccess]
|
8582
|
+
def gateway_update_allowed_access(body, opts = {})
|
8583
|
+
data, _status_code, _headers = gateway_update_allowed_access_with_http_info(body, opts)
|
8584
|
+
data
|
8585
|
+
end
|
8586
|
+
|
8587
|
+
# @param body [AllowedAccessUpdateArgs]
|
8588
|
+
# @param [Hash] opts the optional parameters
|
8589
|
+
# @return [Array<(AllowedAccess, Integer, Hash)>] AllowedAccess data, response status code and response headers
|
8590
|
+
def gateway_update_allowed_access_with_http_info(body, opts = {})
|
8591
|
+
if @api_client.config.debugging
|
8592
|
+
@api_client.config.logger.debug 'Calling API: V2Api.gateway_update_allowed_access ...'
|
8593
|
+
end
|
8594
|
+
# verify the required parameter 'body' is set
|
8595
|
+
if @api_client.config.client_side_validation && body.nil?
|
8596
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.gateway_update_allowed_access"
|
8597
|
+
end
|
8598
|
+
# resource path
|
8599
|
+
local_var_path = '/gateway-update-allowed-access'
|
8600
|
+
|
8601
|
+
# query parameters
|
8602
|
+
query_params = opts[:query_params] || {}
|
8603
|
+
|
8604
|
+
# header parameters
|
8605
|
+
header_params = opts[:header_params] || {}
|
8606
|
+
# HTTP header 'Accept' (if needed)
|
8607
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
8608
|
+
# HTTP header 'Content-Type'
|
8609
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
8610
|
+
if !content_type.nil?
|
8611
|
+
header_params['Content-Type'] = content_type
|
8612
|
+
end
|
8613
|
+
|
8614
|
+
# form parameters
|
8615
|
+
form_params = opts[:form_params] || {}
|
8616
|
+
|
8617
|
+
# http body (model)
|
8618
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
8619
|
+
|
8620
|
+
# return_type
|
8621
|
+
return_type = opts[:debug_return_type] || 'AllowedAccess'
|
8622
|
+
|
8623
|
+
# auth_names
|
8624
|
+
auth_names = opts[:debug_auth_names] || []
|
8625
|
+
|
8626
|
+
new_options = opts.merge(
|
8627
|
+
:operation => :"V2Api.gateway_update_allowed_access",
|
8628
|
+
:header_params => header_params,
|
8629
|
+
:query_params => query_params,
|
8630
|
+
:form_params => form_params,
|
8631
|
+
:body => post_body,
|
8632
|
+
:auth_names => auth_names,
|
8633
|
+
:return_type => return_type
|
8634
|
+
)
|
8635
|
+
|
8636
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
8637
|
+
if @api_client.config.debugging
|
8638
|
+
@api_client.config.logger.debug "API called: V2Api#gateway_update_allowed_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
8639
|
+
end
|
8640
|
+
return data, status_code, headers
|
8641
|
+
end
|
8642
|
+
|
8323
8643
|
# @param body [GatewayUpdateItem]
|
8324
8644
|
# @param [Hash] opts the optional parameters
|
8325
8645
|
# @return [GatewayUpdateItemOutput]
|
@@ -0,0 +1,230 @@
|
|
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: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class AccessPermissionAssignment
|
18
|
+
attr_accessor :access_id
|
19
|
+
|
20
|
+
attr_accessor :sub_claims
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'access_id' => :'access_id',
|
26
|
+
:'sub_claims' => :'sub_claims'
|
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
|
+
:'access_id' => :'String',
|
39
|
+
:'sub_claims' => :'Hash<String, Array<String>>'
|
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::AccessPermissionAssignment` 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::AccessPermissionAssignment`. 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?(:'access_id')
|
65
|
+
self.access_id = attributes[:'access_id']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'sub_claims')
|
69
|
+
if (value = attributes[:'sub_claims']).is_a?(Hash)
|
70
|
+
self.sub_claims = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
access_id == o.access_id &&
|
94
|
+
sub_claims == o.sub_claims
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[access_id, sub_claims].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :Boolean
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = Akeyless.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|