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

/**
 *PVE关卡结算
 *
 * Generated from protobuf message <code>Game.Protobuf.CGFinishPve</code>
 */
class CGFinishPve extends \Google\Protobuf\Internal\Message
{
    /**
     *关卡id
     *
     * Generated from protobuf field <code>int32 LevelId = 1;</code>
     */
    protected $LevelId = 0;
    /**
     *比赛玩家信息
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.PlayerMark playerList = 2;</code>
     */
    private $playerList;
    /**
     *比赛完成目标
     *
     * Generated from protobuf field <code>.Game.Protobuf.TaleTarget target = 3;</code>
     */
    protected $target = null;
    /**
     *比赛内通用操作
     *
     * Generated from protobuf field <code>.Game.Protobuf.MatchOperation matchOperation = 4;</code>
     */
    protected $matchOperation = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $LevelId
     *          关卡id
     *     @type \Game\Protobuf\PlayerMark[]|\Google\Protobuf\Internal\RepeatedField $playerList
     *          比赛玩家信息
     *     @type \Game\Protobuf\TaleTarget $target
     *          比赛完成目标
     *     @type \Game\Protobuf\MatchOperation $matchOperation
     *          比赛内通用操作
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     *关卡id
     *
     * Generated from protobuf field <code>int32 LevelId = 1;</code>
     * @return int
     */
    public function getLevelId()
    {
        return $this->LevelId;
    }

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

        return $this;
    }

    /**
     *比赛玩家信息
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.PlayerMark playerList = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPlayerList()
    {
        return $this->playerList;
    }

    /**
     *比赛玩家信息
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.PlayerMark playerList = 2;</code>
     * @param \Game\Protobuf\PlayerMark[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPlayerList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Game\Protobuf\PlayerMark::class);
        $this->playerList = $arr;

        return $this;
    }

    /**
     *比赛完成目标
     *
     * Generated from protobuf field <code>.Game.Protobuf.TaleTarget target = 3;</code>
     * @return \Game\Protobuf\TaleTarget|null
     */
    public function getTarget()
    {
        return $this->target;
    }

    public function hasTarget()
    {
        return isset($this->target);
    }

    public function clearTarget()
    {
        unset($this->target);
    }

    /**
     *比赛完成目标
     *
     * Generated from protobuf field <code>.Game.Protobuf.TaleTarget target = 3;</code>
     * @param \Game\Protobuf\TaleTarget $var
     * @return $this
     */
    public function setTarget($var)
    {
        GPBUtil::checkMessage($var, \Game\Protobuf\TaleTarget::class);
        $this->target = $var;

        return $this;
    }

    /**
     *比赛内通用操作
     *
     * Generated from protobuf field <code>.Game.Protobuf.MatchOperation matchOperation = 4;</code>
     * @return \Game\Protobuf\MatchOperation|null
     */
    public function getMatchOperation()
    {
        return $this->matchOperation;
    }

    public function hasMatchOperation()
    {
        return isset($this->matchOperation);
    }

    public function clearMatchOperation()
    {
        unset($this->matchOperation);
    }

    /**
     *比赛内通用操作
     *
     * Generated from protobuf field <code>.Game.Protobuf.MatchOperation matchOperation = 4;</code>
     * @param \Game\Protobuf\MatchOperation $var
     * @return $this
     */
    public function setMatchOperation($var)
    {
        GPBUtil::checkMessage($var, \Game\Protobuf\MatchOperation::class);
        $this->matchOperation = $var;

        return $this;
    }

}

