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

namespace Keyapis\Device\V1;

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

/**
 * Пресет.
 * Пресет с id=1 устанавливается при создании устройства по умолчанию
 *
 * Generated from protobuf message <code>keyapis.device.v1.Preset</code>
 */
class Preset extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Наименование.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Идентификатор МРФ.
     * # Диапазон: 0..10
     *
     * Generated from protobuf field <code>repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $mrf_ids;
    /**
     * Идентификатор РФ.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $rf_ids;
    /**
     * Описание.
     * # Диапазон: 3..1024
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = null;
    /**
     * Дата и время создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;
    /**
     * Статус
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.StatusType status_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $status_type = 0;
    /**
     * Параметр SIP
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $sip = null;
    /**
     * Параметр NTP
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $ntp = null;
    /**
     * Параметр Syslog
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $syslog = null;
    /**
     * Помещения.
     * # Диапазон: 0..10000
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $rooms;
    /**
     * Параметры конфигурации видео
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $video_config = null;
    /**
     * Параметр DTMF.
     * # Диапазон: 0..64
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $dtmf;
    /**
     * Распознование лиц
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.FaceRecognition face_recognition = 15;</code>
     */
    protected $face_recognition = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор.
     *           # Диапазон: 1..2147483647
     *     @type string $title
     *           Наименование.
     *           # Диапазон: 3..256
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $mrf_ids
     *           Идентификатор МРФ.
     *           # Диапазон: 0..10
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $rf_ids
     *           Идентификатор РФ.
     *           # Диапазон: 0..100
     *     @type \Google\Protobuf\StringValue $description
     *           Описание.
     *           # Диапазон: 3..1024
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата и время создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     *     @type int $status_type
     *           Статус
     *     @type \Keyapis\Device\V1\Preset\Sip $sip
     *           Параметр SIP
     *     @type \Keyapis\Device\V1\Preset\Ntp $ntp
     *           Параметр NTP
     *     @type \Keyapis\Device\V1\Preset\Syslog $syslog
     *           Параметр Syslog
     *     @type array<\Keyapis\Device\V1\Preset\Room>|\Google\Protobuf\Internal\RepeatedField $rooms
     *           Помещения.
     *           # Диапазон: 0..10000
     *     @type \Keyapis\Device\V1\Preset\VideoConfig $video_config
     *           Параметры конфигурации видео
     *     @type array<\Keyapis\Device\V1\Preset\Dtmf>|\Google\Protobuf\Internal\RepeatedField $dtmf
     *           Параметр DTMF.
     *           # Диапазон: 0..64
     *     @type \Keyapis\Device\V1\Preset\FaceRecognition $face_recognition
     *           Распознование лиц
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Наименование.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

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

        return $this;
    }

    /**
     * Идентификатор МРФ.
     * # Диапазон: 0..10
     *
     * Generated from protobuf field <code>repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMrfIds()
    {
        return $this->mrf_ids;
    }

    /**
     * Идентификатор МРФ.
     * # Диапазон: 0..10
     *
     * Generated from protobuf field <code>repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMrfIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->mrf_ids = $arr;

        return $this;
    }

    /**
     * Идентификатор РФ.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRfIds()
    {
        return $this->rf_ids;
    }

    /**
     * Идентификатор РФ.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRfIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->rf_ids = $arr;

        return $this;
    }

    /**
     * Описание.
     * # Диапазон: 3..1024
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getDescription()
    {
        return $this->description;
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

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

     * Описание.
     * # Диапазон: 3..1024
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string|null
     */
    public function getDescriptionUnwrapped()
    {
        return $this->readWrapperValue("description");
    }

    /**
     * Описание.
     * # Диапазон: 3..1024
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->description = $var;

        return $this;
    }

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

     * Описание.
     * # Диапазон: 3..1024
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string|null $var
     * @return $this
     */
    public function setDescriptionUnwrapped($var)
    {
        $this->writeWrapperValue("description", $var);
        return $this;}

    /**
     * Дата и время создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 6 [(.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 = 6 [(.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 changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getChangedAt()
    {
        return $this->changed_at;
    }

    public function hasChangedAt()
    {
        return isset($this->changed_at);
    }

    public function clearChangedAt()
    {
        unset($this->changed_at);
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Параметр SIP
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Device\V1\Preset\Sip|null
     */
    public function getSip()
    {
        return $this->sip;
    }

    public function hasSip()
    {
        return isset($this->sip);
    }

    public function clearSip()
    {
        unset($this->sip);
    }

    /**
     * Параметр SIP
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Device\V1\Preset\Sip $var
     * @return $this
     */
    public function setSip($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset\Sip::class);
        $this->sip = $var;

        return $this;
    }

    /**
     * Параметр NTP
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Device\V1\Preset\Ntp|null
     */
    public function getNtp()
    {
        return $this->ntp;
    }

    public function hasNtp()
    {
        return isset($this->ntp);
    }

    public function clearNtp()
    {
        unset($this->ntp);
    }

    /**
     * Параметр NTP
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Device\V1\Preset\Ntp $var
     * @return $this
     */
    public function setNtp($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset\Ntp::class);
        $this->ntp = $var;

        return $this;
    }

    /**
     * Параметр Syslog
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Device\V1\Preset\Syslog|null
     */
    public function getSyslog()
    {
        return $this->syslog;
    }

    public function hasSyslog()
    {
        return isset($this->syslog);
    }

    public function clearSyslog()
    {
        unset($this->syslog);
    }

    /**
     * Параметр Syslog
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Device\V1\Preset\Syslog $var
     * @return $this
     */
    public function setSyslog($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset\Syslog::class);
        $this->syslog = $var;

        return $this;
    }

    /**
     * Помещения.
     * # Диапазон: 0..10000
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRooms()
    {
        return $this->rooms;
    }

    /**
     * Помещения.
     * # Диапазон: 0..10000
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Device\V1\Preset\Room>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRooms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\Preset\Room::class);
        $this->rooms = $arr;

        return $this;
    }

    /**
     * Параметры конфигурации видео
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Device\V1\Preset\VideoConfig|null
     */
    public function getVideoConfig()
    {
        return $this->video_config;
    }

    public function hasVideoConfig()
    {
        return isset($this->video_config);
    }

    public function clearVideoConfig()
    {
        unset($this->video_config);
    }

    /**
     * Параметры конфигурации видео
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Device\V1\Preset\VideoConfig $var
     * @return $this
     */
    public function setVideoConfig($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset\VideoConfig::class);
        $this->video_config = $var;

        return $this;
    }

    /**
     * Параметр DTMF.
     * # Диапазон: 0..64
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDtmf()
    {
        return $this->dtmf;
    }

    /**
     * Параметр DTMF.
     * # Диапазон: 0..64
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Device\V1\Preset\Dtmf>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDtmf($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\Preset\Dtmf::class);
        $this->dtmf = $arr;

        return $this;
    }

    /**
     * Распознование лиц
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.FaceRecognition face_recognition = 15;</code>
     * @return \Keyapis\Device\V1\Preset\FaceRecognition|null
     */
    public function getFaceRecognition()
    {
        return $this->face_recognition;
    }

    public function hasFaceRecognition()
    {
        return isset($this->face_recognition);
    }

    public function clearFaceRecognition()
    {
        unset($this->face_recognition);
    }

    /**
     * Распознование лиц
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.FaceRecognition face_recognition = 15;</code>
     * @param \Keyapis\Device\V1\Preset\FaceRecognition $var
     * @return $this
     */
    public function setFaceRecognition($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset\FaceRecognition::class);
        $this->face_recognition = $var;

        return $this;
    }

}

