<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/access_control/v1/keyapis_access_control_access_zone_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.AccessZone</code>
 */
class AccessZone extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор зоны доступа.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Наименование.
     * # Диапазон: 3..64
     *
     * 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 flatgramm_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $flatgramm_id = 0;
    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 6;</code>
     */
    protected $changed_at = null;
    /**
     * Дата удаления.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;
    /**
     * Идентификаторы точек доступа, входящих в зону.
     * Все точки доступа должны принадлежать той же квартирограмме, что и зона.
     * # Тип: Guid.
     * # Диапазон: 0..1000
     *
     * Generated from protobuf field <code>repeated string access_point_ids = 8;</code>
     */
    private $access_point_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор зоны доступа.
     *           # Тип: Guid
     *     @type string $title
     *           Наименование.
     *           # Диапазон: 3..64
     *     @type \Google\Protobuf\StringValue $description
     *           Описание.
     *           # Диапазон: 3..200
     *     @type int $flatgramm_id
     *           Идентификатор квартирограммы.
     *           # Диапазон: 1..2147483647
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления.
     *           # Тип: DateTime
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $access_point_ids
     *           Идентификаторы точек доступа, входящих в зону.
     *           Все точки доступа должны принадлежать той же квартирограмме, что и зона.
     *           # Тип: Guid.
     *           # Диапазон: 0..1000
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlAccessZoneV1::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..64
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Наименование.
     * # Диапазон: 3..64
     *
     * 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 flatgramm_id = 4 [(.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 = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setFlatgrammId($var)
    {
        GPBUtil::checkInt32($var);
        $this->flatgramm_id = $var;

        return $this;
    }

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

    /**
     * Идентификаторы точек доступа, входящих в зону.
     * Все точки доступа должны принадлежать той же квартирограмме, что и зона.
     * # Тип: Guid.
     * # Диапазон: 0..1000
     *
     * Generated from protobuf field <code>repeated string access_point_ids = 8;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAccessPointIds()
    {
        return $this->access_point_ids;
    }

    /**
     * Идентификаторы точек доступа, входящих в зону.
     * Все точки доступа должны принадлежать той же квартирограмме, что и зона.
     * # Тип: Guid.
     * # Диапазон: 0..1000
     *
     * Generated from protobuf field <code>repeated string access_point_ids = 8;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAccessPointIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->access_point_ids = $arr;

        return $this;
    }

}

