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

namespace Keyapis\Device\V1;

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

/**
 * Сгруппированный по устройству список конфигураций
 *
 * Generated from protobuf message <code>keyapis.device.v1.DeviceConfigurationStatusGrouped</code>
 */
class DeviceConfigurationStatusGrouped extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Список конфигураций
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.DeviceConfigurationStatus statuses = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $statuses;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $device_id
     *           Идентификатор устройства
     *     @type array<\Keyapis\Device\V1\DeviceConfigurationStatus>|\Google\Protobuf\Internal\RepeatedField $statuses
     *           Список конфигураций
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Список конфигураций
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.DeviceConfigurationStatus statuses = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getStatuses()
    {
        return $this->statuses;
    }

    /**
     * Список конфигураций
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.DeviceConfigurationStatus statuses = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Device\V1\DeviceConfigurationStatus>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setStatuses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\DeviceConfigurationStatus::class);
        $this->statuses = $arr;

        return $this;
    }

}

