<?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.GCGameLevelChapter</code>
 */
class GCGameLevelChapter extends \Google\Protobuf\Internal\Message
{
    /**
     *章节id
     *
     * Generated from protobuf field <code>int32 ChapterId = 1;</code>
     */
    protected $ChapterId = 0;
    /**
     *章节获得星星数量--只返回已解锁章节
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.ChapterStarData ChapterStar = 2;</code>
     */
    private $ChapterStar;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $ChapterId
     *          章节id
     *     @type \Game\Protobuf\ChapterStarData[]|\Google\Protobuf\Internal\RepeatedField $ChapterStar
     *          章节获得星星数量--只返回已解锁章节
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     *章节id
     *
     * Generated from protobuf field <code>int32 ChapterId = 1;</code>
     * @return int
     */
    public function getChapterId()
    {
        return $this->ChapterId;
    }

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

        return $this;
    }

    /**
     *章节获得星星数量--只返回已解锁章节
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.ChapterStarData ChapterStar = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getChapterStar()
    {
        return $this->ChapterStar;
    }

    /**
     *章节获得星星数量--只返回已解锁章节
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.ChapterStarData ChapterStar = 2;</code>
     * @param \Game\Protobuf\ChapterStarData[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setChapterStar($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Game\Protobuf\ChapterStarData::class);
        $this->ChapterStar = $arr;

        return $this;
    }

}

