openstatus.notification.v1.SendTestNotificationResponse
*/
class SendTestNotificationResponse extends \Google\Protobuf\Internal\Message
{
/**
* Whether the test was successful.
*
* Generated from protobuf field bool success = 1 [json_name = "success"];
*/
protected $success = false;
/**
* Optional error message if the test failed.
*
* Generated from protobuf field optional string error_message = 2 [json_name = "errorMessage"];
*/
protected $error_message = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type bool $success
* Whether the test was successful.
* @type string $error_message
* Optional error message if the test failed.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\Notification\V1\Service::initOnce();
parent::__construct($data);
}
/**
* Whether the test was successful.
*
* Generated from protobuf field bool success = 1 [json_name = "success"];
* @return bool
*/
public function getSuccess()
{
return $this->success;
}
/**
* Whether the test was successful.
*
* Generated from protobuf field bool success = 1 [json_name = "success"];
* @param bool $var
* @return $this
*/
public function setSuccess(bool $var)
{
$this->success = $var;
return $this;
}
/**
* Optional error message if the test failed.
*
* Generated from protobuf field optional string error_message = 2 [json_name = "errorMessage"];
* @return string
*/
public function getErrorMessage()
{
return isset($this->error_message) ? $this->error_message : '';
}
public function hasErrorMessage()
{
return isset($this->error_message);
}
public function clearErrorMessage()
{
unset($this->error_message);
}
/**
* Optional error message if the test failed.
*
* Generated from protobuf field optional string error_message = 2 [json_name = "errorMessage"];
* @param string $var
* @return $this
*/
public function setErrorMessage(string $var)
{
GPBUtil::checkString($var, true);
$this->error_message = $var;
return $this;
}
}