public function validateEntity($entity)
{
parent::validateEntity($entity);
if (empty($entity->settings[FarmRoleScalingMetric::URL])) {
throw new ApiErrorException(400, ErrorMessage::ERR_INVALID_STRUCTURE, 'Missed property url');
}
if (!filter_var($entity->settings[FarmRoleScalingMetric::URL], FILTER_VALIDATE_URL)) {
throw new ApiErrorException(400, ErrorMessage::ERR_INVALID_VALUE, 'Property url is invalid');
}
}