public static MembershipAttributesData getMembershipAttributesData(RegionAttributes regAttrs) {
    MembershipAttributes memAttrs = regAttrs.getMembershipAttributes();
    Set<String> requiredRoles = new HashSet<>();
    for (final Role role : memAttrs.getRequiredRoles()) {
      requiredRoles.add(role.getName());
    }
    String lossAction = memAttrs.getLossAction().toString();

    String resumptionAction = memAttrs.getResumptionAction().toString();

    MembershipAttributesData membershipAttributesData =
        new MembershipAttributesData(requiredRoles, lossAction, resumptionAction);

    return membershipAttributesData;

  }
Utility class to create CompositeDataTypes for RegionMXBean
geode-core/src/main/java/org/apache/geode/management/internal/beans/RegionMBeanCompositeDataFactory.java