<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/bell/v1/keyapis_bell_notification_v1.proto

namespace Keyapis\Bell\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Уведомление.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.bell.v1.Notification</code>
 */
class Notification extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * Создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $id = '';
    /**
     * ОРПОН.
     * # Диапазон 1..9223372036854775807
     *
     * Generated from protobuf field <code>int64 orpon = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $orpon = 0;
    /**
     * Наименование приложения-отправителя.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_title = 3;</code>
     */
    protected $app_title = null;
    /**
     * Номер квартиры.
     * # Диапазон: 1..4
     *
     * Generated from protobuf field <code>string room_number = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $room_number = '';
    /**
     * Заголовок.
     * # Диапазон: 3..128
     *
     * Generated from protobuf field <code>string header = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $header = '';
    /**
     * Тело.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string text = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $text = '';
    /**
     * Статус
     *
     * Generated from protobuf field <code>.keyapis.bell.v1.Notification.StatusType status_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status_type = 0;
    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения статуса.
     * Заполняется и обновляется сервером.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp status_changed_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status_changed_at = null;
    /**
     * Полезная нагрузка
     *
     * Generated from protobuf field <code>map<string, string> payload = 10;</code>
     */
    private $payload;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор.
     *           Создаётся сервером.
     *           # Тип: Guid
     *     @type int|string $orpon
     *           ОРПОН.
     *           # Диапазон 1..9223372036854775807
     *     @type \Google\Protobuf\StringValue $app_title
     *           Наименование приложения-отправителя.
     *           # Диапазон: 3..256
     *     @type string $room_number
     *           Номер квартиры.
     *           # Диапазон: 1..4
     *     @type string $header
     *           Заголовок.
     *           # Диапазон: 3..128
     *     @type string $text
     *           Тело.
     *           # Диапазон: 3..256
     *     @type int $status_type
     *           Статус
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $status_changed_at
     *           Дата последнего изменения статуса.
     *           Заполняется и обновляется сервером.
     *           # Тип: DateTime
     *     @type array|\Google\Protobuf\Internal\MapField $payload
     *           Полезная нагрузка
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Bell\V1\KeyapisBellNotificationV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор.
     * Создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор.
     * Создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * ОРПОН.
     * # Диапазон 1..9223372036854775807
     *
     * Generated from protobuf field <code>int64 orpon = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int|string
     */
    public function getOrpon()
    {
        return $this->orpon;
    }

    /**
     * ОРПОН.
     * # Диапазон 1..9223372036854775807
     *
     * Generated from protobuf field <code>int64 orpon = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int|string $var
     * @return $this
     */
    public function setOrpon($var)
    {
        GPBUtil::checkInt64($var);
        $this->orpon = $var;

        return $this;
    }

    /**
     * Наименование приложения-отправителя.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_title = 3;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getAppTitle()
    {
        return $this->app_title;
    }

    public function hasAppTitle()
    {
        return isset($this->app_title);
    }

    public function clearAppTitle()
    {
        unset($this->app_title);
    }

    /**
     * Returns the unboxed value from <code>getAppTitle()</code>

     * Наименование приложения-отправителя.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_title = 3;</code>
     * @return string|null
     */
    public function getAppTitleUnwrapped()
    {
        return $this->readWrapperValue("app_title");
    }

    /**
     * Наименование приложения-отправителя.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_title = 3;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setAppTitle($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->app_title = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Наименование приложения-отправителя.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_title = 3;</code>
     * @param string|null $var
     * @return $this
     */
    public function setAppTitleUnwrapped($var)
    {
        $this->writeWrapperValue("app_title", $var);
        return $this;}

    /**
     * Номер квартиры.
     * # Диапазон: 1..4
     *
     * Generated from protobuf field <code>string room_number = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRoomNumber()
    {
        return $this->room_number;
    }

    /**
     * Номер квартиры.
     * # Диапазон: 1..4
     *
     * Generated from protobuf field <code>string room_number = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRoomNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_number = $var;

        return $this;
    }

    /**
     * Заголовок.
     * # Диапазон: 3..128
     *
     * Generated from protobuf field <code>string header = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getHeader()
    {
        return $this->header;
    }

    /**
     * Заголовок.
     * # Диапазон: 3..128
     *
     * Generated from protobuf field <code>string header = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setHeader($var)
    {
        GPBUtil::checkString($var, True);
        $this->header = $var;

        return $this;
    }

    /**
     * Тело.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string text = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Тело.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string text = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

    /**
     * Статус
     *
     * Generated from protobuf field <code>.keyapis.bell.v1.Notification.StatusType status_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Статус
     *
     * Generated from protobuf field <code>.keyapis.bell.v1.Notification.StatusType status_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Bell\V1\Notification\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function hasCreatedAt()
    {
        return isset($this->created_at);
    }

    public function clearCreatedAt()
    {
        unset($this->created_at);
    }

    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Дата последнего изменения статуса.
     * Заполняется и обновляется сервером.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp status_changed_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getStatusChangedAt()
    {
        return $this->status_changed_at;
    }

    public function hasStatusChangedAt()
    {
        return isset($this->status_changed_at);
    }

    public function clearStatusChangedAt()
    {
        unset($this->status_changed_at);
    }

    /**
     * Дата последнего изменения статуса.
     * Заполняется и обновляется сервером.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp status_changed_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setStatusChangedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->status_changed_at = $var;

        return $this;
    }

    /**
     * Полезная нагрузка
     *
     * Generated from protobuf field <code>map<string, string> payload = 10;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getPayload()
    {
        return $this->payload;
    }

    /**
     * Полезная нагрузка
     *
     * Generated from protobuf field <code>map<string, string> payload = 10;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setPayload($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->payload = $arr;

        return $this;
    }

}

