
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using Luban;


namespace Server.Config
{
public sealed partial class ExchangeMallConfig : Luban.BeanBase
{
    public ExchangeMallConfig(ByteBuf _buf) 
    {
        Id = _buf.ReadInt();
        Name = _buf.ReadString();
        MallType = _buf.ReadInt();
        {int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);SourceItems = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); SourceItems[__index0] = __e0;}}
        {int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);TargetItems = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); TargetItems[__index0] = __e0;}}
        {int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AppStore = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); AppStore[__index0] = __e0;}}
        NotShelved = _buf.ReadBool();
        Sort = _buf.ReadInt();
        Desc = _buf.ReadString();
    }

    public static ExchangeMallConfig DeserializeExchangeMallConfig(ByteBuf _buf)
    {
        return new ExchangeMallConfig(_buf);
    }

    /// <summary>
    /// 兑换Id
    /// </summary>
    public readonly int Id;
    /// <summary>
    /// 商品名称
    /// </summary>
    public readonly string Name;
    /// <summary>
    /// 兑换商店类型<br/>0 全部，这里不能配置<br/>1 金币<br/>2 道具<br/>3 活动
    /// </summary>
    public readonly int MallType;
    /// <summary>
    /// 需要消耗的物品列表
    /// </summary>
    public readonly ResData[] SourceItems;
    /// <summary>
    /// 兑换获得的物品列表
    /// </summary>
    public readonly ResData[] TargetItems;
    /// <summary>
    /// 支持的APP商城类型<br/>0 默认<br/>1 微信小游戏<br/>2 应用包<br/>3 AppStore<br/>4 官网<br/>5 华为<br/>6 公众号<br/>7 小米
    /// </summary>
    public readonly int[] AppStore;
    /// <summary>
    /// 未上架
    /// </summary>
    public readonly bool NotShelved;
    /// <summary>
    /// 排序数字<br/>降序
    /// </summary>
    public readonly int Sort;
    /// <summary>
    /// 描述
    /// </summary>
    public readonly string Desc;
   
    public const int __ID__ = -1269715687;
    public override int GetTypeId() => __ID__;


    public override string ToString()
    {
        return "{ "
        + "id:" + Id + ","
        + "name:" + Name + ","
        + "mallType:" + MallType + ","
        + "SourceItems:" + Luban.StringUtil.CollectionToString(SourceItems) + ","
        + "TargetItems:" + Luban.StringUtil.CollectionToString(TargetItems) + ","
        + "appStore:" + Luban.StringUtil.CollectionToString(AppStore) + ","
        + "notShelved:" + NotShelved + ","
        + "sort:" + Sort + ","
        + "desc:" + Desc + ","
        + "}";
    }
}

}
