@Override
        public EnumTrait createTrait(ShapeId target, Node value) {
            Builder builder = builder().sourceLocation(value);
            for (ObjectNode definition : value.expectArrayNode().getElementsAs(ObjectNode.class)) {
                builder.addEnum(EnumDefinition.fromNode(definition));
            }
            EnumTrait result = builder.build();
            result.setNodeCache(value);
            return result;
        }
Builder used to create the enum trait.
smithy-model/src/main/java/software/amazon/smithy/model/traits/EnumTrait.java