openstatus.notification.v1.CreateNotificationRequest
*/
class CreateNotificationRequest extends \Google\Protobuf\Internal\Message
{
/**
* Display name for the notification channel.
*
* Generated from protobuf field string name = 1 [json_name = "name", (.gnostic.openapi.v3.property) = {
*/
protected $name = '';
/**
* Provider type.
*
* Generated from protobuf field .openstatus.notification.v1.NotificationProvider provider = 2 [json_name = "provider", (.buf.validate.field) = {
*/
protected $provider = 0;
/**
* Provider-specific configuration.
*
* Generated from protobuf field .openstatus.notification.v1.NotificationData data = 3 [json_name = "data", (.buf.validate.field) = {
*/
protected $data = null;
/**
* IDs of monitors to associate with this notification.
*
* Generated from protobuf field repeated string monitor_ids = 4 [json_name = "monitorIds"];
*/
private $monitor_ids;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Display name for the notification channel.
* @type int $provider
* Provider type.
* @type \Openstatus\Notification\V1\NotificationData $data
* Provider-specific configuration.
* @type string[] $monitor_ids
* IDs of monitors to associate with this notification.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\Notification\V1\Service::initOnce();
parent::__construct($data);
}
/**
* Display name for the notification channel.
*
* Generated from protobuf field string name = 1 [json_name = "name", (.gnostic.openapi.v3.property) = {
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Display name for the notification channel.
*
* Generated from protobuf field string name = 1 [json_name = "name", (.gnostic.openapi.v3.property) = {
* @param string $var
* @return $this
*/
public function setName(string $var)
{
GPBUtil::checkString($var, true);
$this->name = $var;
return $this;
}
/**
* Provider type.
*
* Generated from protobuf field .openstatus.notification.v1.NotificationProvider provider = 2 [json_name = "provider", (.buf.validate.field) = {
* @return int one of the values in {@see \Openstatus\Notification\V1\NotificationProvider}
*/
public function getProvider()
{
return $this->provider;
}
/**
* Provider type.
*
* Generated from protobuf field .openstatus.notification.v1.NotificationProvider provider = 2 [json_name = "provider", (.buf.validate.field) = {
* @param int $var one of the values in {@see \Openstatus\Notification\V1\NotificationProvider}
* @return $this
*/
public function setProvider(int $var)
{
GPBUtil::checkEnum($var, \Openstatus\Notification\V1\NotificationProvider::class);
$this->provider = $var;
return $this;
}
/**
* Provider-specific configuration.
*
* Generated from protobuf field .openstatus.notification.v1.NotificationData data = 3 [json_name = "data", (.buf.validate.field) = {
* @return \Openstatus\Notification\V1\NotificationData|null
*/
public function getData()
{
return $this->data;
}
public function hasData()
{
return isset($this->data);
}
public function clearData()
{
unset($this->data);
}
/**
* Provider-specific configuration.
*
* Generated from protobuf field .openstatus.notification.v1.NotificationData data = 3 [json_name = "data", (.buf.validate.field) = {
* @param \Openstatus\Notification\V1\NotificationData $var
* @return $this
*/
public function setData(\Openstatus\Notification\V1\NotificationData|null $var)
{
$this->data = $var;
return $this;
}
/**
* IDs of monitors to associate with this notification.
*
* Generated from protobuf field repeated string monitor_ids = 4 [json_name = "monitorIds"];
* @return RepeatedField
*/
public function getMonitorIds()
{
return $this->monitor_ids;
}
/**
* IDs of monitors to associate with this notification.
*
* Generated from protobuf field repeated string monitor_ids = 4 [json_name = "monitorIds"];
* @param string[] $var
* @return $this
*/
public function setMonitorIds(array|RepeatedField $var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->monitor_ids = $arr;
return $this;
}
}