diff --git a/clients/client-s3/src/commands/DeleteObjectsCommand.ts b/clients/client-s3/src/commands/DeleteObjectsCommand.ts index 57727ddec80d7..09378b0aaa82b 100644 --- a/clients/client-s3/src/commands/DeleteObjectsCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectsCommand.ts @@ -307,7 +307,6 @@ export class DeleteObjectsCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/GetObjectCommand.ts b/clients/client-s3/src/commands/GetObjectCommand.ts index 3af214d29fc66..154538a85f1a9 100644 --- a/clients/client-s3/src/commands/GetObjectCommand.ts +++ b/clients/client-s3/src/commands/GetObjectCommand.ts @@ -360,7 +360,6 @@ export class GetObjectCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestChecksumRequired: false, requestValidationModeMember: "ChecksumMode", responseAlgorithms: ["CRC32", "CRC32C", "SHA256", "SHA1"], diff --git a/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts index 6be66e3545fee..0a3945af0266a 100644 --- a/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts @@ -123,7 +123,6 @@ export class PutBucketAccelerateConfigurationCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: false, }), diff --git a/clients/client-s3/src/commands/PutBucketAclCommand.ts b/clients/client-s3/src/commands/PutBucketAclCommand.ts index a19c526d14618..b1963d325ae67 100644 --- a/clients/client-s3/src/commands/PutBucketAclCommand.ts +++ b/clients/client-s3/src/commands/PutBucketAclCommand.ts @@ -314,7 +314,6 @@ export class PutBucketAclCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketCorsCommand.ts b/clients/client-s3/src/commands/PutBucketCorsCommand.ts index eff76383c463f..55c4c5d33fe92 100644 --- a/clients/client-s3/src/commands/PutBucketCorsCommand.ts +++ b/clients/client-s3/src/commands/PutBucketCorsCommand.ts @@ -198,7 +198,6 @@ export class PutBucketCorsCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts b/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts index 62f5fcb6295d2..4d08df19335f7 100644 --- a/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts +++ b/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts @@ -198,7 +198,6 @@ export class PutBucketEncryptionCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts index 12cf746492154..9dd8deb0a1dc3 100644 --- a/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts @@ -260,7 +260,6 @@ export class PutBucketLifecycleConfigurationCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketLoggingCommand.ts b/clients/client-s3/src/commands/PutBucketLoggingCommand.ts index 4efecf7ecadbf..6c825b4adaa82 100644 --- a/clients/client-s3/src/commands/PutBucketLoggingCommand.ts +++ b/clients/client-s3/src/commands/PutBucketLoggingCommand.ts @@ -214,7 +214,6 @@ export class PutBucketLoggingCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts b/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts index f9d3c1c96f848..65fec824b489c 100644 --- a/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts +++ b/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts @@ -104,7 +104,6 @@ export class PutBucketOwnershipControlsCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestChecksumRequired: true, }), ]; diff --git a/clients/client-s3/src/commands/PutBucketPolicyCommand.ts b/clients/client-s3/src/commands/PutBucketPolicyCommand.ts index 18f341a279927..ddf473bb2ff0b 100644 --- a/clients/client-s3/src/commands/PutBucketPolicyCommand.ts +++ b/clients/client-s3/src/commands/PutBucketPolicyCommand.ts @@ -157,7 +157,6 @@ export class PutBucketPolicyCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketReplicationCommand.ts b/clients/client-s3/src/commands/PutBucketReplicationCommand.ts index 641379180e0fc..f5023f652783c 100644 --- a/clients/client-s3/src/commands/PutBucketReplicationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketReplicationCommand.ts @@ -239,7 +239,6 @@ export class PutBucketReplicationCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts b/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts index 8cde3add1e7e4..40b02d7774fea 100644 --- a/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts +++ b/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts @@ -114,7 +114,6 @@ export class PutBucketRequestPaymentCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketTaggingCommand.ts b/clients/client-s3/src/commands/PutBucketTaggingCommand.ts index 35c320c62eb83..94a3a4d440756 100644 --- a/clients/client-s3/src/commands/PutBucketTaggingCommand.ts +++ b/clients/client-s3/src/commands/PutBucketTaggingCommand.ts @@ -168,7 +168,6 @@ export class PutBucketTaggingCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketVersioningCommand.ts b/clients/client-s3/src/commands/PutBucketVersioningCommand.ts index 4b242e4860f7f..34f8d2734a3c1 100644 --- a/clients/client-s3/src/commands/PutBucketVersioningCommand.ts +++ b/clients/client-s3/src/commands/PutBucketVersioningCommand.ts @@ -149,7 +149,6 @@ export class PutBucketVersioningCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts b/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts index 495a23513fe2d..6f2a528dfee8a 100644 --- a/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts +++ b/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts @@ -249,7 +249,6 @@ export class PutBucketWebsiteCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutObjectAclCommand.ts b/clients/client-s3/src/commands/PutObjectAclCommand.ts index ab7017a2e28c2..4724ddaa77c34 100644 --- a/clients/client-s3/src/commands/PutObjectAclCommand.ts +++ b/clients/client-s3/src/commands/PutObjectAclCommand.ts @@ -313,7 +313,6 @@ export class PutObjectAclCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutObjectCommand.ts b/clients/client-s3/src/commands/PutObjectCommand.ts index b9978cd24f94d..a818ed1a0cb3a 100644 --- a/clients/client-s3/src/commands/PutObjectCommand.ts +++ b/clients/client-s3/src/commands/PutObjectCommand.ts @@ -413,7 +413,6 @@ export class PutObjectCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: false, }), diff --git a/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts b/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts index 4439d9908630a..278ef5292dc71 100644 --- a/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts +++ b/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts @@ -91,7 +91,6 @@ export class PutObjectLegalHoldCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts b/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts index 7041958683bb0..8b99cda53a4c4 100644 --- a/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts @@ -114,7 +114,6 @@ export class PutObjectLockConfigurationCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutObjectRetentionCommand.ts b/clients/client-s3/src/commands/PutObjectRetentionCommand.ts index 74c56d0a12a5e..587834590e1ae 100644 --- a/clients/client-s3/src/commands/PutObjectRetentionCommand.ts +++ b/clients/client-s3/src/commands/PutObjectRetentionCommand.ts @@ -94,7 +94,6 @@ export class PutObjectRetentionCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutObjectTaggingCommand.ts b/clients/client-s3/src/commands/PutObjectTaggingCommand.ts index 06510a97f7092..f6f48c3d17c80 100644 --- a/clients/client-s3/src/commands/PutObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/PutObjectTaggingCommand.ts @@ -174,7 +174,6 @@ export class PutObjectTaggingCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts b/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts index 4306cf2cbe5fe..b3ab5faf036f1 100644 --- a/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts +++ b/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts @@ -122,7 +122,6 @@ export class PutPublicAccessBlockCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: true, }), diff --git a/clients/client-s3/src/commands/RestoreObjectCommand.ts b/clients/client-s3/src/commands/RestoreObjectCommand.ts index a63ff0f640b21..11eaff639df1a 100644 --- a/clients/client-s3/src/commands/RestoreObjectCommand.ts +++ b/clients/client-s3/src/commands/RestoreObjectCommand.ts @@ -388,7 +388,6 @@ export class RestoreObjectCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: false, }), diff --git a/clients/client-s3/src/commands/UploadPartCommand.ts b/clients/client-s3/src/commands/UploadPartCommand.ts index 3e029af75c2ad..a842c4deb4495 100644 --- a/clients/client-s3/src/commands/UploadPartCommand.ts +++ b/clients/client-s3/src/commands/UploadPartCommand.ts @@ -309,7 +309,6 @@ export class UploadPartCommand extends $Command getSerdePlugin(config, this.serialize, this.deserialize), getEndpointPlugin(config, Command.getEndpointParameterInstructions()), getFlexibleChecksumsPlugin(config, { - input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", requestChecksumRequired: false, }), diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttpChecksumDependency.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttpChecksumDependency.java index 94eed9a133b26..ccf41e150e2e6 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttpChecksumDependency.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttpChecksumDependency.java @@ -25,7 +25,6 @@ import java.util.TreeMap; import java.util.function.Consumer; import software.amazon.smithy.aws.traits.HttpChecksumTrait; -import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.codegen.core.SymbolProvider; import software.amazon.smithy.model.Model; import software.amazon.smithy.model.knowledge.TopDownIndex; @@ -197,7 +196,6 @@ private static Map getPluginFunctionParams( OperationShape operation ) { Map params = new TreeMap(); - params.put("input", Symbol.builder().name("this.input").build()); HttpChecksumTrait httpChecksumTrait = operation.expectTrait(HttpChecksumTrait.class); params.put("requestChecksumRequired", httpChecksumTrait.isRequestChecksumRequired()); diff --git a/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.spec.ts b/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.spec.ts index a29583f62c353..9d284db11a2ae 100644 --- a/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.spec.ts +++ b/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.spec.ts @@ -29,12 +29,12 @@ describe(flexibleChecksumsMiddleware.name, () => { const mockInput = {}; const mockConfig = {} as PreviouslyResolved; - const mockMiddlewareConfig = { input: mockInput, requestChecksumRequired: false }; + const mockMiddlewareConfig = { requestChecksumRequired: false }; const mockBody = { body: "mockRequestBody" }; const mockHeaders = { "content-length": 100, "content-encoding": "gzip" }; const mockRequest = { body: mockBody, headers: mockHeaders }; - const mockArgs = { request: mockRequest } as BuildHandlerArguments; + const mockArgs = { input: mockInput, request: mockRequest } as BuildHandlerArguments; const mockResult = { response: { body: "mockResponsebody" } }; beforeEach(() => { diff --git a/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts b/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts index cc5efb32212a3..317537dd9ab7a 100644 --- a/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts +++ b/packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.ts @@ -21,10 +21,6 @@ import { stringHasher } from "./stringHasher"; export interface FlexibleChecksumsRequestMiddlewareConfig { /** - * The input object for the operation. - */ - input: Object; - /** * Indicates an operation requires a checksum in its HTTP request. */ @@ -57,10 +53,10 @@ export const flexibleChecksumsMiddleware = return next(args); } - const { request } = args; + const { request, input } = args; const { body: requestBody, headers } = request; const { base64Encoder, streamHasher } = config; - const { input, requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; + const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; const checksumAlgorithm = getChecksumAlgorithmForRequest( input,