icingadb-web/library/Icingadb/Command/Object/SendCustomNotificationCommand.php
Eric Lippmann 272e791390 License source files as GPL-3.0-or-later
Add SPDX license headers and mark source files as GPL-3.0-or-later to
preserve the option to relicense under later GPL versions.
2026-03-11 14:03:05 +01:00

45 lines
941 B
PHP

<?php
// SPDX-FileCopyrightText: 2021 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later
namespace Icinga\Module\Icingadb\Command\Object;
/**
* Send custom notifications for a host or service
*/
class SendCustomNotificationCommand extends WithCommentCommand
{
/**
* Whether the notification is forced
*
* Forced notifications are sent out regardless of time restrictions and whether or not notifications are enabled.
*
* @var bool
*/
protected $forced;
/**
* Get whether to force the notification
*
* @return ?bool
*/
public function getForced()
{
return $this->forced;
}
/**
* Set whether to force the notification
*
* @param bool $forced
*
* @return $this
*/
public function setForced(bool $forced = true): self
{
$this->forced = $forced;
return $this;
}
}