public static AlertDefinitionResponse coerce(AlertDefinitionEntity entity) {
    if (null == entity) {
      return null;
    }

    AlertDefinitionResponse response = new AlertDefinitionResponse();
    response.setDefinitionId(entity.getDefinitionId());
    response.setComponentName(entity.getComponentName());
    response.setLabel(entity.getLabel());
    response.setDescription(entity.getDescription());
    response.setName(entity.getDefinitionName());
    response.setServiceName(entity.getServiceName());
    response.setEnabled(entity.getEnabled());
    response.setSourceType(entity.getSourceType());

    return response;
  }
Gets an {@link AlertDefinitionResponse} from the supplied entity.

@param entity
         the entity (not {@code null}).
@return the response.
ambari-server/src/main/java/org/apache/ambari/server/controller/AlertDefinitionResponse.java