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

namespace Google\Cloud\Spanner\V1;

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

/**
 * The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
 *
 * Generated from protobuf message <code>google.spanner.v1.BatchCreateSessionsResponse</code>
 */
class BatchCreateSessionsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The freshly created sessions.
     *
     * Generated from protobuf field <code>repeated .google.spanner.v1.Session session = 1;</code>
     */
    private $session;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Spanner\V1\Session[]|\Google\Protobuf\Internal\RepeatedField $session
     *           The freshly created sessions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Spanner\V1\Spanner::initOnce();
        parent::__construct($data);
    }

    /**
     * The freshly created sessions.
     *
     * Generated from protobuf field <code>repeated .google.spanner.v1.Session session = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSession()
    {
        return $this->session;
    }

    /**
     * The freshly created sessions.
     *
     * Generated from protobuf field <code>repeated .google.spanner.v1.Session session = 1;</code>
     * @param \Google\Cloud\Spanner\V1\Session[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSession($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\V1\Session::class);
        $this->session = $arr;

        return $this;
    }

}

