<?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;

/**
 * 服务内部通信消息包 list {server_id}-pack
 *
 * Generated from protobuf message <code>Framework.Protobuf.InternalPacket</code>
 */
class InternalPacket extends \Google\Protobuf\Internal\Message
{
    /**
     * 消息id
     *
     * Generated from protobuf field <code>int32 packet_id = 1;</code>
     */
    protected $packet_id = 0;
    /**
     * 发送时间
     *
     * Generated from protobuf field <code>int32 send_time = 2;</code>
     */
    protected $send_time = 0;
    /**
     * 玩家id
     *
     * Generated from protobuf field <code>uint64 player_id = 3;</code>
     */
    protected $player_id = 0;
    /**
     * 发送给服务id
     *
     * Generated from protobuf field <code>string send_server = 4;</code>
     */
    protected $send_server = '';
    /**
     * 消息包内容
     *
     * Generated from protobuf field <code>string packet_data = 5;</code>
     */
    protected $packet_data = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $packet_id
     *           消息id
     *     @type int $send_time
     *           发送时间
     *     @type int|string $player_id
     *           玩家id
     *     @type string $send_server
     *           发送给服务id
     *     @type string $packet_data
     *           消息包内容
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\SystemPacket::initOnce();
        parent::__construct($data);
    }

    /**
     * 消息id
     *
     * Generated from protobuf field <code>int32 packet_id = 1;</code>
     * @return int
     */
    public function getPacketId()
    {
        return $this->packet_id;
    }

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

        return $this;
    }

    /**
     * 发送时间
     *
     * Generated from protobuf field <code>int32 send_time = 2;</code>
     * @return int
     */
    public function getSendTime()
    {
        return $this->send_time;
    }

    /**
     * 发送时间
     *
     * Generated from protobuf field <code>int32 send_time = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSendTime($var)
    {
        GPBUtil::checkInt32($var);
        $this->send_time = $var;

        return $this;
    }

    /**
     * 玩家id
     *
     * Generated from protobuf field <code>uint64 player_id = 3;</code>
     * @return int|string
     */
    public function getPlayerId()
    {
        return $this->player_id;
    }

    /**
     * 玩家id
     *
     * Generated from protobuf field <code>uint64 player_id = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPlayerId($var)
    {
        GPBUtil::checkUint64($var);
        $this->player_id = $var;

        return $this;
    }

    /**
     * 发送给服务id
     *
     * Generated from protobuf field <code>string send_server = 4;</code>
     * @return string
     */
    public function getSendServer()
    {
        return $this->send_server;
    }

    /**
     * 发送给服务id
     *
     * Generated from protobuf field <code>string send_server = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setSendServer($var)
    {
        GPBUtil::checkString($var, True);
        $this->send_server = $var;

        return $this;
    }

    /**
     * 消息包内容
     *
     * Generated from protobuf field <code>string packet_data = 5;</code>
     * @return string
     */
    public function getPacketData()
    {
        return $this->packet_data;
    }

    /**
     * 消息包内容
     *
     * Generated from protobuf field <code>string packet_data = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setPacketData($var)
    {
        GPBUtil::checkString($var, True);
        $this->packet_data = $var;

        return $this;
    }

}

