Skip to content

Commit 933c36b

Browse files
authored
Add UNKNOWN_TO_SDK value to enums (#1998)
fix 1921
1 parent a33203e commit 933c36b

29 files changed

+114
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66

7+
- Add `UNKNOWN_TO_SDK` value to enums that is used when the API returns an value that is not (or not yet) known by the AsyncAws
78
- AWS api-change: Added `us-isob-west-1` region
89
- AWS api-change: Added support for new ECC_NIST_EDWARDS25519 AWS KMS key spec
910
- AWS api-change: Added `eusc-de-east-1` region

src/Enum/CustomerMasterKeySpec.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ final class CustomerMasterKeySpec
1717
public const RSA_4096 = 'RSA_4096';
1818
public const SM2 = 'SM2';
1919
public const SYMMETRIC_DEFAULT = 'SYMMETRIC_DEFAULT';
20+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
2021

22+
/**
23+
* @psalm-assert-if-true self::* $value
24+
*/
2125
public static function exists(string $value): bool
2226
{
2327
return isset([

src/Enum/DataKeySpec.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ final class DataKeySpec
77
public const AES_128 = 'AES_128';
88
public const AES_256 = 'AES_256';
99

10+
/**
11+
* @psalm-assert-if-true self::* $value
12+
*/
1013
public static function exists(string $value): bool
1114
{
1215
return isset([

src/Enum/EncryptionAlgorithmSpec.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ final class EncryptionAlgorithmSpec
88
public const RSAES_OAEP_SHA_256 = 'RSAES_OAEP_SHA_256';
99
public const SM2PKE = 'SM2PKE';
1010
public const SYMMETRIC_DEFAULT = 'SYMMETRIC_DEFAULT';
11+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
1112

13+
/**
14+
* @psalm-assert-if-true self::* $value
15+
*/
1216
public static function exists(string $value): bool
1317
{
1418
return isset([

src/Enum/ExpirationModelType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ final class ExpirationModelType
66
{
77
public const KEY_MATERIAL_DOES_NOT_EXPIRE = 'KEY_MATERIAL_DOES_NOT_EXPIRE';
88
public const KEY_MATERIAL_EXPIRES = 'KEY_MATERIAL_EXPIRES';
9+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
910

11+
/**
12+
* @psalm-assert-if-true self::* $value
13+
*/
1014
public static function exists(string $value): bool
1115
{
1216
return isset([

src/Enum/KeyAgreementAlgorithmSpec.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
final class KeyAgreementAlgorithmSpec
66
{
77
public const ECDH = 'ECDH';
8+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
89

10+
/**
11+
* @psalm-assert-if-true self::* $value
12+
*/
913
public static function exists(string $value): bool
1014
{
1115
return isset([

src/Enum/KeyEncryptionMechanism.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ final class KeyEncryptionMechanism
66
{
77
public const RSAES_OAEP_SHA_256 = 'RSAES_OAEP_SHA_256';
88

9+
/**
10+
* @psalm-assert-if-true self::* $value
11+
*/
912
public static function exists(string $value): bool
1013
{
1114
return isset([

src/Enum/KeyManagerType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ final class KeyManagerType
66
{
77
public const AWS = 'AWS';
88
public const CUSTOMER = 'CUSTOMER';
9+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
910

11+
/**
12+
* @psalm-assert-if-true self::* $value
13+
*/
1014
public static function exists(string $value): bool
1115
{
1216
return isset([

src/Enum/KeySpec.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ final class KeySpec
2121
public const RSA_4096 = 'RSA_4096';
2222
public const SM2 = 'SM2';
2323
public const SYMMETRIC_DEFAULT = 'SYMMETRIC_DEFAULT';
24+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
2425

26+
/**
27+
* @psalm-assert-if-true self::* $value
28+
*/
2529
public static function exists(string $value): bool
2630
{
2731
return isset([

src/Enum/KeyState.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ final class KeyState
1212
public const PENDING_REPLICA_DELETION = 'PendingReplicaDeletion';
1313
public const UNAVAILABLE = 'Unavailable';
1414
public const UPDATING = 'Updating';
15+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
1516

17+
/**
18+
* @psalm-assert-if-true self::* $value
19+
*/
1620
public static function exists(string $value): bool
1721
{
1822
return isset([

0 commit comments

Comments
 (0)