private void validateCollectionBindings(
            Model model,
            ResourceShape resource,
            IdentifierBindingIndex bindingIndex,
            List<ValidationEvent> events
    ) {
        for (ShapeId operationId : resource.getAllOperations()) {
            if (bindingIndex.getOperationBindingType(resource, operationId) != BindingType.COLLECTION) {
                continue;
            }

            OperationShape operation = model.expectShape(operationId, OperationShape.class);
            if (hasAllIdentifiersBound(model, resource, operation, bindingIndex)) {
                events.add(error(operation,
                        format(
                                "This operation is bound as a collection operation on the `%s` resource, but it "
                                        + "improperly binds all of the identifiers of the resource to members of the "
                                        + "operation input.",
                                resource.getId())));
            }
        }
    }
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