@Override
    protected Node createNode() {
        ObjectNode.Builder builder = Node.objectNodeBuilder().sourceLocation(getSourceLocation());

        if (selector != Selector.IDENTITY) {
            builder.withMember("selector", selector.toString());
        }

        if (!conflicts.isEmpty()) {
            builder.withMember("conflicts",
                    conflicts.stream()
                            .map(ShapeId::toString)
                            .map(Node::from)
                            .collect(ArrayNode.collect()));
        }

        builder.withOptionalMember("structurallyExclusive",
                getStructurallyExclusive().map(StructurallyExclusive::toNode));

        if (!breakingChanges.isEmpty()) {
            List<Node> result = new ArrayList<>(breakingChanges.size());
            breakingChanges.forEach(d -> result.add(d.toNode()));
            builder.withMember("breakingChanges", Node.fromNodes(result));
        }

        return builder.build();
    }
@return Returns the breaking change rules of the trait.
smithy-model/src/main/java/software/amazon/smithy/model/traits/TraitDefinition.java