private void shapeWithMembers(Shape shape, Collection<MemberShape> members, boolean isEnum) {
            List<MemberShape> nonMixinMembers = new ArrayList<>();
            List<MemberShape> mixinMembers = new ArrayList<>();
            for (MemberShape member : members) {
                if (member.getMixins().isEmpty()) {
                    nonMixinMembers.add(member);
                } else if (!member.getIntroducedTraits().isEmpty()) {
                    mixinMembers.add(member);
                }
            }

            serializeTraits(shape);
            // IDL V2 does not support sets, so convert set to list when serializing.
            String v2Type = shape.getType() == ShapeType.SET ? ShapeType.LIST.toString() : shape.getType().toString();
            codeWriter.writeInline("$L $L ", v2Type, shape.getId().getName());

            writeMixins(shape);
            if (isEnum) {
                writeEnumMembers(nonMixinMembers);
            } else {
                writeShapeMembers(nonMixinMembers);
            }
            codeWriter.write("");
            applyIntroducedTraits(mixinMembers);
        }
Serializes shapes in the IDL format.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/SmithyIdlModelSerializer.java