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

namespace Deviceapis\Device\V1;

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

/**
 * Дом Gate режима
 *
 * Generated from protobuf message <code>deviceapis.device.v1.House</code>
 */
class House extends \Google\Protobuf\Internal\Message
{
    /**
     * Адрес дома
     *
     * Generated from protobuf field <code>string address = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $address = '';
    /**
     * Номер дома (подъезда)
     *
     * Generated from protobuf field <code>string prefix = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $prefix = '';
    /**
     * Диапазон квартир.
     * Если не задан, то устройство позволяет набор любой квартиры
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.House.RoomRange room_range = 3;</code>
     */
    protected $room_range = null;
    /**
     * Адрес Sip сервера.
     * При пустом sip_server будет использован сервер SIP регистрации
     *
     * Generated from protobuf field <code>string sip_server = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    protected $sip_server = '';
    /**
     * Вариант подстановки номера дома и квартиры в SIP Invite.
     * При отсутствии значения используется вариант H4LZ_F4LZ
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.House.InviteTemplateType invite_template_type = 5 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    protected $invite_template_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $address
     *           Адрес дома
     *     @type string $prefix
     *           Номер дома (подъезда)
     *     @type \Deviceapis\Device\V1\House\RoomRange $room_range
     *           Диапазон квартир.
     *           Если не задан, то устройство позволяет набор любой квартиры
     *     @type string $sip_server
     *           Адрес Sip сервера.
     *           При пустом sip_server будет использован сервер SIP регистрации
     *     @type int $invite_template_type
     *           Вариант подстановки номера дома и квартиры в SIP Invite.
     *           При отсутствии значения используется вариант H4LZ_F4LZ
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Deviceapis\Device\V1\DeviceapisDeviceGateV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Адрес дома
     *
     * Generated from protobuf field <code>string address = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Адрес дома
     *
     * Generated from protobuf field <code>string address = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->address = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Диапазон квартир.
     * Если не задан, то устройство позволяет набор любой квартиры
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.House.RoomRange room_range = 3;</code>
     * @return \Deviceapis\Device\V1\House\RoomRange|null
     */
    public function getRoomRange()
    {
        return $this->room_range;
    }

    public function hasRoomRange()
    {
        return isset($this->room_range);
    }

    public function clearRoomRange()
    {
        unset($this->room_range);
    }

    /**
     * Диапазон квартир.
     * Если не задан, то устройство позволяет набор любой квартиры
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.House.RoomRange room_range = 3;</code>
     * @param \Deviceapis\Device\V1\House\RoomRange $var
     * @return $this
     */
    public function setRoomRange($var)
    {
        GPBUtil::checkMessage($var, \Deviceapis\Device\V1\House\RoomRange::class);
        $this->room_range = $var;

        return $this;
    }

    /**
     * Адрес Sip сервера.
     * При пустом sip_server будет использован сервер SIP регистрации
     *
     * Generated from protobuf field <code>string sip_server = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return string
     */
    public function getSipServer()
    {
        return $this->sip_server;
    }

    /**
     * Адрес Sip сервера.
     * При пустом sip_server будет использован сервер SIP регистрации
     *
     * Generated from protobuf field <code>string sip_server = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param string $var
     * @return $this
     */
    public function setSipServer($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_server = $var;

        return $this;
    }

    /**
     * Вариант подстановки номера дома и квартиры в SIP Invite.
     * При отсутствии значения используется вариант H4LZ_F4LZ
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.House.InviteTemplateType invite_template_type = 5 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return int
     */
    public function getInviteTemplateType()
    {
        return $this->invite_template_type;
    }

    /**
     * Вариант подстановки номера дома и квартиры в SIP Invite.
     * При отсутствии значения используется вариант H4LZ_F4LZ
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.House.InviteTemplateType invite_template_type = 5 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param int $var
     * @return $this
     */
    public function setInviteTemplateType($var)
    {
        GPBUtil::checkEnum($var, \Deviceapis\Device\V1\House\InviteTemplateType::class);
        $this->invite_template_type = $var;

        return $this;
    }

}

