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

namespace Keyapis\Device\V1;

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

/**
 * Задача ответ на успешную блокировку аналоговой трубки на устройстве для квартиры.
 * Очередь key.device.cms_phone_block_success
 *
 * Generated from protobuf message <code>keyapis.device.v1.BlockCmsPhoneSuccessTask</code>
 */
class BlockCmsPhoneSuccessTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Идентификатор аналоговой трубки
     *
     * Generated from protobuf field <code>int32 cms_phone_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $cms_phone_id = 0;
    /**
     * Дата и время блокировки аналоговой трубки
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp blocked_at = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $blocked_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type int $cms_phone_id
     *           Идентификатор аналоговой трубки
     *     @type \Google\Protobuf\Timestamp $blocked_at
     *           Дата и время блокировки аналоговой трубки
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Идентификатор аналоговой трубки
     *
     * Generated from protobuf field <code>int32 cms_phone_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getCmsPhoneId()
    {
        return $this->cms_phone_id;
    }

    /**
     * Идентификатор аналоговой трубки
     *
     * Generated from protobuf field <code>int32 cms_phone_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setCmsPhoneId($var)
    {
        GPBUtil::checkInt32($var);
        $this->cms_phone_id = $var;

        return $this;
    }

    /**
     * Дата и время блокировки аналоговой трубки
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp blocked_at = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getBlockedAt()
    {
        return $this->blocked_at;
    }

    public function hasBlockedAt()
    {
        return isset($this->blocked_at);
    }

    public function clearBlockedAt()
    {
        unset($this->blocked_at);
    }

    /**
     * Дата и время блокировки аналоговой трубки
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp blocked_at = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setBlockedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->blocked_at = $var;

        return $this;
    }

}

