private void validateResourceIdentifierTraitConflicts(Shape structure, List<ValidationEvent> events) {
        Map<String, Set<String>> explicitBindings = new HashMap<>();
        // Ensure no two members use a resourceIdentifier trait to bind to
        // the same identifier.
        for (MemberShape member : structure.members()) {
            if (member.hasTrait(ResourceIdentifierTrait.ID)) {
                explicitBindings.computeIfAbsent(member.expectTrait(ResourceIdentifierTrait.class).getValue(),
                        k -> new HashSet<>()).add(member.getMemberName());
            }
        }

        for (Map.Entry<String, Set<String>> entry : explicitBindings.entrySet()) {
            if (entry.getValue().size() > 1) {
                events.add(error(structure,
                        String.format(
                                "Conflicting resource identifier member bindings found for identifier '%s' between "
                                        + "members: '%s'",
                                entry.getKey(),
                                String.join("', '", entry.getValue()))));
            }
        }
    }
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