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