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

namespace Keyapis\AccessControl\V1;

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

/**
 * Задача на добавление кодов на устройства.
 * Очередь key.access_control.load_codes_to_devices
 *
 * Generated from protobuf message <code>keyapis.access_control.v1.LoadCodesToDevicesTask</code>
 */
class LoadCodesToDevicesTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Список кодов
     *
     * Generated from protobuf field <code>repeated .keyapis.access_control.v1.LoadCodesToDevicesTask.Code codes = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $codes;
    /**
     * Список идентификаторов устройств
     *
     * Generated from protobuf field <code>repeated int32 device_ids = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $device_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type array<\Keyapis\AccessControl\V1\LoadCodesToDevicesTask\Code>|\Google\Protobuf\Internal\RepeatedField $codes
     *           Список кодов
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $device_ids
     *           Список идентификаторов устройств
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlEvents1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

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

        return $this;
    }

    /**
     * Список кодов
     *
     * Generated from protobuf field <code>repeated .keyapis.access_control.v1.LoadCodesToDevicesTask.Code codes = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCodes()
    {
        return $this->codes;
    }

    /**
     * Список кодов
     *
     * Generated from protobuf field <code>repeated .keyapis.access_control.v1.LoadCodesToDevicesTask.Code codes = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\AccessControl\V1\LoadCodesToDevicesTask\Code>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\AccessControl\V1\LoadCodesToDevicesTask\Code::class);
        $this->codes = $arr;

        return $this;
    }

    /**
     * Список идентификаторов устройств
     *
     * Generated from protobuf field <code>repeated int32 device_ids = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceIds()
    {
        return $this->device_ids;
    }

    /**
     * Список идентификаторов устройств
     *
     * Generated from protobuf field <code>repeated int32 device_ids = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->device_ids = $arr;

        return $this;
    }

}

