private List<ValidationEvent> validateResourceArn(ResourceShape resource, ArnTrait template) {
        // Fail early on syntax error, otherwise, validate that the
        // template correspond to identifiers.
        return syntax(resource, template).map(Collections::singletonList).orElseGet(() -> {
            List<ValidationEvent> events = new ArrayList<>();
            enough(resource.getIdentifiers().keySet(), resource, template).ifPresent(events::add);
            tooMuch(resource.getIdentifiers().keySet(), resource, template).ifPresent(events::add);
            return events;
        });
    }
Ensures that all arn traits for a service are valid and that their templates
only reference valid resource identifiers.
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnTemplateValidator.java