<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: SystemPacket.proto

namespace Framework\Protobuf;

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

/**
 * Generated from protobuf message <code>Framework.Protobuf.WebRequestMessage</code>
 */
class WebRequestMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int32 index = 1;</code>
     */
    protected $index = 0;
    /**
     * Generated from protobuf field <code>int32 server_id = 2;</code>
     */
    protected $server_id = 0;
    /**
     * Generated from protobuf field <code>string session = 3;</code>
     */
    protected $session = '';
    /**
     * Generated from protobuf field <code>int64 player_id = 5;</code>
     */
    protected $player_id = 0;
    /**
     * Generated from protobuf field <code>repeated .Framework.Protobuf.SinglePacket packet_list = 4;</code>
     */
    private $packet_list;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $index
     *     @type int $server_id
     *     @type string $session
     *     @type int|string $player_id
     *     @type \Framework\Protobuf\SinglePacket[]|\Google\Protobuf\Internal\RepeatedField $packet_list
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\SystemPacket::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>int32 index = 1;</code>
     * @return int
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * Generated from protobuf field <code>int32 index = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->index = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 server_id = 2;</code>
     * @return int
     */
    public function getServerId()
    {
        return $this->server_id;
    }

    /**
     * Generated from protobuf field <code>int32 server_id = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setServerId($var)
    {
        GPBUtil::checkInt32($var);
        $this->server_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string session = 3;</code>
     * @return string
     */
    public function getSession()
    {
        return $this->session;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 player_id = 5;</code>
     * @return int|string
     */
    public function getPlayerId()
    {
        return $this->player_id;
    }

    /**
     * Generated from protobuf field <code>int64 player_id = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPlayerId($var)
    {
        GPBUtil::checkInt64($var);
        $this->player_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .Framework.Protobuf.SinglePacket packet_list = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPacketList()
    {
        return $this->packet_list;
    }

    /**
     * Generated from protobuf field <code>repeated .Framework.Protobuf.SinglePacket packet_list = 4;</code>
     * @param \Framework\Protobuf\SinglePacket[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPacketList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Framework\Protobuf\SinglePacket::class);
        $this->packet_list = $arr;

        return $this;
    }

}

