@Override
    public List<ValidationEvent> validate(Model model) {
        List<ValidationEvent> events = new ArrayList<>();
        TopDownIndex topDownIndex = TopDownIndex.of(model);
        AwsTagIndex tagIndex = AwsTagIndex.of(model);
        for (ServiceShape service : model.getServiceShapes()) {
            for (ResourceShape resource : topDownIndex.getContainedResources(service)) {
                boolean resourceLikelyTaggable = false;
                if (resource.hasTrait(TaggableTrait.ID)) {
                    events.addAll(validateResource(model, resource, service, tagIndex));
                    resourceLikelyTaggable = true;
                } else if (resource.hasTrait(ArnTrait.ID) && tagIndex.serviceHasTagApis(service)) {
                    // If a resource does not have the taggable trait, but has an ARN, and the service has tag
                    // operations, it is most likely a mistake.
                    events.add(warning(resource, "Resource is likely missing `aws.api#taggable` trait."));
                    resourceLikelyTaggable = true;
                }

                // It's possible the resource was marked as taggable but the service isn't tagEnabled.
                if (resourceLikelyTaggable && !service.hasTrait(TagEnabledTrait.ID)) {
                    events.add(warning(service,
                            "Service has resources with `aws.api#taggable` applied but does not "
                                    + "have the `aws.api#tagEnabled` trait."));
                }
            }
        }
        return events;
    }
Validates that service satisfies the AWS tagging requirements.
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/tagging/TaggableResourceValidator.java