private void validateMember(
            List<ValidationEvent> events,
            String lifecycleOperationName,
            PropertyBindingIndex propertyBindingIndex,
            ResourceShape resource,
            MemberShape member,
            Set<String> identifierMembers,
            Map<String, ShapeId> properties,
            Map<String, Set<MemberShape>> propertyToMemberMappings
    ) {
        String propertyName = propertyBindingIndex.getPropertyName(member.getId()).get();
        propertyToMemberMappings.computeIfAbsent(propertyName, m -> new TreeSet<>()).add(member);
        if (properties.containsKey(propertyName)) {
            if (!properties.get(propertyName).equals(member.getTarget())) {
                ShapeId expectedTarget = properties.get(propertyName);
                events.add(error(member,
                        String.format(
                                "This member must target `%s`. This member is used as part of the `%s` operation of the `%s` "
                                        + "resource and conflicts with its `%s` resource property.",
                                expectedTarget,
                                lifecycleOperationName,
                                resource.getId(),
                                propertyName)));
            }
        } else if (!identifierMembers.contains(member.getMemberName())) {
            events.add(error(member,
                    String.format("Member `%s` does not target a property or identifier for resource "
                            + "`%s`. If it is an identifier, apply the `%s` trait. If it is a property, apply the `%s` trait. "
                            + "If it is neither, apply the `%s` trait.",
                            member.getMemberName(),
                            resource.getId().toString(),
                            ResourceIdentifierTrait.ID,
                            PropertyTrait.ID,
                            NotPropertyTrait.ID)));
        }
    }
Validates that resource properties are correctly used in resource-bound operations.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/ResourceOperationInputOutputValidator.java