private void computeEvents(
            Model model,
            OperationShape operation,
            StructureShape shape,
            Map<ShapeId, EventStreamInfo> infoMap
    ) {
        for (MemberShape member : shape.getAllMembers().values()) {
            Shape target = model.expectShape(member.getTarget());
            if (target.hasTrait(StreamingTrait.ID) && target.isUnionShape()) {
                createEventStreamInfo(model, operation, shape, member).ifPresent(info -> {
                    infoMap.put(operation.getId(), info);
                });
            }
        }
    }
Index of operation shapes to event stream information.

<p>This knowledge index provides information about event streams in
operations, including the input/output member that contains an
event stream, the shape targeted by this member, and any additional
input/output members that form the initial message.
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/EventStreamIndex.java