@Override
        public Trait createTrait(ShapeId target, Node value) {
            ObjectNode objectNode = value.expectObjectNode();

            StandardRegionalEndpointsTrait.Builder builder = builder()
                    .sourceLocation(value);

            if (objectNode.containsMember(PARTITION_SPECIAL_CASES)) {
                for (Map.Entry<String, Node> entry : objectNode.expectObjectMember(PARTITION_SPECIAL_CASES)
                        .getStringMap()
                        .entrySet()) {
                    List<PartitionSpecialCase> partitionSpecialCases = new ArrayList<>();
                    for (Node node : entry.getValue().expectArrayNode().getElements()) {
                        partitionSpecialCases.add(PartitionSpecialCase.fromNode(node));
                    }
                    builder.putPartitionSpecialCases(
                            entry.getKey(),
                            Collections.unmodifiableList(partitionSpecialCases));
                }
            }

            if (objectNode.containsMember(REGION_SPECIAL_CASES)) {
                for (Map.Entry<String, Node> entry : objectNode.expectObjectMember(REGION_SPECIAL_CASES)
                        .getStringMap()
                        .entrySet()) {
                    List<RegionSpecialCase> regionSpecialCases = new ArrayList<>();
                    for (Node node : entry.getValue().expectArrayNode().getElements()) {
                        regionSpecialCases.add(RegionSpecialCase.fromNode(node));
                    }
                    builder.putRegionSpecialCases(entry.getKey(), Collections.unmodifiableList(regionSpecialCases));
                }
            }

            StandardRegionalEndpointsTrait result = builder.build();
            result.setNodeCache(value);
            return result;
        }
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