@SuppressWarnings("deprecation")
    private Optional<ValidationEvent> validateEnumMember(
            Model model,
            HttpChecksumTrait trait,
            String traitProperty,
            OperationShape operation,
            StructureShape input,
            String memberName,
            List<String> supportedValues
    ) {
        Optional<MemberShape> member = input.getMember(memberName);
        // There's no member that matches the configured name.
        if (!member.isPresent()) {
            return Optional.of(error(operation,
                    trait,
                    format("The `%s` property of the `httpChecksum` trait targets"
                            + " a member that does not exist.", traitProperty)));
        }

        // Validate the enum contains only supported values.
        Optional<EnumTrait> enumTraitOptional = member.get().getMemberTrait(model, EnumTrait.class);
        List<String> unsupportedValues = new ArrayList<>();
        if (enumTraitOptional.isPresent()) {
            for (String value : enumTraitOptional.get().getEnumDefinitionValues()) {
                if (!supportedValues.contains(value)) {
                    unsupportedValues.add(value);
                }
            }
        } else {
            // This member does not have an enum trait.
            return Optional.of(error(operation,
                    trait,
                    format("The `%s` property of the `httpChecksum` trait targets"
                            + " a member that does not resolve an `enum` trait.", traitProperty)));
        }

        // Valid enum target containing only supported values.
        if (unsupportedValues.isEmpty()) {
            return Optional.empty();
        }

        // The member has an enum that contains unsupported values.
        return Optional.of(error(operation,
                trait,
                format("The `%s` property of the `httpChecksum` trait targets"
                        + " a member with an `enum` trait that contains unsupported values: %s",
                        traitProperty,
                        ValidationUtils.tickedList(unsupportedValues))));
    }
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