|
1 | 1 | /**
|
2 | 2 | * Determines when a checksum will be calculated for request payloads.
|
3 | 3 | */
|
4 |
| -export enum RequestChecksumCalculation { |
| 4 | +export const RequestChecksumCalculation = { |
5 | 5 | /**
|
6 | 6 | * When set, a checksum will be calculated for all request payloads of operations
|
7 | 7 | * modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true`
|
8 | 8 | * AND/OR a `requestAlgorithmMember` is modeled.
|
9 | 9 | * {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
|
10 | 10 | */
|
11 |
| - WHEN_SUPPORTED = "WHEN_SUPPORTED", |
| 11 | + WHEN_SUPPORTED: "WHEN_SUPPORTED", |
12 | 12 |
|
13 | 13 | /**
|
14 | 14 | * When set, a checksum will only be calculated for request payloads of operations
|
15 | 15 | * modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true`
|
16 | 16 | * OR where a `requestAlgorithmMember` is modeled and the user sets it.
|
17 | 17 | * {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
|
18 | 18 | */
|
19 |
| - WHEN_REQUIRED = "WHEN_REQUIRED", |
20 |
| -} |
| 19 | + WHEN_REQUIRED: "WHEN_REQUIRED", |
| 20 | +} as const; |
| 21 | + |
| 22 | +export type RequestChecksumCalculation = (typeof RequestChecksumCalculation)[keyof typeof RequestChecksumCalculation]; |
21 | 23 |
|
22 | 24 | /**
|
23 | 25 | * Determines when checksum validation will be performed on response payloads.
|
24 | 26 | */
|
25 |
| -export enum ResponseChecksumValidation { |
| 27 | +export const ResponseChecksumValidation = { |
26 | 28 | /**
|
27 | 29 | * When set, checksum validation MUST be performed on all response payloads of operations
|
28 | 30 | * modeled with the {@link httpChecksum} trait where `responseAlgorithms` is modeled,
|
29 | 31 | * except when no modeled checksum algorithms are supported by an SDK.
|
30 | 32 | * {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
|
31 | 33 | */
|
32 |
| - WHEN_SUPPORTED = "WHEN_SUPPORTED", |
| 34 | + WHEN_SUPPORTED: "WHEN_SUPPORTED", |
33 | 35 |
|
34 | 36 | /**
|
35 | 37 | * When set, checksum validation MUST NOT be performed on response payloads of operations UNLESS
|
36 | 38 | * the SDK supports the modeled checksum algorithms AND the user has set the `requestValidationModeMember` to `ENABLED`.
|
37 | 39 | * It is currently impossible to model an operation as requiring a response checksum,
|
38 | 40 | * but this setting leaves the door open for future updates.
|
39 | 41 | */
|
40 |
| - WHEN_REQUIRED = "WHEN_REQUIRED", |
41 |
| -} |
| 42 | + WHEN_REQUIRED: "WHEN_REQUIRED", |
| 43 | +} as const; |
| 44 | + |
| 45 | +export type ResponseChecksumValidation = (typeof ResponseChecksumValidation)[keyof typeof ResponseChecksumValidation]; |
42 | 46 |
|
43 | 47 | /**
|
44 | 48 | * Checksum Algorithms supported by the SDK.
|
|
0 commit comments