<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * 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 \Google\Cloud\Datastore\V1\Key[] $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 RepeatedField<\Google\Cloud\Datastore\V1\Key>
     */
    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 \Google\Cloud\Datastore\V1\Key[] $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;
    }

}

