private Optional<ValidationEvent> validateAuthSchemeName(
                Map<Identifier, Literal> authScheme,
                FromSourceLocation sourceLocation
        ) {
            if (!authScheme.containsKey(NAME) || !authScheme.get(NAME).asStringLiteral().isPresent()) {
                return Optional.of(error(serviceShape,
                        sourceLocation,
                        String.format("Expected `authSchemes` to have a `name` key with a string value but it did not: "
                                + "`%s`", authScheme)));
            }
            return Optional.empty();
        }
Validator which verifies an endpoint with an authSchemes property conforms to a strict schema.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/validators/RuleSetAuthSchemesValidator.java