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

namespace Google\Cloud\Datastore\V1;

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

/**
 * The response for
 * [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
 *
 * Generated from protobuf message <code>google.datastore.v1.AllocateIdsResponse</code>
 */
class AllocateIdsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The keys specified in the request (in the same order), each with
     * its key path completed with a newly allocated ID.
     *
     * Generated from protobuf field <code>repeated .google.datastore.v1.Key keys = 1;</code>
     */
    private $keys;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Datastore\V1\Key>|\Google\Protobuf\Internal\RepeatedField $keys
     *           The keys specified in the request (in the same order), each with
     *           its key path completed with a newly allocated ID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Datastore\V1\Datastore::initOnce();
        parent::__construct($data);
    }

    /**
     * The keys specified in the request (in the same order), each with
     * its key path completed with a newly allocated ID.
     *
     * Generated from protobuf field <code>repeated .google.datastore.v1.Key keys = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getKeys()
    {
        return $this->keys;
    }

    /**
     * The keys specified in the request (in the same order), each with
     * its key path completed with a newly allocated ID.
     *
     * Generated from protobuf field <code>repeated .google.datastore.v1.Key keys = 1;</code>
     * @param array<\Google\Cloud\Datastore\V1\Key>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setKeys($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastore\V1\Key::class);
        $this->keys = $arr;

        return $this;
    }

}

