private void fromShapeIsNotResource(MemberShape.Builder memberBuilder, Shape fromShape) {
        String message = String.format(
                "The target of the `for` production must be a resource shape, but found a %s shape: %s",
                fromShape.getType(),
                resourceId);
        ValidationEvent event = ValidationEvent.builder()
                .id(Validator.MODEL_ERROR)
                .severity(Severity.ERROR)
                .shapeId(memberBuilder.getId())
                .sourceLocation(memberBuilder.getSourceLocation())
                .message(message)
                .build();
        if (events == null) {
            events = new ArrayList<>(1);
        }
        events.add(event);
    }
Sets member targets based on referenced resource identifiers.

<p>Structures can elide the targets of members if they're bound to a resource
and that resource has an identifier with a matching name. Here we set the
target based on that information.
smithy-model/src/main/java/software/amazon/smithy/model/loader/ApplyResourceBasedTargets.java