summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Command/Object/SendCustomNotificationCommand.php
blob: de90620f7d96b76cc1262a44c3e39203af9833c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */

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;
    }
}