private static <U> Optional<ValidationEvent> validatePropertyType(
            BiFunction<FromSourceLocation, String, ValidationEvent> emitter,
            Literal value,
            Identifier propertyName,
            Function<Literal, Optional<U>> validator,
            String expectedType
    ) {
        if (value == null) {
            return Optional.of(emitter.apply(propertyName,
                    String.format("Expected auth property `%s` of %s type but didn't find one",
                            propertyName,
                            expectedType)));
        }

        if (!validator.apply(value).isPresent()) {
            return Optional.of(emitter.apply(value,
                    String.format("Unexpected type for auth property `%s`, found `%s` but expected %s value",
                            propertyName,
                            value,
                            expectedType)));
        }
        return Optional.empty();
    }
Returns if a given auth scheme is equivalent to {@code aws.auth#sigv4a}.

@param authScheme name of the auth scheme.
@return whether the auth scheme is equivalent to {@code aws.auth#sigv4a}.
smithy-aws-endpoints/src/main/java/software/amazon/smithy/rulesengine/aws/language/functions/EndpointAuthUtils.java