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

namespace Keyapis\AccessControl\V1;

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

/**
 * Точка доступа.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.access_control.v1.AccessPoint</code>
 */
class AccessPoint extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор точки доступа.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Наименование.
     * # Диапазон: 3..40
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Описание.
     * # Диапазон: 3..200
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     */
    protected $description = null;
    /**
     * Идентификатор устройства.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 device_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Номер реле.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value relay_index = 5;</code>
     */
    protected $relay_index = null;
    /**
     * Время задержки в секундах.
     * # Диапазон: 1..3600
     *
     * Generated from protobuf field <code>int32 delay = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $delay = 0;
    /**
     * Идентификатор квартирограммы.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 flatgramm_id = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $flatgramm_id = 0;
    /**
     * Тип направления
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.AccessPoint.DirectionType direction_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $direction_type = 0;
    /**
     * Список камер
     *
     * Generated from protobuf field <code>repeated .keyapis.access_control.v1.AccessPoint.Camera cameras = 9;</code>
     */
    private $cameras;
    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;
    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор точки доступа.
     *           # Тип: Guid
     *     @type string $title
     *           Наименование.
     *           # Диапазон: 3..40
     *     @type \Google\Protobuf\StringValue $description
     *           Описание.
     *           # Диапазон: 3..200
     *     @type int $device_id
     *           Идентификатор устройства.
     *           # Диапазон: 1..2147483647
     *     @type \Google\Protobuf\Int32Value $relay_index
     *           Номер реле.
     *           # Диапазон: 0..100
     *     @type int $delay
     *           Время задержки в секундах.
     *           # Диапазон: 1..3600
     *     @type int $flatgramm_id
     *           Идентификатор квартирограммы.
     *           # Диапазон: 1..2147483647
     *     @type int $direction_type
     *           Тип направления
     *     @type array<\Keyapis\AccessControl\V1\AccessPoint\Camera>|\Google\Protobuf\Internal\RepeatedField $cameras
     *           Список камер
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления.
     *           # Тип: DateTime?
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlAccessPointV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор точки доступа.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор точки доступа.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

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

    /**
     * Наименование.
     * # Диапазон: 3..40
     *
     * 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;
    }

    /**
     * Описание.
     * # Диапазон: 3..200
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</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..200
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     * @return string|null
     */
    public function getDescriptionUnwrapped()
    {
        return $this->readWrapperValue("description");
    }

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

    /**
     * Идентификатор устройства.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 device_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }

    /**
     * Идентификатор устройства.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 device_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDeviceId($var)
    {
        GPBUtil::checkInt32($var);
        $this->device_id = $var;

        return $this;
    }

    /**
     * Номер реле.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value relay_index = 5;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getRelayIndex()
    {
        return $this->relay_index;
    }

    public function hasRelayIndex()
    {
        return isset($this->relay_index);
    }

    public function clearRelayIndex()
    {
        unset($this->relay_index);
    }

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

     * Номер реле.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value relay_index = 5;</code>
     * @return int|null
     */
    public function getRelayIndexUnwrapped()
    {
        return $this->readWrapperValue("relay_index");
    }

    /**
     * Номер реле.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value relay_index = 5;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setRelayIndex($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->relay_index = $var;

        return $this;
    }

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

     * Номер реле.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value relay_index = 5;</code>
     * @param int|null $var
     * @return $this
     */
    public function setRelayIndexUnwrapped($var)
    {
        $this->writeWrapperValue("relay_index", $var);
        return $this;}

    /**
     * Время задержки в секундах.
     * # Диапазон: 1..3600
     *
     * Generated from protobuf field <code>int32 delay = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDelay()
    {
        return $this->delay;
    }

    /**
     * Время задержки в секундах.
     * # Диапазон: 1..3600
     *
     * Generated from protobuf field <code>int32 delay = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDelay($var)
    {
        GPBUtil::checkInt32($var);
        $this->delay = $var;

        return $this;
    }

    /**
     * Идентификатор квартирограммы.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 flatgramm_id = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getFlatgrammId()
    {
        return $this->flatgramm_id;
    }

    /**
     * Идентификатор квартирограммы.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 flatgramm_id = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setFlatgrammId($var)
    {
        GPBUtil::checkInt32($var);
        $this->flatgramm_id = $var;

        return $this;
    }

    /**
     * Тип направления
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.AccessPoint.DirectionType direction_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDirectionType()
    {
        return $this->direction_type;
    }

    /**
     * Тип направления
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.AccessPoint.DirectionType direction_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDirectionType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\AccessControl\V1\AccessPoint\DirectionType::class);
        $this->direction_type = $var;

        return $this;
    }

    /**
     * Список камер
     *
     * Generated from protobuf field <code>repeated .keyapis.access_control.v1.AccessPoint.Camera cameras = 9;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCameras()
    {
        return $this->cameras;
    }

    /**
     * Список камер
     *
     * Generated from protobuf field <code>repeated .keyapis.access_control.v1.AccessPoint.Camera cameras = 9;</code>
     * @param array<\Keyapis\AccessControl\V1\AccessPoint\Camera>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCameras($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\AccessControl\V1\AccessPoint\Camera::class);
        $this->cameras = $arr;

        return $this;
    }

    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 10 [(.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 = 10 [(.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 = 11 [(.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 = 11 [(.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;
    }

    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDeletedAt()
    {
        return $this->deleted_at;
    }

    public function hasDeletedAt()
    {
        return isset($this->deleted_at);
    }

    public function clearDeletedAt()
    {
        unset($this->deleted_at);
    }

    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDeletedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->deleted_at = $var;

        return $this;
    }

}

