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

namespace Game\Protobuf;

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

/**
 *广播聊天消息
 *
 * Generated from protobuf message <code>Game.Protobuf.CGBroadcastChat</code>
 */
class CGBroadcastChat extends \Google\Protobuf\Internal\Message
{
    /**
     *比赛Id
     *
     * Generated from protobuf field <code>uint64 MatchId = 1;</code>
     */
    protected $MatchId = 0;
    /**
     *聊天消息内容
     *
     * Generated from protobuf field <code>string ChatMessage = 2;</code>
     */
    protected $ChatMessage = '';
    /**
     *发送消息人Id
     *
     * Generated from protobuf field <code>uint64 PlayerId = 3;</code>
     */
    protected $PlayerId = 0;
    /**
     *要通知的玩家Id
     *
     * Generated from protobuf field <code>repeated uint64 Players = 4;</code>
     */
    private $Players;
    /**
     *发送人昵称,只转发    
     *
     * Generated from protobuf field <code>string Nickname = 5;</code>
     */
    protected $Nickname = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $MatchId
     *          比赛Id
     *     @type string $ChatMessage
     *          聊天消息内容
     *     @type int|string $PlayerId
     *          发送消息人Id
     *     @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $Players
     *          要通知的玩家Id
     *     @type string $Nickname
     *          发送人昵称,只转发    
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     *比赛Id
     *
     * Generated from protobuf field <code>uint64 MatchId = 1;</code>
     * @return int|string
     */
    public function getMatchId()
    {
        return $this->MatchId;
    }

    /**
     *比赛Id
     *
     * Generated from protobuf field <code>uint64 MatchId = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMatchId($var)
    {
        GPBUtil::checkUint64($var);
        $this->MatchId = $var;

        return $this;
    }

    /**
     *聊天消息内容
     *
     * Generated from protobuf field <code>string ChatMessage = 2;</code>
     * @return string
     */
    public function getChatMessage()
    {
        return $this->ChatMessage;
    }

    /**
     *聊天消息内容
     *
     * Generated from protobuf field <code>string ChatMessage = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setChatMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->ChatMessage = $var;

        return $this;
    }

    /**
     *发送消息人Id
     *
     * Generated from protobuf field <code>uint64 PlayerId = 3;</code>
     * @return int|string
     */
    public function getPlayerId()
    {
        return $this->PlayerId;
    }

    /**
     *发送消息人Id
     *
     * Generated from protobuf field <code>uint64 PlayerId = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPlayerId($var)
    {
        GPBUtil::checkUint64($var);
        $this->PlayerId = $var;

        return $this;
    }

    /**
     *要通知的玩家Id
     *
     * Generated from protobuf field <code>repeated uint64 Players = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPlayers()
    {
        return $this->Players;
    }

    /**
     *要通知的玩家Id
     *
     * Generated from protobuf field <code>repeated uint64 Players = 4;</code>
     * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPlayers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
        $this->Players = $arr;

        return $this;
    }

    /**
     *发送人昵称,只转发    
     *
     * Generated from protobuf field <code>string Nickname = 5;</code>
     * @return string
     */
    public function getNickname()
    {
        return $this->Nickname;
    }

    /**
     *发送人昵称,只转发    
     *
     * Generated from protobuf field <code>string Nickname = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setNickname($var)
    {
        GPBUtil::checkString($var, True);
        $this->Nickname = $var;

        return $this;
    }

}

