private void validateResourceIdentifierTraits(Model model, List<ValidationEvent> events) {
        for (ShapeId container : findStructuresWithResourceIdentifierTraits(model)) {
            if (!model.getShape(container).isPresent()) {
                continue;
            }

            Shape structure = model.expectShape(container);
            Map<String, Set<String>> bindings = computePotentialStructureBindings(structure);
            for (Map.Entry<String, Set<String>> entry : bindings.entrySet()) {
                // Only emit this event if the potential bindings contains
                // more than the implicit binding.
                if (entry.getValue().size() > 1 && entry.getValue().contains(entry.getKey())) {
                    Set<String> explicitBindings = entry.getValue();
                    explicitBindings.remove(entry.getKey());
                    events.add(warning(structure,
                            String.format(
                                    "Implicit resource identifier for '%s' is overridden by `resourceIdentifier` trait on "
                                            + "members: '%s'",
                                    entry.getKey(),
                                    String.join("', '", explicitBindings))));
                }
            }

            validateResourceIdentifierTraitConflicts(structure, events);
        }
    }
Validates that operations bound to resource shapes have identifier
bindings for all the identifiers of the parent of the binding resource,
that operations bound to a resource with the {@code collection}
trait are bound using a collection binding, and operations bound with
no {@code collection} trait are bound using an instance binding.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/ResourceIdentifierBindingValidator.java