<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.RecordStructure</code>
 */
class RecordStructure extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.SessionStructure currentSession = 1;</code>
     */
    protected $currentSession = null;
    /**
     * Generated from protobuf field <code>repeated .proto.SessionStructure previousSessions = 2;</code>
     */
    private $previousSessions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\SessionStructure $currentSession
     *     @type \PhpWA\Protocol\Proto\SessionStructure[] $previousSessions
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SessionStructure currentSession = 1;</code>
     * @return \PhpWA\Protocol\Proto\SessionStructure|null
     */
    public function getCurrentSession()
    {
        return $this->currentSession;
    }

    public function hasCurrentSession()
    {
        return isset($this->currentSession);
    }

    public function clearCurrentSession()
    {
        unset($this->currentSession);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SessionStructure currentSession = 1;</code>
     * @param \PhpWA\Protocol\Proto\SessionStructure $var
     * @return $this
     */
    public function setCurrentSession($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SessionStructure::class);
        $this->currentSession = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SessionStructure previousSessions = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\SessionStructure>
     */
    public function getPreviousSessions()
    {
        return $this->previousSessions;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SessionStructure previousSessions = 2;</code>
     * @param \PhpWA\Protocol\Proto\SessionStructure[] $var
     * @return $this
     */
    public function setPreviousSessions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\SessionStructure::class);
        $this->previousSessions = $arr;

        return $this;
    }

}

