<?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.GCBlindBox</code>
 */
class GCBlindBox extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int32 Code = 1;</code>
     */
    protected $Code = 0;
    /**
     *已抽奖次数
     *
     * Generated from protobuf field <code>int32 Num = 2;</code>
     */
    protected $Num = 0;
    /**
     *抽奖奖励
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.BlindBoxReward Reward = 3;</code>
     */
    private $Reward;
    /**
     *发送的Id
     *
     * Generated from protobuf field <code>int32 Id = 4;</code>
     */
    protected $Id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Code
     *     @type int $Num
     *          已抽奖次数
     *     @type \Game\Protobuf\BlindBoxReward[]|\Google\Protobuf\Internal\RepeatedField $Reward
     *          抽奖奖励
     *     @type int $Id
     *          发送的Id
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>int32 Code = 1;</code>
     * @return int
     */
    public function getCode()
    {
        return $this->Code;
    }

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

        return $this;
    }

    /**
     *已抽奖次数
     *
     * Generated from protobuf field <code>int32 Num = 2;</code>
     * @return int
     */
    public function getNum()
    {
        return $this->Num;
    }

    /**
     *已抽奖次数
     *
     * Generated from protobuf field <code>int32 Num = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->Num = $var;

        return $this;
    }

    /**
     *抽奖奖励
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.BlindBoxReward Reward = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getReward()
    {
        return $this->Reward;
    }

    /**
     *抽奖奖励
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.BlindBoxReward Reward = 3;</code>
     * @param \Game\Protobuf\BlindBoxReward[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setReward($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Game\Protobuf\BlindBoxReward::class);
        $this->Reward = $arr;

        return $this;
    }

    /**
     *发送的Id
     *
     * Generated from protobuf field <code>int32 Id = 4;</code>
     * @return int
     */
    public function getId()
    {
        return $this->Id;
    }

    /**
     *发送的Id
     *
     * Generated from protobuf field <code>int32 Id = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->Id = $var;

        return $this;
    }

}

