<?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.GCMatchRecord</code>
 */
class GCMatchRecord extends \Google\Protobuf\Internal\Message
{
    /**
     *收藏数量
     *
     * Generated from protobuf field <code>int32 CollectionNum = 1;</code>
     */
    protected $CollectionNum = 0;
    /**
     *比赛记录
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.MatchRecord Record = 2;</code>
     */
    private $Record;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $CollectionNum
     *          收藏数量
     *     @type \Game\Protobuf\MatchRecord[]|\Google\Protobuf\Internal\RepeatedField $Record
     *          比赛记录
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     *收藏数量
     *
     * Generated from protobuf field <code>int32 CollectionNum = 1;</code>
     * @return int
     */
    public function getCollectionNum()
    {
        return $this->CollectionNum;
    }

    /**
     *收藏数量
     *
     * Generated from protobuf field <code>int32 CollectionNum = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setCollectionNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->CollectionNum = $var;

        return $this;
    }

    /**
     *比赛记录
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.MatchRecord Record = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRecord()
    {
        return $this->Record;
    }

    /**
     *比赛记录
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.MatchRecord Record = 2;</code>
     * @param \Game\Protobuf\MatchRecord[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRecord($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Game\Protobuf\MatchRecord::class);
        $this->Record = $arr;

        return $this;
    }

}

