<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/access_control/v1/keyapis_access_control_access_control_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.Room</code>
 */
class Room extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор квартиры
     *
     * Generated from protobuf field <code>int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $id = 0;
    /**
     * Номер
     *
     * Generated from protobuf field <code>string number = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $number = '';
    /**
     * Подъезд
     *
     * Generated from protobuf field <code>int32 entrance = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $entrance = 0;
    /**
     * Этаж
     *
     * Generated from protobuf field <code>int32 floor = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $floor = 0;
    /**
     * Площадь
     *
     * Generated from protobuf field <code>float area = 5;</code>
     */
    protected $area = 0.0;
    /**
     * Идентификатор дома
     *
     * Generated from protobuf field <code>int32 building_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $building_id = 0;
    /**
     * Идентификатор компании
     *
     * Generated from protobuf field <code>int32 company_id = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $company_id = 0;
    /**
     * Номер абонента
     *
     * Generated from protobuf field <code>string abonent_id = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $abonent_id = '';
    /**
     * Тип
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.Room.Type type = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;
    /**
     * Дата создания.
     * # Тип: 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 deleted_at = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;
    /**
     * Включен ли режим подписок
     *
     * Generated from protobuf field <code>bool is_subscription_mode_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $is_subscription_mode_enabled = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор квартиры
     *     @type string $number
     *           Номер
     *     @type int $entrance
     *           Подъезд
     *     @type int $floor
     *           Этаж
     *     @type float $area
     *           Площадь
     *     @type int $building_id
     *           Идентификатор дома
     *     @type int $company_id
     *           Идентификатор компании
     *     @type string $abonent_id
     *           Номер абонента
     *     @type int $type
     *           Тип
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления.
     *           # Тип: DateTime
     *     @type bool $is_subscription_mode_enabled
     *           Включен ли режим подписок
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlAccessControlV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор квартиры
     *
     * Generated from protobuf field <code>int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

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

        return $this;
    }

    /**
     * Номер
     *
     * Generated from protobuf field <code>string number = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getNumber()
    {
        return $this->number;
    }

    /**
     * Номер
     *
     * Generated from protobuf field <code>string number = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->number = $var;

        return $this;
    }

    /**
     * Подъезд
     *
     * Generated from protobuf field <code>int32 entrance = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getEntrance()
    {
        return $this->entrance;
    }

    /**
     * Подъезд
     *
     * Generated from protobuf field <code>int32 entrance = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setEntrance($var)
    {
        GPBUtil::checkInt32($var);
        $this->entrance = $var;

        return $this;
    }

    /**
     * Этаж
     *
     * Generated from protobuf field <code>int32 floor = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getFloor()
    {
        return $this->floor;
    }

    /**
     * Этаж
     *
     * Generated from protobuf field <code>int32 floor = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setFloor($var)
    {
        GPBUtil::checkInt32($var);
        $this->floor = $var;

        return $this;
    }

    /**
     * Площадь
     *
     * Generated from protobuf field <code>float area = 5;</code>
     * @return float
     */
    public function getArea()
    {
        return $this->area;
    }

    /**
     * Площадь
     *
     * Generated from protobuf field <code>float area = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setArea($var)
    {
        GPBUtil::checkFloat($var);
        $this->area = $var;

        return $this;
    }

    /**
     * Идентификатор дома
     *
     * Generated from protobuf field <code>int32 building_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getBuildingId()
    {
        return $this->building_id;
    }

    /**
     * Идентификатор дома
     *
     * Generated from protobuf field <code>int32 building_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setBuildingId($var)
    {
        GPBUtil::checkInt32($var);
        $this->building_id = $var;

        return $this;
    }

    /**
     * Идентификатор компании
     *
     * Generated from protobuf field <code>int32 company_id = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getCompanyId()
    {
        return $this->company_id;
    }

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

        return $this;
    }

    /**
     * Номер абонента
     *
     * Generated from protobuf field <code>string abonent_id = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAbonentId()
    {
        return $this->abonent_id;
    }

    /**
     * Номер абонента
     *
     * Generated from protobuf field <code>string abonent_id = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAbonentId($var)
    {
        GPBUtil::checkString($var, True);
        $this->abonent_id = $var;

        return $this;
    }

    /**
     * Тип
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.Room.Type type = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.Room.Type type = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\AccessControl\V1\Room\Type::class);
        $this->type = $var;

        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 deleted_at = 11 [(.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 = 11 [(.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;
    }

    /**
     * Включен ли режим подписок
     *
     * Generated from protobuf field <code>bool is_subscription_mode_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getIsSubscriptionModeEnabled()
    {
        return $this->is_subscription_mode_enabled;
    }

    /**
     * Включен ли режим подписок
     *
     * Generated from protobuf field <code>bool is_subscription_mode_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsSubscriptionModeEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->is_subscription_mode_enabled = $var;

        return $this;
    }

}

