<?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.BotSessionMetadata</code>
 */
class BotSessionMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string sessionId = 1;</code>
     */
    protected $sessionId = null;
    /**
     * Generated from protobuf field <code>optional .proto.BotSessionSource sessionSource = 2;</code>
     */
    protected $sessionSource = null;

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

    /**
     * Generated from protobuf field <code>optional string sessionId = 1;</code>
     * @return string
     */
    public function getSessionId()
    {
        return isset($this->sessionId) ? $this->sessionId : '';
    }

    public function hasSessionId()
    {
        return isset($this->sessionId);
    }

    public function clearSessionId()
    {
        unset($this->sessionId);
    }

    /**
     * Generated from protobuf field <code>optional string sessionId = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSessionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sessionId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.BotSessionSource sessionSource = 2;</code>
     * @return int
     */
    public function getSessionSource()
    {
        return isset($this->sessionSource) ? $this->sessionSource : 0;
    }

    public function hasSessionSource()
    {
        return isset($this->sessionSource);
    }

    public function clearSessionSource()
    {
        unset($this->sessionSource);
    }

    /**
     * Generated from protobuf field <code>optional .proto.BotSessionSource sessionSource = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSessionSource($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\BotSessionSource::class);
        $this->sessionSource = $var;

        return $this;
    }

}

