private List<ValidationEvent> validateOperation(Model model, OperationShape operation) {
        HttpChecksumTrait trait = operation.expectTrait(HttpChecksumTrait.class);

        // Request checksum behavior is defined when either the `requestChecksumRequired`
        // property or `requestAlgorithmMember` property are modeled.
        boolean isRequestChecksumConfiguration =
                trait.isRequestChecksumRequired() || trait.getRequestAlgorithmMember().isPresent();

        // Response checksum behavior is defined when either the `requestValidationModeMember`
        // property or `responseAlgorithms` property are modeled. Actually both are needed, but this check helps do
        // deeper validation later.
        boolean isResponseChecksumConfiguration =
                !trait.getResponseAlgorithms().isEmpty() || trait.getRequestValidationModeMember().isPresent();

        if (!isRequestChecksumConfiguration && !isResponseChecksumConfiguration) {
            return ListUtils.of(error(operation,
                    trait,
                    "The `httpChecksum` trait must define at least one of the"
                            + " `request` or `response` checksum behaviors."));
        }

        List<ValidationEvent> events = new ArrayList<>();

        // TraitTarget validation will raise an error if there's no operation input.
        model.getShape(operation.getInputShape()).flatMap(Shape::asStructureShape).ifPresent(input -> {
            if (isRequestChecksumConfiguration) {
                events.addAll(validateRequestChecksumConfiguration(model, trait, operation, input));
            }

            if (isResponseChecksumConfiguration) {
                events.addAll(validateResponseChecksumConfiguration(model, trait, operation, input));
            }
        });

        return events;
    }
Validates the HttpChecksum trait.

<ul>
    <li>Validates that at least one of the request or response checksum
    behavior is configured.</li>
    <li>Validates that the {@code requestAlgorithmMember} and
    {@code requestChecksumModeMember} properties point to valid input members.</li>
    <li>Validates that the {@code requestAlgorithmMember} targeted member contains
    only supported algorithms.</li>
    <li>Validates that the {@code requestChecksumModeMember} targeted member contains
    only supported modes.</li>
    <li>Checks for conflicts with {@code @httpHeader} and {@code @httpPrefixHeaders}.</li>
</ul>
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/HttpChecksumTraitValidator.java