@aws-sdk/client-kms 3.121.0 → 3.130.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3447,140 +3447,118 @@ const deserializeAws_json1_1UnsupportedOperationExceptionResponse = async (parse
3447
3447
  };
3448
3448
  const serializeAws_json1_1CancelKeyDeletionRequest = (input, context) => {
3449
3449
  return {
3450
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3450
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3451
3451
  };
3452
3452
  };
3453
3453
  const serializeAws_json1_1ConnectCustomKeyStoreRequest = (input, context) => {
3454
3454
  return {
3455
- ...(input.CustomKeyStoreId !== undefined &&
3456
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3455
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3457
3456
  };
3458
3457
  };
3459
3458
  const serializeAws_json1_1CreateAliasRequest = (input, context) => {
3460
3459
  return {
3461
- ...(input.AliasName !== undefined && input.AliasName !== null && { AliasName: input.AliasName }),
3462
- ...(input.TargetKeyId !== undefined && input.TargetKeyId !== null && { TargetKeyId: input.TargetKeyId }),
3460
+ ...(input.AliasName != null && { AliasName: input.AliasName }),
3461
+ ...(input.TargetKeyId != null && { TargetKeyId: input.TargetKeyId }),
3463
3462
  };
3464
3463
  };
3465
3464
  const serializeAws_json1_1CreateCustomKeyStoreRequest = (input, context) => {
3466
3465
  return {
3467
- ...(input.CloudHsmClusterId !== undefined &&
3468
- input.CloudHsmClusterId !== null && { CloudHsmClusterId: input.CloudHsmClusterId }),
3469
- ...(input.CustomKeyStoreName !== undefined &&
3470
- input.CustomKeyStoreName !== null && { CustomKeyStoreName: input.CustomKeyStoreName }),
3471
- ...(input.KeyStorePassword !== undefined &&
3472
- input.KeyStorePassword !== null && { KeyStorePassword: input.KeyStorePassword }),
3473
- ...(input.TrustAnchorCertificate !== undefined &&
3474
- input.TrustAnchorCertificate !== null && { TrustAnchorCertificate: input.TrustAnchorCertificate }),
3466
+ ...(input.CloudHsmClusterId != null && { CloudHsmClusterId: input.CloudHsmClusterId }),
3467
+ ...(input.CustomKeyStoreName != null && { CustomKeyStoreName: input.CustomKeyStoreName }),
3468
+ ...(input.KeyStorePassword != null && { KeyStorePassword: input.KeyStorePassword }),
3469
+ ...(input.TrustAnchorCertificate != null && { TrustAnchorCertificate: input.TrustAnchorCertificate }),
3475
3470
  };
3476
3471
  };
3477
3472
  const serializeAws_json1_1CreateGrantRequest = (input, context) => {
3478
3473
  return {
3479
- ...(input.Constraints !== undefined &&
3480
- input.Constraints !== null && { Constraints: serializeAws_json1_1GrantConstraints(input.Constraints, context) }),
3481
- ...(input.GrantTokens !== undefined &&
3482
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3483
- ...(input.GranteePrincipal !== undefined &&
3484
- input.GranteePrincipal !== null && { GranteePrincipal: input.GranteePrincipal }),
3485
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3486
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
3487
- ...(input.Operations !== undefined &&
3488
- input.Operations !== null && { Operations: serializeAws_json1_1GrantOperationList(input.Operations, context) }),
3489
- ...(input.RetiringPrincipal !== undefined &&
3490
- input.RetiringPrincipal !== null && { RetiringPrincipal: input.RetiringPrincipal }),
3474
+ ...(input.Constraints != null && { Constraints: serializeAws_json1_1GrantConstraints(input.Constraints, context) }),
3475
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3476
+ ...(input.GranteePrincipal != null && { GranteePrincipal: input.GranteePrincipal }),
3477
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3478
+ ...(input.Name != null && { Name: input.Name }),
3479
+ ...(input.Operations != null && { Operations: serializeAws_json1_1GrantOperationList(input.Operations, context) }),
3480
+ ...(input.RetiringPrincipal != null && { RetiringPrincipal: input.RetiringPrincipal }),
3491
3481
  };
3492
3482
  };
3493
3483
  const serializeAws_json1_1CreateKeyRequest = (input, context) => {
3494
3484
  return {
3495
- ...(input.BypassPolicyLockoutSafetyCheck !== undefined &&
3496
- input.BypassPolicyLockoutSafetyCheck !== null && {
3485
+ ...(input.BypassPolicyLockoutSafetyCheck != null && {
3497
3486
  BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck,
3498
3487
  }),
3499
- ...(input.CustomKeyStoreId !== undefined &&
3500
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3501
- ...(input.CustomerMasterKeySpec !== undefined &&
3502
- input.CustomerMasterKeySpec !== null && { CustomerMasterKeySpec: input.CustomerMasterKeySpec }),
3503
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
3504
- ...(input.KeySpec !== undefined && input.KeySpec !== null && { KeySpec: input.KeySpec }),
3505
- ...(input.KeyUsage !== undefined && input.KeyUsage !== null && { KeyUsage: input.KeyUsage }),
3506
- ...(input.MultiRegion !== undefined && input.MultiRegion !== null && { MultiRegion: input.MultiRegion }),
3507
- ...(input.Origin !== undefined && input.Origin !== null && { Origin: input.Origin }),
3508
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
3509
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3488
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3489
+ ...(input.CustomerMasterKeySpec != null && { CustomerMasterKeySpec: input.CustomerMasterKeySpec }),
3490
+ ...(input.Description != null && { Description: input.Description }),
3491
+ ...(input.KeySpec != null && { KeySpec: input.KeySpec }),
3492
+ ...(input.KeyUsage != null && { KeyUsage: input.KeyUsage }),
3493
+ ...(input.MultiRegion != null && { MultiRegion: input.MultiRegion }),
3494
+ ...(input.Origin != null && { Origin: input.Origin }),
3495
+ ...(input.Policy != null && { Policy: input.Policy }),
3496
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3510
3497
  };
3511
3498
  };
3512
3499
  const serializeAws_json1_1DecryptRequest = (input, context) => {
3513
3500
  return {
3514
- ...(input.CiphertextBlob !== undefined &&
3515
- input.CiphertextBlob !== null && { CiphertextBlob: context.base64Encoder(input.CiphertextBlob) }),
3516
- ...(input.EncryptionAlgorithm !== undefined &&
3517
- input.EncryptionAlgorithm !== null && { EncryptionAlgorithm: input.EncryptionAlgorithm }),
3518
- ...(input.EncryptionContext !== undefined &&
3519
- input.EncryptionContext !== null && {
3501
+ ...(input.CiphertextBlob != null && { CiphertextBlob: context.base64Encoder(input.CiphertextBlob) }),
3502
+ ...(input.EncryptionAlgorithm != null && { EncryptionAlgorithm: input.EncryptionAlgorithm }),
3503
+ ...(input.EncryptionContext != null && {
3520
3504
  EncryptionContext: serializeAws_json1_1EncryptionContextType(input.EncryptionContext, context),
3521
3505
  }),
3522
- ...(input.GrantTokens !== undefined &&
3523
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3524
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3506
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3507
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3525
3508
  };
3526
3509
  };
3527
3510
  const serializeAws_json1_1DeleteAliasRequest = (input, context) => {
3528
3511
  return {
3529
- ...(input.AliasName !== undefined && input.AliasName !== null && { AliasName: input.AliasName }),
3512
+ ...(input.AliasName != null && { AliasName: input.AliasName }),
3530
3513
  };
3531
3514
  };
3532
3515
  const serializeAws_json1_1DeleteCustomKeyStoreRequest = (input, context) => {
3533
3516
  return {
3534
- ...(input.CustomKeyStoreId !== undefined &&
3535
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3517
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3536
3518
  };
3537
3519
  };
3538
3520
  const serializeAws_json1_1DeleteImportedKeyMaterialRequest = (input, context) => {
3539
3521
  return {
3540
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3522
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3541
3523
  };
3542
3524
  };
3543
3525
  const serializeAws_json1_1DescribeCustomKeyStoresRequest = (input, context) => {
3544
3526
  return {
3545
- ...(input.CustomKeyStoreId !== undefined &&
3546
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3547
- ...(input.CustomKeyStoreName !== undefined &&
3548
- input.CustomKeyStoreName !== null && { CustomKeyStoreName: input.CustomKeyStoreName }),
3549
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3550
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3527
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3528
+ ...(input.CustomKeyStoreName != null && { CustomKeyStoreName: input.CustomKeyStoreName }),
3529
+ ...(input.Limit != null && { Limit: input.Limit }),
3530
+ ...(input.Marker != null && { Marker: input.Marker }),
3551
3531
  };
3552
3532
  };
3553
3533
  const serializeAws_json1_1DescribeKeyRequest = (input, context) => {
3554
3534
  return {
3555
- ...(input.GrantTokens !== undefined &&
3556
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3557
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3535
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3536
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3558
3537
  };
3559
3538
  };
3560
3539
  const serializeAws_json1_1DisableKeyRequest = (input, context) => {
3561
3540
  return {
3562
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3541
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3563
3542
  };
3564
3543
  };
3565
3544
  const serializeAws_json1_1DisableKeyRotationRequest = (input, context) => {
3566
3545
  return {
3567
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3546
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3568
3547
  };
3569
3548
  };
3570
3549
  const serializeAws_json1_1DisconnectCustomKeyStoreRequest = (input, context) => {
3571
3550
  return {
3572
- ...(input.CustomKeyStoreId !== undefined &&
3573
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3551
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3574
3552
  };
3575
3553
  };
3576
3554
  const serializeAws_json1_1EnableKeyRequest = (input, context) => {
3577
3555
  return {
3578
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3556
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3579
3557
  };
3580
3558
  };
3581
3559
  const serializeAws_json1_1EnableKeyRotationRequest = (input, context) => {
3582
3560
  return {
3583
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3561
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3584
3562
  };
3585
3563
  };
3586
3564
  const serializeAws_json1_1EncryptionContextType = (input, context) => {
@@ -3596,120 +3574,101 @@ const serializeAws_json1_1EncryptionContextType = (input, context) => {
3596
3574
  };
3597
3575
  const serializeAws_json1_1EncryptRequest = (input, context) => {
3598
3576
  return {
3599
- ...(input.EncryptionAlgorithm !== undefined &&
3600
- input.EncryptionAlgorithm !== null && { EncryptionAlgorithm: input.EncryptionAlgorithm }),
3601
- ...(input.EncryptionContext !== undefined &&
3602
- input.EncryptionContext !== null && {
3577
+ ...(input.EncryptionAlgorithm != null && { EncryptionAlgorithm: input.EncryptionAlgorithm }),
3578
+ ...(input.EncryptionContext != null && {
3603
3579
  EncryptionContext: serializeAws_json1_1EncryptionContextType(input.EncryptionContext, context),
3604
3580
  }),
3605
- ...(input.GrantTokens !== undefined &&
3606
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3607
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3608
- ...(input.Plaintext !== undefined &&
3609
- input.Plaintext !== null && { Plaintext: context.base64Encoder(input.Plaintext) }),
3581
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3582
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3583
+ ...(input.Plaintext != null && { Plaintext: context.base64Encoder(input.Plaintext) }),
3610
3584
  };
3611
3585
  };
3612
3586
  const serializeAws_json1_1GenerateDataKeyPairRequest = (input, context) => {
3613
3587
  return {
3614
- ...(input.EncryptionContext !== undefined &&
3615
- input.EncryptionContext !== null && {
3588
+ ...(input.EncryptionContext != null && {
3616
3589
  EncryptionContext: serializeAws_json1_1EncryptionContextType(input.EncryptionContext, context),
3617
3590
  }),
3618
- ...(input.GrantTokens !== undefined &&
3619
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3620
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3621
- ...(input.KeyPairSpec !== undefined && input.KeyPairSpec !== null && { KeyPairSpec: input.KeyPairSpec }),
3591
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3592
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3593
+ ...(input.KeyPairSpec != null && { KeyPairSpec: input.KeyPairSpec }),
3622
3594
  };
3623
3595
  };
3624
3596
  const serializeAws_json1_1GenerateDataKeyPairWithoutPlaintextRequest = (input, context) => {
3625
3597
  return {
3626
- ...(input.EncryptionContext !== undefined &&
3627
- input.EncryptionContext !== null && {
3598
+ ...(input.EncryptionContext != null && {
3628
3599
  EncryptionContext: serializeAws_json1_1EncryptionContextType(input.EncryptionContext, context),
3629
3600
  }),
3630
- ...(input.GrantTokens !== undefined &&
3631
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3632
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3633
- ...(input.KeyPairSpec !== undefined && input.KeyPairSpec !== null && { KeyPairSpec: input.KeyPairSpec }),
3601
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3602
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3603
+ ...(input.KeyPairSpec != null && { KeyPairSpec: input.KeyPairSpec }),
3634
3604
  };
3635
3605
  };
3636
3606
  const serializeAws_json1_1GenerateDataKeyRequest = (input, context) => {
3637
3607
  return {
3638
- ...(input.EncryptionContext !== undefined &&
3639
- input.EncryptionContext !== null && {
3608
+ ...(input.EncryptionContext != null && {
3640
3609
  EncryptionContext: serializeAws_json1_1EncryptionContextType(input.EncryptionContext, context),
3641
3610
  }),
3642
- ...(input.GrantTokens !== undefined &&
3643
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3644
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3645
- ...(input.KeySpec !== undefined && input.KeySpec !== null && { KeySpec: input.KeySpec }),
3646
- ...(input.NumberOfBytes !== undefined && input.NumberOfBytes !== null && { NumberOfBytes: input.NumberOfBytes }),
3611
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3612
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3613
+ ...(input.KeySpec != null && { KeySpec: input.KeySpec }),
3614
+ ...(input.NumberOfBytes != null && { NumberOfBytes: input.NumberOfBytes }),
3647
3615
  };
3648
3616
  };
3649
3617
  const serializeAws_json1_1GenerateDataKeyWithoutPlaintextRequest = (input, context) => {
3650
3618
  return {
3651
- ...(input.EncryptionContext !== undefined &&
3652
- input.EncryptionContext !== null && {
3619
+ ...(input.EncryptionContext != null && {
3653
3620
  EncryptionContext: serializeAws_json1_1EncryptionContextType(input.EncryptionContext, context),
3654
3621
  }),
3655
- ...(input.GrantTokens !== undefined &&
3656
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3657
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3658
- ...(input.KeySpec !== undefined && input.KeySpec !== null && { KeySpec: input.KeySpec }),
3659
- ...(input.NumberOfBytes !== undefined && input.NumberOfBytes !== null && { NumberOfBytes: input.NumberOfBytes }),
3622
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3623
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3624
+ ...(input.KeySpec != null && { KeySpec: input.KeySpec }),
3625
+ ...(input.NumberOfBytes != null && { NumberOfBytes: input.NumberOfBytes }),
3660
3626
  };
3661
3627
  };
3662
3628
  const serializeAws_json1_1GenerateMacRequest = (input, context) => {
3663
3629
  return {
3664
- ...(input.GrantTokens !== undefined &&
3665
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3666
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3667
- ...(input.MacAlgorithm !== undefined && input.MacAlgorithm !== null && { MacAlgorithm: input.MacAlgorithm }),
3668
- ...(input.Message !== undefined && input.Message !== null && { Message: context.base64Encoder(input.Message) }),
3630
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3631
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3632
+ ...(input.MacAlgorithm != null && { MacAlgorithm: input.MacAlgorithm }),
3633
+ ...(input.Message != null && { Message: context.base64Encoder(input.Message) }),
3669
3634
  };
3670
3635
  };
3671
3636
  const serializeAws_json1_1GenerateRandomRequest = (input, context) => {
3672
3637
  return {
3673
- ...(input.CustomKeyStoreId !== undefined &&
3674
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3675
- ...(input.NumberOfBytes !== undefined && input.NumberOfBytes !== null && { NumberOfBytes: input.NumberOfBytes }),
3638
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3639
+ ...(input.NumberOfBytes != null && { NumberOfBytes: input.NumberOfBytes }),
3676
3640
  };
3677
3641
  };
3678
3642
  const serializeAws_json1_1GetKeyPolicyRequest = (input, context) => {
3679
3643
  return {
3680
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3681
- ...(input.PolicyName !== undefined && input.PolicyName !== null && { PolicyName: input.PolicyName }),
3644
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3645
+ ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
3682
3646
  };
3683
3647
  };
3684
3648
  const serializeAws_json1_1GetKeyRotationStatusRequest = (input, context) => {
3685
3649
  return {
3686
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3650
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3687
3651
  };
3688
3652
  };
3689
3653
  const serializeAws_json1_1GetParametersForImportRequest = (input, context) => {
3690
3654
  return {
3691
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3692
- ...(input.WrappingAlgorithm !== undefined &&
3693
- input.WrappingAlgorithm !== null && { WrappingAlgorithm: input.WrappingAlgorithm }),
3694
- ...(input.WrappingKeySpec !== undefined &&
3695
- input.WrappingKeySpec !== null && { WrappingKeySpec: input.WrappingKeySpec }),
3655
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3656
+ ...(input.WrappingAlgorithm != null && { WrappingAlgorithm: input.WrappingAlgorithm }),
3657
+ ...(input.WrappingKeySpec != null && { WrappingKeySpec: input.WrappingKeySpec }),
3696
3658
  };
3697
3659
  };
3698
3660
  const serializeAws_json1_1GetPublicKeyRequest = (input, context) => {
3699
3661
  return {
3700
- ...(input.GrantTokens !== undefined &&
3701
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3702
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3662
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3663
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3703
3664
  };
3704
3665
  };
3705
3666
  const serializeAws_json1_1GrantConstraints = (input, context) => {
3706
3667
  return {
3707
- ...(input.EncryptionContextEquals !== undefined &&
3708
- input.EncryptionContextEquals !== null && {
3668
+ ...(input.EncryptionContextEquals != null && {
3709
3669
  EncryptionContextEquals: serializeAws_json1_1EncryptionContextType(input.EncryptionContextEquals, context),
3710
3670
  }),
3711
- ...(input.EncryptionContextSubset !== undefined &&
3712
- input.EncryptionContextSubset !== null && {
3671
+ ...(input.EncryptionContextSubset != null && {
3713
3672
  EncryptionContextSubset: serializeAws_json1_1EncryptionContextType(input.EncryptionContextSubset, context),
3714
3673
  }),
3715
3674
  };
@@ -3736,148 +3695,130 @@ const serializeAws_json1_1GrantTokenList = (input, context) => {
3736
3695
  };
3737
3696
  const serializeAws_json1_1ImportKeyMaterialRequest = (input, context) => {
3738
3697
  return {
3739
- ...(input.EncryptedKeyMaterial !== undefined &&
3740
- input.EncryptedKeyMaterial !== null && {
3698
+ ...(input.EncryptedKeyMaterial != null && {
3741
3699
  EncryptedKeyMaterial: context.base64Encoder(input.EncryptedKeyMaterial),
3742
3700
  }),
3743
- ...(input.ExpirationModel !== undefined &&
3744
- input.ExpirationModel !== null && { ExpirationModel: input.ExpirationModel }),
3745
- ...(input.ImportToken !== undefined &&
3746
- input.ImportToken !== null && { ImportToken: context.base64Encoder(input.ImportToken) }),
3747
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3748
- ...(input.ValidTo !== undefined &&
3749
- input.ValidTo !== null && { ValidTo: Math.round(input.ValidTo.getTime() / 1000) }),
3701
+ ...(input.ExpirationModel != null && { ExpirationModel: input.ExpirationModel }),
3702
+ ...(input.ImportToken != null && { ImportToken: context.base64Encoder(input.ImportToken) }),
3703
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3704
+ ...(input.ValidTo != null && { ValidTo: Math.round(input.ValidTo.getTime() / 1000) }),
3750
3705
  };
3751
3706
  };
3752
3707
  const serializeAws_json1_1ListAliasesRequest = (input, context) => {
3753
3708
  return {
3754
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3755
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3756
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3709
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3710
+ ...(input.Limit != null && { Limit: input.Limit }),
3711
+ ...(input.Marker != null && { Marker: input.Marker }),
3757
3712
  };
3758
3713
  };
3759
3714
  const serializeAws_json1_1ListGrantsRequest = (input, context) => {
3760
3715
  return {
3761
- ...(input.GrantId !== undefined && input.GrantId !== null && { GrantId: input.GrantId }),
3762
- ...(input.GranteePrincipal !== undefined &&
3763
- input.GranteePrincipal !== null && { GranteePrincipal: input.GranteePrincipal }),
3764
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3765
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3766
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3716
+ ...(input.GrantId != null && { GrantId: input.GrantId }),
3717
+ ...(input.GranteePrincipal != null && { GranteePrincipal: input.GranteePrincipal }),
3718
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3719
+ ...(input.Limit != null && { Limit: input.Limit }),
3720
+ ...(input.Marker != null && { Marker: input.Marker }),
3767
3721
  };
3768
3722
  };
3769
3723
  const serializeAws_json1_1ListKeyPoliciesRequest = (input, context) => {
3770
3724
  return {
3771
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3772
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3773
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3725
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3726
+ ...(input.Limit != null && { Limit: input.Limit }),
3727
+ ...(input.Marker != null && { Marker: input.Marker }),
3774
3728
  };
3775
3729
  };
3776
3730
  const serializeAws_json1_1ListKeysRequest = (input, context) => {
3777
3731
  return {
3778
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3779
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3732
+ ...(input.Limit != null && { Limit: input.Limit }),
3733
+ ...(input.Marker != null && { Marker: input.Marker }),
3780
3734
  };
3781
3735
  };
3782
3736
  const serializeAws_json1_1ListResourceTagsRequest = (input, context) => {
3783
3737
  return {
3784
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3785
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3786
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3738
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3739
+ ...(input.Limit != null && { Limit: input.Limit }),
3740
+ ...(input.Marker != null && { Marker: input.Marker }),
3787
3741
  };
3788
3742
  };
3789
3743
  const serializeAws_json1_1ListRetirableGrantsRequest = (input, context) => {
3790
3744
  return {
3791
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
3792
- ...(input.Marker !== undefined && input.Marker !== null && { Marker: input.Marker }),
3793
- ...(input.RetiringPrincipal !== undefined &&
3794
- input.RetiringPrincipal !== null && { RetiringPrincipal: input.RetiringPrincipal }),
3745
+ ...(input.Limit != null && { Limit: input.Limit }),
3746
+ ...(input.Marker != null && { Marker: input.Marker }),
3747
+ ...(input.RetiringPrincipal != null && { RetiringPrincipal: input.RetiringPrincipal }),
3795
3748
  };
3796
3749
  };
3797
3750
  const serializeAws_json1_1PutKeyPolicyRequest = (input, context) => {
3798
3751
  return {
3799
- ...(input.BypassPolicyLockoutSafetyCheck !== undefined &&
3800
- input.BypassPolicyLockoutSafetyCheck !== null && {
3752
+ ...(input.BypassPolicyLockoutSafetyCheck != null && {
3801
3753
  BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck,
3802
3754
  }),
3803
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3804
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
3805
- ...(input.PolicyName !== undefined && input.PolicyName !== null && { PolicyName: input.PolicyName }),
3755
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3756
+ ...(input.Policy != null && { Policy: input.Policy }),
3757
+ ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
3806
3758
  };
3807
3759
  };
3808
3760
  const serializeAws_json1_1ReEncryptRequest = (input, context) => {
3809
3761
  return {
3810
- ...(input.CiphertextBlob !== undefined &&
3811
- input.CiphertextBlob !== null && { CiphertextBlob: context.base64Encoder(input.CiphertextBlob) }),
3812
- ...(input.DestinationEncryptionAlgorithm !== undefined &&
3813
- input.DestinationEncryptionAlgorithm !== null && {
3762
+ ...(input.CiphertextBlob != null && { CiphertextBlob: context.base64Encoder(input.CiphertextBlob) }),
3763
+ ...(input.DestinationEncryptionAlgorithm != null && {
3814
3764
  DestinationEncryptionAlgorithm: input.DestinationEncryptionAlgorithm,
3815
3765
  }),
3816
- ...(input.DestinationEncryptionContext !== undefined &&
3817
- input.DestinationEncryptionContext !== null && {
3766
+ ...(input.DestinationEncryptionContext != null && {
3818
3767
  DestinationEncryptionContext: serializeAws_json1_1EncryptionContextType(input.DestinationEncryptionContext, context),
3819
3768
  }),
3820
- ...(input.DestinationKeyId !== undefined &&
3821
- input.DestinationKeyId !== null && { DestinationKeyId: input.DestinationKeyId }),
3822
- ...(input.GrantTokens !== undefined &&
3823
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3824
- ...(input.SourceEncryptionAlgorithm !== undefined &&
3825
- input.SourceEncryptionAlgorithm !== null && { SourceEncryptionAlgorithm: input.SourceEncryptionAlgorithm }),
3826
- ...(input.SourceEncryptionContext !== undefined &&
3827
- input.SourceEncryptionContext !== null && {
3769
+ ...(input.DestinationKeyId != null && { DestinationKeyId: input.DestinationKeyId }),
3770
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3771
+ ...(input.SourceEncryptionAlgorithm != null && { SourceEncryptionAlgorithm: input.SourceEncryptionAlgorithm }),
3772
+ ...(input.SourceEncryptionContext != null && {
3828
3773
  SourceEncryptionContext: serializeAws_json1_1EncryptionContextType(input.SourceEncryptionContext, context),
3829
3774
  }),
3830
- ...(input.SourceKeyId !== undefined && input.SourceKeyId !== null && { SourceKeyId: input.SourceKeyId }),
3775
+ ...(input.SourceKeyId != null && { SourceKeyId: input.SourceKeyId }),
3831
3776
  };
3832
3777
  };
3833
3778
  const serializeAws_json1_1ReplicateKeyRequest = (input, context) => {
3834
3779
  return {
3835
- ...(input.BypassPolicyLockoutSafetyCheck !== undefined &&
3836
- input.BypassPolicyLockoutSafetyCheck !== null && {
3780
+ ...(input.BypassPolicyLockoutSafetyCheck != null && {
3837
3781
  BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck,
3838
3782
  }),
3839
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
3840
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3841
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
3842
- ...(input.ReplicaRegion !== undefined && input.ReplicaRegion !== null && { ReplicaRegion: input.ReplicaRegion }),
3843
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3783
+ ...(input.Description != null && { Description: input.Description }),
3784
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3785
+ ...(input.Policy != null && { Policy: input.Policy }),
3786
+ ...(input.ReplicaRegion != null && { ReplicaRegion: input.ReplicaRegion }),
3787
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3844
3788
  };
3845
3789
  };
3846
3790
  const serializeAws_json1_1RetireGrantRequest = (input, context) => {
3847
3791
  return {
3848
- ...(input.GrantId !== undefined && input.GrantId !== null && { GrantId: input.GrantId }),
3849
- ...(input.GrantToken !== undefined && input.GrantToken !== null && { GrantToken: input.GrantToken }),
3850
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3792
+ ...(input.GrantId != null && { GrantId: input.GrantId }),
3793
+ ...(input.GrantToken != null && { GrantToken: input.GrantToken }),
3794
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3851
3795
  };
3852
3796
  };
3853
3797
  const serializeAws_json1_1RevokeGrantRequest = (input, context) => {
3854
3798
  return {
3855
- ...(input.GrantId !== undefined && input.GrantId !== null && { GrantId: input.GrantId }),
3856
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3799
+ ...(input.GrantId != null && { GrantId: input.GrantId }),
3800
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3857
3801
  };
3858
3802
  };
3859
3803
  const serializeAws_json1_1ScheduleKeyDeletionRequest = (input, context) => {
3860
3804
  return {
3861
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3862
- ...(input.PendingWindowInDays !== undefined &&
3863
- input.PendingWindowInDays !== null && { PendingWindowInDays: input.PendingWindowInDays }),
3805
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3806
+ ...(input.PendingWindowInDays != null && { PendingWindowInDays: input.PendingWindowInDays }),
3864
3807
  };
3865
3808
  };
3866
3809
  const serializeAws_json1_1SignRequest = (input, context) => {
3867
3810
  return {
3868
- ...(input.GrantTokens !== undefined &&
3869
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3870
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3871
- ...(input.Message !== undefined && input.Message !== null && { Message: context.base64Encoder(input.Message) }),
3872
- ...(input.MessageType !== undefined && input.MessageType !== null && { MessageType: input.MessageType }),
3873
- ...(input.SigningAlgorithm !== undefined &&
3874
- input.SigningAlgorithm !== null && { SigningAlgorithm: input.SigningAlgorithm }),
3811
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3812
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3813
+ ...(input.Message != null && { Message: context.base64Encoder(input.Message) }),
3814
+ ...(input.MessageType != null && { MessageType: input.MessageType }),
3815
+ ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }),
3875
3816
  };
3876
3817
  };
3877
3818
  const serializeAws_json1_1Tag = (input, context) => {
3878
3819
  return {
3879
- ...(input.TagKey !== undefined && input.TagKey !== null && { TagKey: input.TagKey }),
3880
- ...(input.TagValue !== undefined && input.TagValue !== null && { TagValue: input.TagValue }),
3820
+ ...(input.TagKey != null && { TagKey: input.TagKey }),
3821
+ ...(input.TagValue != null && { TagValue: input.TagValue }),
3881
3822
  };
3882
3823
  };
3883
3824
  const serializeAws_json1_1TagKeyList = (input, context) => {
@@ -3902,68 +3843,59 @@ const serializeAws_json1_1TagList = (input, context) => {
3902
3843
  };
3903
3844
  const serializeAws_json1_1TagResourceRequest = (input, context) => {
3904
3845
  return {
3905
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3906
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3846
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3847
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3907
3848
  };
3908
3849
  };
3909
3850
  const serializeAws_json1_1UntagResourceRequest = (input, context) => {
3910
3851
  return {
3911
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3912
- ...(input.TagKeys !== undefined &&
3913
- input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
3852
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3853
+ ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
3914
3854
  };
3915
3855
  };
3916
3856
  const serializeAws_json1_1UpdateAliasRequest = (input, context) => {
3917
3857
  return {
3918
- ...(input.AliasName !== undefined && input.AliasName !== null && { AliasName: input.AliasName }),
3919
- ...(input.TargetKeyId !== undefined && input.TargetKeyId !== null && { TargetKeyId: input.TargetKeyId }),
3858
+ ...(input.AliasName != null && { AliasName: input.AliasName }),
3859
+ ...(input.TargetKeyId != null && { TargetKeyId: input.TargetKeyId }),
3920
3860
  };
3921
3861
  };
3922
3862
  const serializeAws_json1_1UpdateCustomKeyStoreRequest = (input, context) => {
3923
3863
  return {
3924
- ...(input.CloudHsmClusterId !== undefined &&
3925
- input.CloudHsmClusterId !== null && { CloudHsmClusterId: input.CloudHsmClusterId }),
3926
- ...(input.CustomKeyStoreId !== undefined &&
3927
- input.CustomKeyStoreId !== null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3928
- ...(input.KeyStorePassword !== undefined &&
3929
- input.KeyStorePassword !== null && { KeyStorePassword: input.KeyStorePassword }),
3930
- ...(input.NewCustomKeyStoreName !== undefined &&
3931
- input.NewCustomKeyStoreName !== null && { NewCustomKeyStoreName: input.NewCustomKeyStoreName }),
3864
+ ...(input.CloudHsmClusterId != null && { CloudHsmClusterId: input.CloudHsmClusterId }),
3865
+ ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }),
3866
+ ...(input.KeyStorePassword != null && { KeyStorePassword: input.KeyStorePassword }),
3867
+ ...(input.NewCustomKeyStoreName != null && { NewCustomKeyStoreName: input.NewCustomKeyStoreName }),
3932
3868
  };
3933
3869
  };
3934
3870
  const serializeAws_json1_1UpdateKeyDescriptionRequest = (input, context) => {
3935
3871
  return {
3936
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
3937
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3872
+ ...(input.Description != null && { Description: input.Description }),
3873
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3938
3874
  };
3939
3875
  };
3940
3876
  const serializeAws_json1_1UpdatePrimaryRegionRequest = (input, context) => {
3941
3877
  return {
3942
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3943
- ...(input.PrimaryRegion !== undefined && input.PrimaryRegion !== null && { PrimaryRegion: input.PrimaryRegion }),
3878
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3879
+ ...(input.PrimaryRegion != null && { PrimaryRegion: input.PrimaryRegion }),
3944
3880
  };
3945
3881
  };
3946
3882
  const serializeAws_json1_1VerifyMacRequest = (input, context) => {
3947
3883
  return {
3948
- ...(input.GrantTokens !== undefined &&
3949
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3950
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3951
- ...(input.Mac !== undefined && input.Mac !== null && { Mac: context.base64Encoder(input.Mac) }),
3952
- ...(input.MacAlgorithm !== undefined && input.MacAlgorithm !== null && { MacAlgorithm: input.MacAlgorithm }),
3953
- ...(input.Message !== undefined && input.Message !== null && { Message: context.base64Encoder(input.Message) }),
3884
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3885
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3886
+ ...(input.Mac != null && { Mac: context.base64Encoder(input.Mac) }),
3887
+ ...(input.MacAlgorithm != null && { MacAlgorithm: input.MacAlgorithm }),
3888
+ ...(input.Message != null && { Message: context.base64Encoder(input.Message) }),
3954
3889
  };
3955
3890
  };
3956
3891
  const serializeAws_json1_1VerifyRequest = (input, context) => {
3957
3892
  return {
3958
- ...(input.GrantTokens !== undefined &&
3959
- input.GrantTokens !== null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3960
- ...(input.KeyId !== undefined && input.KeyId !== null && { KeyId: input.KeyId }),
3961
- ...(input.Message !== undefined && input.Message !== null && { Message: context.base64Encoder(input.Message) }),
3962
- ...(input.MessageType !== undefined && input.MessageType !== null && { MessageType: input.MessageType }),
3963
- ...(input.Signature !== undefined &&
3964
- input.Signature !== null && { Signature: context.base64Encoder(input.Signature) }),
3965
- ...(input.SigningAlgorithm !== undefined &&
3966
- input.SigningAlgorithm !== null && { SigningAlgorithm: input.SigningAlgorithm }),
3893
+ ...(input.GrantTokens != null && { GrantTokens: serializeAws_json1_1GrantTokenList(input.GrantTokens, context) }),
3894
+ ...(input.KeyId != null && { KeyId: input.KeyId }),
3895
+ ...(input.Message != null && { Message: context.base64Encoder(input.Message) }),
3896
+ ...(input.MessageType != null && { MessageType: input.MessageType }),
3897
+ ...(input.Signature != null && { Signature: context.base64Encoder(input.Signature) }),
3898
+ ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }),
3967
3899
  };
3968
3900
  };
3969
3901
  const deserializeAws_json1_1AliasList = (output, context) => {
@@ -3981,10 +3913,10 @@ const deserializeAws_json1_1AliasListEntry = (output, context) => {
3981
3913
  return {
3982
3914
  AliasArn: (0, smithy_client_1.expectString)(output.AliasArn),
3983
3915
  AliasName: (0, smithy_client_1.expectString)(output.AliasName),
3984
- CreationDate: output.CreationDate !== undefined && output.CreationDate !== null
3916
+ CreationDate: output.CreationDate != null
3985
3917
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
3986
3918
  : undefined,
3987
- LastUpdatedDate: output.LastUpdatedDate !== undefined && output.LastUpdatedDate !== null
3919
+ LastUpdatedDate: output.LastUpdatedDate != null
3988
3920
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedDate)))
3989
3921
  : undefined,
3990
3922
  TargetKeyId: (0, smithy_client_1.expectString)(output.TargetKeyId),
@@ -4041,9 +3973,7 @@ const deserializeAws_json1_1CreateGrantResponse = (output, context) => {
4041
3973
  };
4042
3974
  const deserializeAws_json1_1CreateKeyResponse = (output, context) => {
4043
3975
  return {
4044
- KeyMetadata: output.KeyMetadata !== undefined && output.KeyMetadata !== null
4045
- ? deserializeAws_json1_1KeyMetadata(output.KeyMetadata, context)
4046
- : undefined,
3976
+ KeyMetadata: output.KeyMetadata != null ? deserializeAws_json1_1KeyMetadata(output.KeyMetadata, context) : undefined,
4047
3977
  };
4048
3978
  };
4049
3979
  const deserializeAws_json1_1CustomKeyStoreHasCMKsException = (output, context) => {
@@ -4082,7 +4012,7 @@ const deserializeAws_json1_1CustomKeyStoresListEntry = (output, context) => {
4082
4012
  CloudHsmClusterId: (0, smithy_client_1.expectString)(output.CloudHsmClusterId),
4083
4013
  ConnectionErrorCode: (0, smithy_client_1.expectString)(output.ConnectionErrorCode),
4084
4014
  ConnectionState: (0, smithy_client_1.expectString)(output.ConnectionState),
4085
- CreationDate: output.CreationDate !== undefined && output.CreationDate !== null
4015
+ CreationDate: output.CreationDate != null
4086
4016
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
4087
4017
  : undefined,
4088
4018
  CustomKeyStoreId: (0, smithy_client_1.expectString)(output.CustomKeyStoreId),
@@ -4094,7 +4024,7 @@ const deserializeAws_json1_1DecryptResponse = (output, context) => {
4094
4024
  return {
4095
4025
  EncryptionAlgorithm: (0, smithy_client_1.expectString)(output.EncryptionAlgorithm),
4096
4026
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4097
- Plaintext: output.Plaintext !== undefined && output.Plaintext !== null ? context.base64Decoder(output.Plaintext) : undefined,
4027
+ Plaintext: output.Plaintext != null ? context.base64Decoder(output.Plaintext) : undefined,
4098
4028
  };
4099
4029
  };
4100
4030
  const deserializeAws_json1_1DeleteCustomKeyStoreResponse = (output, context) => {
@@ -4107,7 +4037,7 @@ const deserializeAws_json1_1DependencyTimeoutException = (output, context) => {
4107
4037
  };
4108
4038
  const deserializeAws_json1_1DescribeCustomKeyStoresResponse = (output, context) => {
4109
4039
  return {
4110
- CustomKeyStores: output.CustomKeyStores !== undefined && output.CustomKeyStores !== null
4040
+ CustomKeyStores: output.CustomKeyStores != null
4111
4041
  ? deserializeAws_json1_1CustomKeyStoresList(output.CustomKeyStores, context)
4112
4042
  : undefined,
4113
4043
  NextMarker: (0, smithy_client_1.expectString)(output.NextMarker),
@@ -4116,9 +4046,7 @@ const deserializeAws_json1_1DescribeCustomKeyStoresResponse = (output, context)
4116
4046
  };
4117
4047
  const deserializeAws_json1_1DescribeKeyResponse = (output, context) => {
4118
4048
  return {
4119
- KeyMetadata: output.KeyMetadata !== undefined && output.KeyMetadata !== null
4120
- ? deserializeAws_json1_1KeyMetadata(output.KeyMetadata, context)
4121
- : undefined,
4049
+ KeyMetadata: output.KeyMetadata != null ? deserializeAws_json1_1KeyMetadata(output.KeyMetadata, context) : undefined,
4122
4050
  };
4123
4051
  };
4124
4052
  const deserializeAws_json1_1DisabledException = (output, context) => {
@@ -4153,9 +4081,7 @@ const deserializeAws_json1_1EncryptionContextType = (output, context) => {
4153
4081
  };
4154
4082
  const deserializeAws_json1_1EncryptResponse = (output, context) => {
4155
4083
  return {
4156
- CiphertextBlob: output.CiphertextBlob !== undefined && output.CiphertextBlob !== null
4157
- ? context.base64Decoder(output.CiphertextBlob)
4158
- : undefined,
4084
+ CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined,
4159
4085
  EncryptionAlgorithm: (0, smithy_client_1.expectString)(output.EncryptionAlgorithm),
4160
4086
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4161
4087
  };
@@ -4169,52 +4095,42 @@ const deserializeAws_json1_1GenerateDataKeyPairResponse = (output, context) => {
4169
4095
  return {
4170
4096
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4171
4097
  KeyPairSpec: (0, smithy_client_1.expectString)(output.KeyPairSpec),
4172
- PrivateKeyCiphertextBlob: output.PrivateKeyCiphertextBlob !== undefined && output.PrivateKeyCiphertextBlob !== null
4173
- ? context.base64Decoder(output.PrivateKeyCiphertextBlob)
4174
- : undefined,
4175
- PrivateKeyPlaintext: output.PrivateKeyPlaintext !== undefined && output.PrivateKeyPlaintext !== null
4176
- ? context.base64Decoder(output.PrivateKeyPlaintext)
4177
- : undefined,
4178
- PublicKey: output.PublicKey !== undefined && output.PublicKey !== null ? context.base64Decoder(output.PublicKey) : undefined,
4098
+ PrivateKeyCiphertextBlob: output.PrivateKeyCiphertextBlob != null ? context.base64Decoder(output.PrivateKeyCiphertextBlob) : undefined,
4099
+ PrivateKeyPlaintext: output.PrivateKeyPlaintext != null ? context.base64Decoder(output.PrivateKeyPlaintext) : undefined,
4100
+ PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined,
4179
4101
  };
4180
4102
  };
4181
4103
  const deserializeAws_json1_1GenerateDataKeyPairWithoutPlaintextResponse = (output, context) => {
4182
4104
  return {
4183
4105
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4184
4106
  KeyPairSpec: (0, smithy_client_1.expectString)(output.KeyPairSpec),
4185
- PrivateKeyCiphertextBlob: output.PrivateKeyCiphertextBlob !== undefined && output.PrivateKeyCiphertextBlob !== null
4186
- ? context.base64Decoder(output.PrivateKeyCiphertextBlob)
4187
- : undefined,
4188
- PublicKey: output.PublicKey !== undefined && output.PublicKey !== null ? context.base64Decoder(output.PublicKey) : undefined,
4107
+ PrivateKeyCiphertextBlob: output.PrivateKeyCiphertextBlob != null ? context.base64Decoder(output.PrivateKeyCiphertextBlob) : undefined,
4108
+ PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined,
4189
4109
  };
4190
4110
  };
4191
4111
  const deserializeAws_json1_1GenerateDataKeyResponse = (output, context) => {
4192
4112
  return {
4193
- CiphertextBlob: output.CiphertextBlob !== undefined && output.CiphertextBlob !== null
4194
- ? context.base64Decoder(output.CiphertextBlob)
4195
- : undefined,
4113
+ CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined,
4196
4114
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4197
- Plaintext: output.Plaintext !== undefined && output.Plaintext !== null ? context.base64Decoder(output.Plaintext) : undefined,
4115
+ Plaintext: output.Plaintext != null ? context.base64Decoder(output.Plaintext) : undefined,
4198
4116
  };
4199
4117
  };
4200
4118
  const deserializeAws_json1_1GenerateDataKeyWithoutPlaintextResponse = (output, context) => {
4201
4119
  return {
4202
- CiphertextBlob: output.CiphertextBlob !== undefined && output.CiphertextBlob !== null
4203
- ? context.base64Decoder(output.CiphertextBlob)
4204
- : undefined,
4120
+ CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined,
4205
4121
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4206
4122
  };
4207
4123
  };
4208
4124
  const deserializeAws_json1_1GenerateMacResponse = (output, context) => {
4209
4125
  return {
4210
4126
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4211
- Mac: output.Mac !== undefined && output.Mac !== null ? context.base64Decoder(output.Mac) : undefined,
4127
+ Mac: output.Mac != null ? context.base64Decoder(output.Mac) : undefined,
4212
4128
  MacAlgorithm: (0, smithy_client_1.expectString)(output.MacAlgorithm),
4213
4129
  };
4214
4130
  };
4215
4131
  const deserializeAws_json1_1GenerateRandomResponse = (output, context) => {
4216
4132
  return {
4217
- Plaintext: output.Plaintext !== undefined && output.Plaintext !== null ? context.base64Decoder(output.Plaintext) : undefined,
4133
+ Plaintext: output.Plaintext != null ? context.base64Decoder(output.Plaintext) : undefined,
4218
4134
  };
4219
4135
  };
4220
4136
  const deserializeAws_json1_1GetKeyPolicyResponse = (output, context) => {
@@ -4229,37 +4145,35 @@ const deserializeAws_json1_1GetKeyRotationStatusResponse = (output, context) =>
4229
4145
  };
4230
4146
  const deserializeAws_json1_1GetParametersForImportResponse = (output, context) => {
4231
4147
  return {
4232
- ImportToken: output.ImportToken !== undefined && output.ImportToken !== null
4233
- ? context.base64Decoder(output.ImportToken)
4234
- : undefined,
4148
+ ImportToken: output.ImportToken != null ? context.base64Decoder(output.ImportToken) : undefined,
4235
4149
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4236
- ParametersValidTo: output.ParametersValidTo !== undefined && output.ParametersValidTo !== null
4150
+ ParametersValidTo: output.ParametersValidTo != null
4237
4151
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ParametersValidTo)))
4238
4152
  : undefined,
4239
- PublicKey: output.PublicKey !== undefined && output.PublicKey !== null ? context.base64Decoder(output.PublicKey) : undefined,
4153
+ PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined,
4240
4154
  };
4241
4155
  };
4242
4156
  const deserializeAws_json1_1GetPublicKeyResponse = (output, context) => {
4243
4157
  return {
4244
4158
  CustomerMasterKeySpec: (0, smithy_client_1.expectString)(output.CustomerMasterKeySpec),
4245
- EncryptionAlgorithms: output.EncryptionAlgorithms !== undefined && output.EncryptionAlgorithms !== null
4159
+ EncryptionAlgorithms: output.EncryptionAlgorithms != null
4246
4160
  ? deserializeAws_json1_1EncryptionAlgorithmSpecList(output.EncryptionAlgorithms, context)
4247
4161
  : undefined,
4248
4162
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4249
4163
  KeySpec: (0, smithy_client_1.expectString)(output.KeySpec),
4250
4164
  KeyUsage: (0, smithy_client_1.expectString)(output.KeyUsage),
4251
- PublicKey: output.PublicKey !== undefined && output.PublicKey !== null ? context.base64Decoder(output.PublicKey) : undefined,
4252
- SigningAlgorithms: output.SigningAlgorithms !== undefined && output.SigningAlgorithms !== null
4165
+ PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined,
4166
+ SigningAlgorithms: output.SigningAlgorithms != null
4253
4167
  ? deserializeAws_json1_1SigningAlgorithmSpecList(output.SigningAlgorithms, context)
4254
4168
  : undefined,
4255
4169
  };
4256
4170
  };
4257
4171
  const deserializeAws_json1_1GrantConstraints = (output, context) => {
4258
4172
  return {
4259
- EncryptionContextEquals: output.EncryptionContextEquals !== undefined && output.EncryptionContextEquals !== null
4173
+ EncryptionContextEquals: output.EncryptionContextEquals != null
4260
4174
  ? deserializeAws_json1_1EncryptionContextType(output.EncryptionContextEquals, context)
4261
4175
  : undefined,
4262
- EncryptionContextSubset: output.EncryptionContextSubset !== undefined && output.EncryptionContextSubset !== null
4176
+ EncryptionContextSubset: output.EncryptionContextSubset != null
4263
4177
  ? deserializeAws_json1_1EncryptionContextType(output.EncryptionContextSubset, context)
4264
4178
  : undefined,
4265
4179
  };
@@ -4277,10 +4191,8 @@ const deserializeAws_json1_1GrantList = (output, context) => {
4277
4191
  };
4278
4192
  const deserializeAws_json1_1GrantListEntry = (output, context) => {
4279
4193
  return {
4280
- Constraints: output.Constraints !== undefined && output.Constraints !== null
4281
- ? deserializeAws_json1_1GrantConstraints(output.Constraints, context)
4282
- : undefined,
4283
- CreationDate: output.CreationDate !== undefined && output.CreationDate !== null
4194
+ Constraints: output.Constraints != null ? deserializeAws_json1_1GrantConstraints(output.Constraints, context) : undefined,
4195
+ CreationDate: output.CreationDate != null
4284
4196
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
4285
4197
  : undefined,
4286
4198
  GrantId: (0, smithy_client_1.expectString)(output.GrantId),
@@ -4288,9 +4200,7 @@ const deserializeAws_json1_1GrantListEntry = (output, context) => {
4288
4200
  IssuingAccount: (0, smithy_client_1.expectString)(output.IssuingAccount),
4289
4201
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4290
4202
  Name: (0, smithy_client_1.expectString)(output.Name),
4291
- Operations: output.Operations !== undefined && output.Operations !== null
4292
- ? deserializeAws_json1_1GrantOperationList(output.Operations, context)
4293
- : undefined,
4203
+ Operations: output.Operations != null ? deserializeAws_json1_1GrantOperationList(output.Operations, context) : undefined,
4294
4204
  RetiringPrincipal: (0, smithy_client_1.expectString)(output.RetiringPrincipal),
4295
4205
  };
4296
4206
  };
@@ -4385,17 +4295,17 @@ const deserializeAws_json1_1KeyMetadata = (output, context) => {
4385
4295
  AWSAccountId: (0, smithy_client_1.expectString)(output.AWSAccountId),
4386
4296
  Arn: (0, smithy_client_1.expectString)(output.Arn),
4387
4297
  CloudHsmClusterId: (0, smithy_client_1.expectString)(output.CloudHsmClusterId),
4388
- CreationDate: output.CreationDate !== undefined && output.CreationDate !== null
4298
+ CreationDate: output.CreationDate != null
4389
4299
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
4390
4300
  : undefined,
4391
4301
  CustomKeyStoreId: (0, smithy_client_1.expectString)(output.CustomKeyStoreId),
4392
4302
  CustomerMasterKeySpec: (0, smithy_client_1.expectString)(output.CustomerMasterKeySpec),
4393
- DeletionDate: output.DeletionDate !== undefined && output.DeletionDate !== null
4303
+ DeletionDate: output.DeletionDate != null
4394
4304
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletionDate)))
4395
4305
  : undefined,
4396
4306
  Description: (0, smithy_client_1.expectString)(output.Description),
4397
4307
  Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
4398
- EncryptionAlgorithms: output.EncryptionAlgorithms !== undefined && output.EncryptionAlgorithms !== null
4308
+ EncryptionAlgorithms: output.EncryptionAlgorithms != null
4399
4309
  ? deserializeAws_json1_1EncryptionAlgorithmSpecList(output.EncryptionAlgorithms, context)
4400
4310
  : undefined,
4401
4311
  ExpirationModel: (0, smithy_client_1.expectString)(output.ExpirationModel),
@@ -4404,21 +4314,19 @@ const deserializeAws_json1_1KeyMetadata = (output, context) => {
4404
4314
  KeySpec: (0, smithy_client_1.expectString)(output.KeySpec),
4405
4315
  KeyState: (0, smithy_client_1.expectString)(output.KeyState),
4406
4316
  KeyUsage: (0, smithy_client_1.expectString)(output.KeyUsage),
4407
- MacAlgorithms: output.MacAlgorithms !== undefined && output.MacAlgorithms !== null
4317
+ MacAlgorithms: output.MacAlgorithms != null
4408
4318
  ? deserializeAws_json1_1MacAlgorithmSpecList(output.MacAlgorithms, context)
4409
4319
  : undefined,
4410
4320
  MultiRegion: (0, smithy_client_1.expectBoolean)(output.MultiRegion),
4411
- MultiRegionConfiguration: output.MultiRegionConfiguration !== undefined && output.MultiRegionConfiguration !== null
4321
+ MultiRegionConfiguration: output.MultiRegionConfiguration != null
4412
4322
  ? deserializeAws_json1_1MultiRegionConfiguration(output.MultiRegionConfiguration, context)
4413
4323
  : undefined,
4414
4324
  Origin: (0, smithy_client_1.expectString)(output.Origin),
4415
4325
  PendingDeletionWindowInDays: (0, smithy_client_1.expectInt32)(output.PendingDeletionWindowInDays),
4416
- SigningAlgorithms: output.SigningAlgorithms !== undefined && output.SigningAlgorithms !== null
4326
+ SigningAlgorithms: output.SigningAlgorithms != null
4417
4327
  ? deserializeAws_json1_1SigningAlgorithmSpecList(output.SigningAlgorithms, context)
4418
4328
  : undefined,
4419
- ValidTo: output.ValidTo !== undefined && output.ValidTo !== null
4420
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ValidTo)))
4421
- : undefined,
4329
+ ValidTo: output.ValidTo != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ValidTo))) : undefined,
4422
4330
  };
4423
4331
  };
4424
4332
  const deserializeAws_json1_1KeyUnavailableException = (output, context) => {
@@ -4453,18 +4361,14 @@ const deserializeAws_json1_1LimitExceededException = (output, context) => {
4453
4361
  };
4454
4362
  const deserializeAws_json1_1ListAliasesResponse = (output, context) => {
4455
4363
  return {
4456
- Aliases: output.Aliases !== undefined && output.Aliases !== null
4457
- ? deserializeAws_json1_1AliasList(output.Aliases, context)
4458
- : undefined,
4364
+ Aliases: output.Aliases != null ? deserializeAws_json1_1AliasList(output.Aliases, context) : undefined,
4459
4365
  NextMarker: (0, smithy_client_1.expectString)(output.NextMarker),
4460
4366
  Truncated: (0, smithy_client_1.expectBoolean)(output.Truncated),
4461
4367
  };
4462
4368
  };
4463
4369
  const deserializeAws_json1_1ListGrantsResponse = (output, context) => {
4464
4370
  return {
4465
- Grants: output.Grants !== undefined && output.Grants !== null
4466
- ? deserializeAws_json1_1GrantList(output.Grants, context)
4467
- : undefined,
4371
+ Grants: output.Grants != null ? deserializeAws_json1_1GrantList(output.Grants, context) : undefined,
4468
4372
  NextMarker: (0, smithy_client_1.expectString)(output.NextMarker),
4469
4373
  Truncated: (0, smithy_client_1.expectBoolean)(output.Truncated),
4470
4374
  };
@@ -4472,17 +4376,13 @@ const deserializeAws_json1_1ListGrantsResponse = (output, context) => {
4472
4376
  const deserializeAws_json1_1ListKeyPoliciesResponse = (output, context) => {
4473
4377
  return {
4474
4378
  NextMarker: (0, smithy_client_1.expectString)(output.NextMarker),
4475
- PolicyNames: output.PolicyNames !== undefined && output.PolicyNames !== null
4476
- ? deserializeAws_json1_1PolicyNameList(output.PolicyNames, context)
4477
- : undefined,
4379
+ PolicyNames: output.PolicyNames != null ? deserializeAws_json1_1PolicyNameList(output.PolicyNames, context) : undefined,
4478
4380
  Truncated: (0, smithy_client_1.expectBoolean)(output.Truncated),
4479
4381
  };
4480
4382
  };
4481
4383
  const deserializeAws_json1_1ListKeysResponse = (output, context) => {
4482
4384
  return {
4483
- Keys: output.Keys !== undefined && output.Keys !== null
4484
- ? deserializeAws_json1_1KeyList(output.Keys, context)
4485
- : undefined,
4385
+ Keys: output.Keys != null ? deserializeAws_json1_1KeyList(output.Keys, context) : undefined,
4486
4386
  NextMarker: (0, smithy_client_1.expectString)(output.NextMarker),
4487
4387
  Truncated: (0, smithy_client_1.expectBoolean)(output.Truncated),
4488
4388
  };
@@ -4490,9 +4390,7 @@ const deserializeAws_json1_1ListKeysResponse = (output, context) => {
4490
4390
  const deserializeAws_json1_1ListResourceTagsResponse = (output, context) => {
4491
4391
  return {
4492
4392
  NextMarker: (0, smithy_client_1.expectString)(output.NextMarker),
4493
- Tags: output.Tags !== undefined && output.Tags !== null
4494
- ? deserializeAws_json1_1TagList(output.Tags, context)
4495
- : undefined,
4393
+ Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
4496
4394
  Truncated: (0, smithy_client_1.expectBoolean)(output.Truncated),
4497
4395
  };
4498
4396
  };
@@ -4515,12 +4413,8 @@ const deserializeAws_json1_1MalformedPolicyDocumentException = (output, context)
4515
4413
  const deserializeAws_json1_1MultiRegionConfiguration = (output, context) => {
4516
4414
  return {
4517
4415
  MultiRegionKeyType: (0, smithy_client_1.expectString)(output.MultiRegionKeyType),
4518
- PrimaryKey: output.PrimaryKey !== undefined && output.PrimaryKey !== null
4519
- ? deserializeAws_json1_1MultiRegionKey(output.PrimaryKey, context)
4520
- : undefined,
4521
- ReplicaKeys: output.ReplicaKeys !== undefined && output.ReplicaKeys !== null
4522
- ? deserializeAws_json1_1MultiRegionKeyList(output.ReplicaKeys, context)
4523
- : undefined,
4416
+ PrimaryKey: output.PrimaryKey != null ? deserializeAws_json1_1MultiRegionKey(output.PrimaryKey, context) : undefined,
4417
+ ReplicaKeys: output.ReplicaKeys != null ? deserializeAws_json1_1MultiRegionKeyList(output.ReplicaKeys, context) : undefined,
4524
4418
  };
4525
4419
  };
4526
4420
  const deserializeAws_json1_1MultiRegionKey = (output, context) => {
@@ -4558,9 +4452,7 @@ const deserializeAws_json1_1PolicyNameList = (output, context) => {
4558
4452
  };
4559
4453
  const deserializeAws_json1_1ReEncryptResponse = (output, context) => {
4560
4454
  return {
4561
- CiphertextBlob: output.CiphertextBlob !== undefined && output.CiphertextBlob !== null
4562
- ? context.base64Decoder(output.CiphertextBlob)
4563
- : undefined,
4455
+ CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined,
4564
4456
  DestinationEncryptionAlgorithm: (0, smithy_client_1.expectString)(output.DestinationEncryptionAlgorithm),
4565
4457
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4566
4458
  SourceEncryptionAlgorithm: (0, smithy_client_1.expectString)(output.SourceEncryptionAlgorithm),
@@ -4569,18 +4461,16 @@ const deserializeAws_json1_1ReEncryptResponse = (output, context) => {
4569
4461
  };
4570
4462
  const deserializeAws_json1_1ReplicateKeyResponse = (output, context) => {
4571
4463
  return {
4572
- ReplicaKeyMetadata: output.ReplicaKeyMetadata !== undefined && output.ReplicaKeyMetadata !== null
4464
+ ReplicaKeyMetadata: output.ReplicaKeyMetadata != null
4573
4465
  ? deserializeAws_json1_1KeyMetadata(output.ReplicaKeyMetadata, context)
4574
4466
  : undefined,
4575
4467
  ReplicaPolicy: (0, smithy_client_1.expectString)(output.ReplicaPolicy),
4576
- ReplicaTags: output.ReplicaTags !== undefined && output.ReplicaTags !== null
4577
- ? deserializeAws_json1_1TagList(output.ReplicaTags, context)
4578
- : undefined,
4468
+ ReplicaTags: output.ReplicaTags != null ? deserializeAws_json1_1TagList(output.ReplicaTags, context) : undefined,
4579
4469
  };
4580
4470
  };
4581
4471
  const deserializeAws_json1_1ScheduleKeyDeletionResponse = (output, context) => {
4582
4472
  return {
4583
- DeletionDate: output.DeletionDate !== undefined && output.DeletionDate !== null
4473
+ DeletionDate: output.DeletionDate != null
4584
4474
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletionDate)))
4585
4475
  : undefined,
4586
4476
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
@@ -4602,7 +4492,7 @@ const deserializeAws_json1_1SigningAlgorithmSpecList = (output, context) => {
4602
4492
  const deserializeAws_json1_1SignResponse = (output, context) => {
4603
4493
  return {
4604
4494
  KeyId: (0, smithy_client_1.expectString)(output.KeyId),
4605
- Signature: output.Signature !== undefined && output.Signature !== null ? context.base64Decoder(output.Signature) : undefined,
4495
+ Signature: output.Signature != null ? context.base64Decoder(output.Signature) : undefined,
4606
4496
  SigningAlgorithm: (0, smithy_client_1.expectString)(output.SigningAlgorithm),
4607
4497
  };
4608
4498
  };
@@ -4694,6 +4584,9 @@ const loadRestJsonErrorCode = (output, data) => {
4694
4584
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4695
4585
  const sanitizeErrorCode = (rawValue) => {
4696
4586
  let cleanValue = rawValue;
4587
+ if (typeof cleanValue === "number") {
4588
+ cleanValue = cleanValue.toString();
4589
+ }
4697
4590
  if (cleanValue.indexOf(":") >= 0) {
4698
4591
  cleanValue = cleanValue.split(":")[0];
4699
4592
  }