private Resource setResources(MpackResponse response) {
    Resource resource = new ResourceImpl(Resource.Type.Mpack);
    resource.setProperty(MPACK_RESOURCE_ID, response.getId());
    resource.setProperty(MPACK_ID, response.getMpackId());
    resource.setProperty(MPACK_NAME, response.getMpackName());
    resource.setProperty(MPACK_VERSION, response.getMpackVersion());
    resource.setProperty(MPACK_URI, response.getMpackUri());
    resource.setProperty(MPACK_DESCRIPTION, response.getDescription());
    resource.setProperty(REGISTRY_ID, response.getRegistryId());
    resource.setProperty(MPACK_DISPLAY_NAME, response.getDisplayName());
    return resource;
  }
Validates the request body for the required properties in order to create an Mpack resource.

@param mpackRequest
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java