@Override
    protected Node createNode() {
        ObjectNode.Builder partitionSpecialCasesNodeBuilder = ObjectNode.objectNodeBuilder();
        for (Map.Entry<String, List<PartitionSpecialCase>> entry : partitionSpecialCases.entrySet()) {
            List<Node> nodes = new ArrayList<>();
            for (PartitionSpecialCase partitionSpecialCase : entry.getValue()) {
                nodes.add(partitionSpecialCase.toNode());
            }
            partitionSpecialCasesNodeBuilder.withMember(entry.getKey(), Node.fromNodes(nodes));
        }

        ObjectNode.Builder regionSpecialCasesNodeBuilder = ObjectNode.objectNodeBuilder();
        for (Map.Entry<String, List<RegionSpecialCase>> entry : regionSpecialCases.entrySet()) {
            List<Node> nodes = new ArrayList<>();
            for (RegionSpecialCase regionSpecialCase : entry.getValue()) {
                nodes.add(regionSpecialCase.toNode());
            }
            regionSpecialCasesNodeBuilder.withMember(entry.getKey(), Node.fromNodes(nodes));
        }

        return ObjectNode.objectNodeBuilder()
                .sourceLocation(getSourceLocation())
                .withMember(PARTITION_SPECIAL_CASES, partitionSpecialCasesNodeBuilder.build())
                .withMember(REGION_SPECIAL_CASES, regionSpecialCasesNodeBuilder.build())
                .build();
    }
Gets the map of partition string to a list of region special cases defined in the trait.

@return Returns a map of region string to a list of {@link RegionSpecialCase}
smithy-aws-endpoints/src/main/java/software/amazon/smithy/rulesengine/aws/traits/StandardRegionalEndpointsTrait.java