<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: api/EntPackage.proto

namespace Proto\Api;

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

/**
 * Generated from protobuf message <code>proto.api.EntPackage</code>
 */
class EntPackage extends \Google\Protobuf\Internal\Message
{
    /**
     * 套餐名称
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * 套餐类型
     *
     * Generated from protobuf field <code>.proto.api.PackageType type = 2;</code>
     */
    protected $type = 0;
    /**
     * 押金
     *
     * Generated from protobuf field <code>int32 pledge = 3;</code>
     */
    protected $pledge = 0;
    /**
     * 天数
     *
     * Generated from protobuf field <code>int32 total_day = 4;</code>
     */
    protected $total_day = 0;
    /**
     * 次数
     *
     * Generated from protobuf field <code>int32 total_num = 5;</code>
     */
    protected $total_num = 0;
    /**
     * 套餐显示价格
     *
     * Generated from protobuf field <code>int32 show_money = 6;</code>
     */
    protected $show_money = 0;
    /**
     * 套餐实际价格,元
     *
     * Generated from protobuf field <code>int32 money = 7;</code>
     */
    protected $money = 0;
    /**
     * 单次换电价格,元
     *
     * Generated from protobuf field <code>int32 exchange_money = 8;</code>
     */
    protected $exchange_money = 0;
    /**
     * 购买限制数量
     *
     * Generated from protobuf field <code>int32 buy_limit = 9;</code>
     */
    protected $buy_limit = 0;
    /**
     * 上下架状态
     *
     * Generated from protobuf field <code>.proto.api.LISTED_STATUS listed_status = 10;</code>
     */
    protected $listed_status = 0;
    /**
     * 套餐code
     *
     * Generated from protobuf field <code>string code = 11;</code>
     */
    protected $code = '';
    /**
     * 库存
     *
     * Generated from protobuf field <code>int32 stock = 12;</code>
     */
    protected $stock = 0;
    /**
     * 创建时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 ctime = 13;</code>
     */
    protected $ctime = 0;
    /**
     * 更新时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 utime = 14;</code>
     */
    protected $utime = 0;
    /**
     * 删除时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 dtime = 15;</code>
     */
    protected $dtime = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           套餐名称
     *     @type int $type
     *           套餐类型
     *     @type int $pledge
     *           押金
     *     @type int $total_day
     *           天数
     *     @type int $total_num
     *           次数
     *     @type int $show_money
     *           套餐显示价格
     *     @type int $money
     *           套餐实际价格,元
     *     @type int $exchange_money
     *           单次换电价格,元
     *     @type int $buy_limit
     *           购买限制数量
     *     @type int $listed_status
     *           上下架状态
     *     @type string $code
     *           套餐code
     *     @type int $stock
     *           库存
     *     @type int $ctime
     *           创建时间 时间戳 秒
     *     @type int $utime
     *           更新时间 时间戳 秒
     *     @type int $dtime
     *           删除时间 时间戳 秒
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Api\EntPackage::initOnce();
        parent::__construct($data);
    }

    /**
     * 套餐名称
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * 套餐名称
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * 套餐类型
     *
     * Generated from protobuf field <code>.proto.api.PackageType type = 2;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * 套餐类型
     *
     * Generated from protobuf field <code>.proto.api.PackageType type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Proto\Api\PackageType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * 押金
     *
     * Generated from protobuf field <code>int32 pledge = 3;</code>
     * @return int
     */
    public function getPledge()
    {
        return $this->pledge;
    }

    /**
     * 押金
     *
     * Generated from protobuf field <code>int32 pledge = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPledge($var)
    {
        GPBUtil::checkInt32($var);
        $this->pledge = $var;

        return $this;
    }

    /**
     * 天数
     *
     * Generated from protobuf field <code>int32 total_day = 4;</code>
     * @return int
     */
    public function getTotalDay()
    {
        return $this->total_day;
    }

    /**
     * 天数
     *
     * Generated from protobuf field <code>int32 total_day = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalDay($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_day = $var;

        return $this;
    }

    /**
     * 次数
     *
     * Generated from protobuf field <code>int32 total_num = 5;</code>
     * @return int
     */
    public function getTotalNum()
    {
        return $this->total_num;
    }

    /**
     * 次数
     *
     * Generated from protobuf field <code>int32 total_num = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_num = $var;

        return $this;
    }

    /**
     * 套餐显示价格
     *
     * Generated from protobuf field <code>int32 show_money = 6;</code>
     * @return int
     */
    public function getShowMoney()
    {
        return $this->show_money;
    }

    /**
     * 套餐显示价格
     *
     * Generated from protobuf field <code>int32 show_money = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setShowMoney($var)
    {
        GPBUtil::checkInt32($var);
        $this->show_money = $var;

        return $this;
    }

    /**
     * 套餐实际价格,元
     *
     * Generated from protobuf field <code>int32 money = 7;</code>
     * @return int
     */
    public function getMoney()
    {
        return $this->money;
    }

    /**
     * 套餐实际价格,元
     *
     * Generated from protobuf field <code>int32 money = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setMoney($var)
    {
        GPBUtil::checkInt32($var);
        $this->money = $var;

        return $this;
    }

    /**
     * 单次换电价格,元
     *
     * Generated from protobuf field <code>int32 exchange_money = 8;</code>
     * @return int
     */
    public function getExchangeMoney()
    {
        return $this->exchange_money;
    }

    /**
     * 单次换电价格,元
     *
     * Generated from protobuf field <code>int32 exchange_money = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setExchangeMoney($var)
    {
        GPBUtil::checkInt32($var);
        $this->exchange_money = $var;

        return $this;
    }

    /**
     * 购买限制数量
     *
     * Generated from protobuf field <code>int32 buy_limit = 9;</code>
     * @return int
     */
    public function getBuyLimit()
    {
        return $this->buy_limit;
    }

    /**
     * 购买限制数量
     *
     * Generated from protobuf field <code>int32 buy_limit = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setBuyLimit($var)
    {
        GPBUtil::checkInt32($var);
        $this->buy_limit = $var;

        return $this;
    }

    /**
     * 上下架状态
     *
     * Generated from protobuf field <code>.proto.api.LISTED_STATUS listed_status = 10;</code>
     * @return int
     */
    public function getListedStatus()
    {
        return $this->listed_status;
    }

    /**
     * 上下架状态
     *
     * Generated from protobuf field <code>.proto.api.LISTED_STATUS listed_status = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setListedStatus($var)
    {
        GPBUtil::checkEnum($var, \Proto\Api\LISTED_STATUS::class);
        $this->listed_status = $var;

        return $this;
    }

    /**
     * 套餐code
     *
     * Generated from protobuf field <code>string code = 11;</code>
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * 套餐code
     *
     * Generated from protobuf field <code>string code = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->code = $var;

        return $this;
    }

    /**
     * 库存
     *
     * Generated from protobuf field <code>int32 stock = 12;</code>
     * @return int
     */
    public function getStock()
    {
        return $this->stock;
    }

    /**
     * 库存
     *
     * Generated from protobuf field <code>int32 stock = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setStock($var)
    {
        GPBUtil::checkInt32($var);
        $this->stock = $var;

        return $this;
    }

    /**
     * 创建时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 ctime = 13;</code>
     * @return int
     */
    public function getCtime()
    {
        return $this->ctime;
    }

    /**
     * 创建时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 ctime = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setCtime($var)
    {
        GPBUtil::checkInt32($var);
        $this->ctime = $var;

        return $this;
    }

    /**
     * 更新时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 utime = 14;</code>
     * @return int
     */
    public function getUtime()
    {
        return $this->utime;
    }

    /**
     * 更新时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 utime = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setUtime($var)
    {
        GPBUtil::checkInt32($var);
        $this->utime = $var;

        return $this;
    }

    /**
     * 删除时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 dtime = 15;</code>
     * @return int
     */
    public function getDtime()
    {
        return $this->dtime;
    }

    /**
     * 删除时间 时间戳 秒
     *
     * Generated from protobuf field <code>int32 dtime = 15;</code>
     * @param int $var
     * @return $this
     */
    public function setDtime($var)
    {
        GPBUtil::checkInt32($var);
        $this->dtime = $var;

        return $this;
    }

}