private Collection<MemberShape> writeInlineableProperty(String key, ShapeId shapeId, ShapeId defaultTrait) {
            if (!inlineableShapes.contains(shapeId)) {
                codeWriter.write("$L: $I", key, shapeId);
                return Collections.emptyList();
            }

            StructureShape structure = model.expectShape(shapeId, StructureShape.class);
            if (hasOnlyDefaultTrait(structure, defaultTrait)) {
                codeWriter.writeInline("$L := ", key);
            } else {
                codeWriter.write("$L := ", key);
                codeWriter.indent();
                Map<ShapeId, Trait> traits = structure.getAllTraits();
                if (defaultTrait != null) {
                    traits = new HashMap<>(traits);
                    traits.remove(defaultTrait);
                }
                serializeTraits(traits);
            }

            List<MemberShape> nonMixinMembers = new ArrayList<>();
            List<MemberShape> mixinMembers = new ArrayList<>();
            for (MemberShape member : structure.members()) {
                if (member.getMixins().isEmpty()) {
                    nonMixinMembers.add(member);
                } else if (!member.getIntroducedTraits().isEmpty()) {
                    mixinMembers.add(member);
                }
            }

            writeMixins(structure);
            writeShapeMembers(nonMixinMembers);

            if (!hasOnlyDefaultTrait(structure, defaultTrait)) {
                codeWriter.dedent();
            }

            return mixinMembers;
        }
Serializes shapes in the IDL format.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/SmithyIdlModelSerializer.java