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

namespace Keyapis\Device\V1\Preset;

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

/**
 * Помещение
 *
 * Generated from protobuf message <code>keyapis.device.v1.Preset.Room</code>
 */
class Room extends \Google\Protobuf\Internal\Message
{
    /**
     * Номер телефона.
     * # Диапазон: 5..14
     *
     * Generated from protobuf field <code>string phone = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $phone = '';
    /**
     * Номер помещения.
     * # Диапазон: 1..10000
     *
     * Generated from protobuf field <code>int32 num = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $num = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $phone
     *           Номер телефона.
     *           # Диапазон: 5..14
     *     @type int $num
     *           Номер помещения.
     *           # Диапазон: 1..10000
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Номер телефона.
     * # Диапазон: 5..14
     *
     * Generated from protobuf field <code>string phone = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * Номер телефона.
     * # Диапазон: 5..14
     *
     * Generated from protobuf field <code>string phone = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPhone($var)
    {
        GPBUtil::checkString($var, True);
        $this->phone = $var;

        return $this;
    }

    /**
     * Номер помещения.
     * # Диапазон: 1..10000
     *
     * Generated from protobuf field <code>int32 num = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getNum()
    {
        return $this->num;
    }

    /**
     * Номер помещения.
     * # Диапазон: 1..10000
     *
     * Generated from protobuf field <code>int32 num = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->num = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Room::class, \Keyapis\Device\V1\Preset_Room::class);

