code: @SuppressWarnings("unchecked")
      public static PoliciesBean unmarshallPolicies(Map<String, Object> source) {
          if (source == null) {
              return null;
          }
          PoliciesBean bean = new PoliciesBean();
          bean.setOrganizationId(asString(source.get("organizationId")));
          bean.setEntityId(asString(source.get("entityId")));
          bean.setEntityVersion(asString(source.get("entityVersion")));
          bean.setType(asEnum(source.get("type"), PolicyType.class));
          List<Map<String, Object>> policies = (List<Map<String, Object>>) source.get("policies");
          if (policies != null) {
              for (Map<String, Object> policyMap : policies) {
                  PolicyBean policy = new PolicyBean();
                  policy.setOrganizationId(bean.getOrganizationId());
                  policy.setEntityId(bean.getEntityId());
                  policy.setEntityVersion(bean.getEntityVersion());
                  policy.setType(bean.getType());
                  policy.setConfiguration(asString(policyMap.get("configuration")));
                  policy.setCreatedBy(asString(policyMap.get("createdBy")));
                  policy.setCreatedOn(asDate(policyMap.get("createdOn")));
                  PolicyDefinitionBean def = new PolicyDefinitionBean();
                  def.setId(asString(policyMap.get("definitionId")));
                  // Note: this is a placeholder that needs to be resolved later.
                  policy.setDefinition(def);
                  policy.setId(asLong(policyMap.get("id")));
                  policy.setModifiedBy(asString(policyMap.get("modifiedBy")));
                  policy.setModifiedOn(asDate(policyMap.get("modifiedOn")));
                  policy.setName(asString(policyMap.get("name")));
                  policy.setOrderIndex(asInt(policyMap.get("orderIndex")));
                  bean.getPolicies().add(policy);
              }
          }
          postMarshall(bean);
          return bean;
      }
docs: Unmarshals the given map source into a bean.
  @param source the source
  @return the policy beans