From f7800dd579e24f884aa20a503ecb3f3ff6306042 Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:01:53 +0000 Subject: [PATCH] chore(middleware-flexible-checksums): use object for requestAlgorithmMember --- .../src/flexibleChecksumsMiddleware.ts | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts b/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts index bc3d6308851d..7a19714e8755 100644 --- a/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts +++ b/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts @@ -27,15 +27,20 @@ export interface FlexibleChecksumsRequestMiddlewareConfig { requestChecksumRequired: boolean; /** - * Defines a top-level operation input member that is used to configure request checksum behavior. + * Member that is used to configure request checksum behavior. */ - requestAlgorithmMember?: string; + requestAlgorithmMember?: { + /** + * Defines a top-level operation input member that is used to configure request checksum behavior. + */ + name: string; - /** - * The {@link httpHeader} value for {@link requestAlgorithmMember}, if present. - * {@link https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait httpHeader} - */ - requestAlgorithmMemberHttpHeader?: string; + /** + * The {@link httpHeader} value, if present. + * {@link https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait httpHeader} + */ + httpHeader?: string; + }; } export const flexibleChecksumsMiddlewareOptions: BuildHandlerOptions = { @@ -68,7 +73,7 @@ export const flexibleChecksumsMiddleware = input, { requestChecksumRequired, - requestAlgorithmMember, + requestAlgorithmMember: requestAlgorithmMember?.name, }, !!context.isS3ExpressBucket );