private List<ValidationEvent> validateService(Model model, ArnIndex arnIndex, ServiceShape service) {
        // Make sure each ARN template contains relevant identifiers.
        List<ValidationEvent> events = new ArrayList<>();
        for (Map.Entry<ShapeId, ArnTrait> entry : arnIndex.getServiceResourceArns(service.getId()).entrySet()) {
            model.getShape(entry.getKey()).flatMap(Shape::asResourceShape).ifPresent(resource -> {
                events.addAll(validateResourceArn(resource, entry.getValue()));
            });
        }
        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