public RegionType getRegionType(String refid, RegionAttributesType regionAttributes) {
    if (refid != null) {
      try {
        return RegionType.valueOf(refid);
      } catch (Exception e) {
        // try to determine the region type based on the regionAttributes
      }
    }

    // if refid is null, we will try to determine the type based on the region attributes
    if (regionAttributes == null) {
      return RegionType.LEGACY;
    }
    RegionAttributesDataPolicy dataPolicy = regionAttributes.getDataPolicy();

    if (dataPolicy == null) {
      return RegionType.LEGACY;
    }

    switch (dataPolicy) {
      case PARTITION: {
        RegionAttributesType.PartitionAttributes partitionAttributes =
            regionAttributes.getPartitionAttributes();
        if (partitionAttributes != null && "0".equals(partitionAttributes.getLocalMaxMemory())) {
          return RegionType.PARTITION_PROXY;
        }
        return RegionType.PARTITION;
      }
      case PERSISTENT_PARTITION: {
        return RegionType.PARTITION_PERSISTENT;
      }
      case PERSISTENT_REPLICATE: {
        return RegionType.REPLICATE_PERSISTENT;
      }
      case REPLICATE: {
        return RegionType.REPLICATE;
      }
      case EMPTY: {
        return RegionType.REPLICATE_PROXY;
      }
    }
    return RegionType.LEGACY;
  }
Data policy to regionType is almost a 1-to-1 mapping, except in
the case of DataPolicy.PARTITION, we will need to see the local max memory
to determine if it's a PARTITION type or a PARTITION_PROXY type.

we do our best to infer the type from the existing xml attributes. For data
policies not supported by management rest api (for example, NORMAL and PRELOADED)
it will show as LEGACY
geode-core/src/main/java/org/apache/geode/management/internal/configuration/converters/RegionConverter.java