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

namespace Keyapis\TelemetryControl\V1;

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

/**
 * Связка ПУ и группы пользователя.
 * Задает область ресурсов (resource scope), доступную пользователю.
 * Используется для контроля доступа к ПУ
 *
 * Generated from protobuf message <code>keyapis.telemetry_control.v1.DeviceGroup</code>
 */
class DeviceGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор группы.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string group_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $group_id = '';
    /**
     * Идентификатор ПУ.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $group_id
     *           Идентификатор группы.
     *           # Тип: Guid
     *     @type int $device_id
     *           Идентификатор ПУ.
     *           # Диапазон: 0..2147483647
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\TelemetryControl\V1\KeyapisTelemetryControlDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор группы.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string group_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getGroupId()
    {
        return $this->group_id;
    }

    /**
     * Идентификатор группы.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string group_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setGroupId($var)
    {
        GPBUtil::checkString($var, True);
        $this->group_id = $var;

        return $this;
    }

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

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

        return $this;
    }

}

