@Override
  public void populateResource(Resource resource, InputStream inputStream) throws SystemException {

    try {
      Map<String, Object> responseMap = GSON.fromJson(IOUtils.toString(inputStream, "UTF-8"), MAP_TYPE);
      if (responseMap == null){
        LOG.error("Properties map from HTTP response is null");
      }
      for (Map.Entry<String, String> entry : getPropertyMappings().entrySet()) {
        Object propertyValueToSet = getPropertyValue(responseMap, entry.getKey());
        resource.setProperty(entry.getValue(), propertyValueToSet);
      }
    } catch (IOException e) {
      throw new SystemException("Error setting properties.", e);
    }
  }
Create a property request.

@param propertyMappings  the property name mapping
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/JsonHttpPropertyRequest.java