@Override
        public Void resourceShape(ResourceShape shape) {
            serializeTraits(shape);
            codeWriter.writeInline("resource $L ", shape.getId().getName());
            writeMixins(shape);
            codeWriter.openBlock("{");
            if (!shape.getIdentifiers().isEmpty()) {
                codeWriter.openBlock("identifiers: {");
                shape.getIdentifiers()
                        .entrySet()
                        .stream()
                        .sorted(Map.Entry.comparingByKey())
                        .forEach(entry -> codeWriter.write(
                                "$L: $I",
                                entry.getKey(),
                                entry.getValue()));
                codeWriter.closeBlock("}");
            }
            if (shape.hasProperties()) {
                codeWriter.openBlock("properties: {");
                shape.getProperties().forEach((name, shapeId) -> codeWriter.write("$L: $I", name, shapeId));
                codeWriter.closeBlock("}");
            }

            shape.getPut().ifPresent(shapeId -> codeWriter.write("put: $I", shapeId));
            shape.getCreate().ifPresent(shapeId -> codeWriter.write("create: $I", shapeId));
            shape.getRead().ifPresent(shapeId -> codeWriter.write("read: $I", shapeId));
            shape.getUpdate().ifPresent(shapeId -> codeWriter.write("update: $I", shapeId));
            shape.getDelete().ifPresent(shapeId -> codeWriter.write("delete: $I", shapeId));
            shape.getList().ifPresent(shapeId -> codeWriter.write("list: $I", shapeId));
            codeWriter.writeOptionalIdList("operations", shape.getIntroducedOperations());
            codeWriter.writeOptionalIdList("collectionOperations", shape.getCollectionOperations());
            codeWriter.writeOptionalIdList("resources", shape.getIntroducedResources());
            codeWriter.closeBlock("}");
            codeWriter.write("");
            return null;
        }
Serializes shapes in the IDL format.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/SmithyIdlModelSerializer.java