using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;

namespace MSG_redpacket
{
    public partial class RedpacketInfo : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible
    {
        public void Send(){}
        public void Excute(){}
        public void ReadMessage(ref int readPos, int totalCount)
        {
            int endIndex = totalCount + readPos - 1;
            while (readPos <= endIndex)
            {
                int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                switch (fieldNumber)
                {
                    case 1 :
                        rpId = ProtoBufUtils.ReadUint64(ref readPos);
                        break;
                    case 2 :
                        maxValue = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 3 :
                        curnum = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 4 :
                        maxnum = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 5 :
                        expiretime = ProtoBufUtils.ReadInt64(ref readPos);
                        break;
                    case 6 :
                        roleId = ProtoBufUtils.ReadInt64(ref readPos);
                        break;
                    case 7 :
                        roleName = ProtoBufUtils.ReadString(ref readPos);
                        break;
                    case 8 :
                        if(head == null)
                        {
                          head = new MSG_Common.HeadAttribute();
                        }
                        totalCount = ProtoBufUtils.ReadInt32(ref readPos);
                        head.ReadMessage(ref readPos, totalCount);
                        break;
                    case 9 :
                        demo = ProtoBufUtils.ReadString(ref readPos);
                        break;
                    case 10 :
                        mark = ProtoBufUtils.ReadBoolean(ref readPos);
                        break;
                    case 11 :
                        sent = ProtoBufUtils.ReadBoolean(ref readPos);
                        break;
                    case 12 :
                        itemType = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 13 :
                        career = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 14 :
                        configId = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    default:
                        break;
                }
            }
        }
        public int WriteMessage(int fieldNumber)
        {
            ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String);
            int subItemInfoId = ProtoBufUtils.GetSubItemInfoId();
            ProtoBufUtils.SetEmptyLength(subItemInfoId);
            ProtoBufUtils.SetVBeginIndex(subItemInfoId);
                ProtoBufUtils.WriteUint64(1,rpId);
                ProtoBufUtils.WriteInt32(2,maxValue);
                ProtoBufUtils.WriteInt32(3,curnum);
                ProtoBufUtils.WriteInt32(4,maxnum);
                ProtoBufUtils.WriteInt64(5,expiretime);
                ProtoBufUtils.WriteInt64(6,roleId);
                ProtoBufUtils.WriteString(7,roleName);
                if(head != null)
                {
                    head.WriteMessage(8);
                }
                ProtoBufUtils.WriteString(9,demo);
                ProtoBufUtils.WriteBoolean(10,mark);
                ProtoBufUtils.WriteBoolean(11,sent);
                ProtoBufUtils.WriteInt32(12,itemType);
                ProtoBufUtils.WriteInt32(13,career);
                ProtoBufUtils.WriteInt32(14,configId);
            ProtoBufUtils.SetVEndIndex(subItemInfoId);
            return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
        }
        public void Clear()
        {
             rpId = 0;
             maxValue = 0;
             curnum = 0;
             maxnum = 0;
             expiretime = 0;
             roleId = 0;
             roleName = null;
             if(head != null)
             {
                head.Clear();
             }
             demo = null;
             mark = false;
             sent = false;
             itemType = 0;
             career = 0;
             configId = 0;
        }
        public ulong rpId;
        public int maxValue;
        public int curnum;
        public int maxnum;
        public long expiretime;
        public long roleId;
        public string roleName;
        public MSG_Common.HeadAttribute head;
        public string demo;
        public bool mark;
        public bool sent;
        public int itemType;
        public int career;
        public int configId;
    }
    public partial class RedpacketgetroleInfo : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible
    {
        public void Send(){}
        public void Excute(){}
        public void ReadMessage(ref int readPos, int totalCount)
        {
            int endIndex = totalCount + readPos - 1;
            while (readPos <= endIndex)
            {
                int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                switch (fieldNumber)
                {
                    case 1 :
                        roleName = ProtoBufUtils.ReadString(ref readPos);
                        break;
                    case 2 :
                        roleId = ProtoBufUtils.ReadInt64(ref readPos);
                        break;
                    case 3 :
                        rpvalue = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 4 :
                        if(head == null)
                        {
                          head = new MSG_Common.HeadAttribute();
                        }
                        totalCount = ProtoBufUtils.ReadInt32(ref readPos);
                        head.ReadMessage(ref readPos, totalCount);
                        break;
                    case 5 :
                        career = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    default:
                        break;
                }
            }
        }
        public int WriteMessage(int fieldNumber)
        {
            ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String);
            int subItemInfoId = ProtoBufUtils.GetSubItemInfoId();
            ProtoBufUtils.SetEmptyLength(subItemInfoId);
            ProtoBufUtils.SetVBeginIndex(subItemInfoId);
                ProtoBufUtils.WriteString(1,roleName);
                ProtoBufUtils.WriteInt64(2,roleId);
                ProtoBufUtils.WriteInt32(3,rpvalue);
                if(head != null)
                {
                    head.WriteMessage(4);
                }
                ProtoBufUtils.WriteInt32(5,career);
            ProtoBufUtils.SetVEndIndex(subItemInfoId);
            return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
        }
        public void Clear()
        {
             roleName = null;
             roleId = 0;
             rpvalue = 0;
             if(head != null)
             {
                head.Clear();
             }
             career = 0;
        }
        public string roleName;
        public long roleId;
        public int rpvalue;
        public MSG_Common.HeadAttribute head;
        public int career;
    }
    public partial class Rpsendlog : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible
    {
        public void Send(){}
        public void Excute(){}
        public void ReadMessage(ref int readPos, int totalCount)
        {
            int endIndex = totalCount + readPos - 1;
            while (readPos <= endIndex)
            {
                int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                switch (fieldNumber)
                {
                    case 1 :
                        sendtime = ProtoBufUtils.ReadInt64(ref readPos);
                        break;
                    case 2 :
                        reason = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 3 :
                        value = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    case 4 :
                        roleId = ProtoBufUtils.ReadInt64(ref readPos);
                        break;
                    case 5 :
                        roleName = ProtoBufUtils.ReadString(ref readPos);
                        break;
                    case 6 :
                        itemType = ProtoBufUtils.ReadInt32(ref readPos);
                        break;
                    default:
                        break;
                }
            }
        }
        public int WriteMessage(int fieldNumber)
        {
            ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String);
            int subItemInfoId = ProtoBufUtils.GetSubItemInfoId();
            ProtoBufUtils.SetEmptyLength(subItemInfoId);
            ProtoBufUtils.SetVBeginIndex(subItemInfoId);
                ProtoBufUtils.WriteInt64(1,sendtime);
                ProtoBufUtils.WriteInt32(2,reason);
                ProtoBufUtils.WriteInt32(3,value);
                ProtoBufUtils.WriteInt64(4,roleId);
                ProtoBufUtils.WriteString(5,roleName);
                ProtoBufUtils.WriteInt32(6,itemType);
            ProtoBufUtils.SetVEndIndex(subItemInfoId);
            return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
        }
        public void Clear()
        {
             sendtime = 0;
             reason = 0;
             value = 0;
             roleId = 0;
             roleName = null;
             itemType = 0;
        }
        public long sendtime;
        public int reason;
        public int value;
        public long roleId;
        public string roleName;
        public int itemType;
    }
    public partial class ReqRedpacketList : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
    {
    
        public const uint MsgID = 156201;
        public void Excute(){}
        public void Send()
        {
            lock (ProtoBufUtils.WriteLocker)
            {
                byte[] bytes = null;
                ProtoBufUtils.InitWriteData();
                bytes = ProtoBufUtils.GetData();
                Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
            }
        }
        public void Clear()
        {
        }
    }
    public partial class ResRedpacketList : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResRedpacketList(this);
        }
    
        public const uint MsgID = 156101;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        if(rpinfo == null)
                        {
                          rpinfo = new List<RedpacketInfo>();
                        }
                        rpinfo.Add(new RedpacketInfo());
                        totalCount = ProtoBufUtils.ReadInt32(ref readPos);
                        rpinfo[rpinfo.Count - 1].ReadMessage(ref readPos, totalCount);
                            break;
                        case 2:
                        if(rploginfo == null)
                        {
                          rploginfo = new List<Rpsendlog>();
                        }
                        rploginfo.Add(new Rpsendlog());
                        totalCount = ProtoBufUtils.ReadInt32(ref readPos);
                        rploginfo[rploginfo.Count - 1].ReadMessage(ref readPos, totalCount);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             if(rpinfo != null)
             {
                rpinfo.Clear();
             }
             if(rploginfo != null)
             {
                rploginfo.Clear();
             }
        }
        public List<RedpacketInfo> rpinfo =  new List<RedpacketInfo>();
        public List<Rpsendlog> rploginfo =  new List<Rpsendlog>();
    }
    public partial class ReqGetRedPacketInfo : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
    {
    
        public const uint MsgID = 156202;
        public void Excute(){}
        public void Send()
        {
            lock (ProtoBufUtils.WriteLocker)
            {
                byte[] bytes = null;
                ProtoBufUtils.InitWriteData();
                ProtoBufUtils.WriteInt64(1,rpId);
                bytes = ProtoBufUtils.GetData();
                Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
            }
        }
        public void Clear()
        {
             rpId = 0;
        }
        public long rpId;
    }
    public partial class ResGetRedPacketInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResGetRedPacketInfo(this);
        }
    
        public const uint MsgID = 156102;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        rpId = ProtoBufUtils.ReadInt64(ref readPos);
                            break;
                        case 2:
                        if(roleinfo == null)
                        {
                          roleinfo = new List<RedpacketgetroleInfo>();
                        }
                        roleinfo.Add(new RedpacketgetroleInfo());
                        totalCount = ProtoBufUtils.ReadInt32(ref readPos);
                        roleinfo[roleinfo.Count - 1].ReadMessage(ref readPos, totalCount);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             rpId = 0;
             if(roleinfo != null)
             {
                roleinfo.Clear();
             }
        }
        public long rpId;
        public List<RedpacketgetroleInfo> roleinfo =  new List<RedpacketgetroleInfo>();
    }
    public partial class ReqClickRedpacket : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
    {
    
        public const uint MsgID = 156203;
        public void Excute(){}
        public void Send()
        {
            lock (ProtoBufUtils.WriteLocker)
            {
                byte[] bytes = null;
                ProtoBufUtils.InitWriteData();
                ProtoBufUtils.WriteInt64(1,rpId);
                bytes = ProtoBufUtils.GetData();
                Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
            }
        }
        public void Clear()
        {
             rpId = 0;
        }
        public long rpId;
    }
    public partial class ResClickRedpacket : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResClickRedpacket(this);
        }
    
        public const uint MsgID = 156103;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        rpId = ProtoBufUtils.ReadInt64(ref readPos);
                            break;
                        case 2:
                        state = ProtoBufUtils.ReadInt32(ref readPos);
                            break;
                        case 3:
                        rpvalue = ProtoBufUtils.ReadInt32(ref readPos);
                            break;
                        case 4:
                        if(roleinfo == null)
                        {
                          roleinfo = new List<RedpacketgetroleInfo>();
                        }
                        roleinfo.Add(new RedpacketgetroleInfo());
                        totalCount = ProtoBufUtils.ReadInt32(ref readPos);
                        roleinfo[roleinfo.Count - 1].ReadMessage(ref readPos, totalCount);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             rpId = 0;
             state = 0;
             rpvalue = 0;
             if(roleinfo != null)
             {
                roleinfo.Clear();
             }
        }
        public long rpId;
        public int state;
        public int rpvalue;
        public List<RedpacketgetroleInfo> roleinfo =  new List<RedpacketgetroleInfo>();
    }
    public partial class ReqSendRedpacket : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
    {
    
        public const uint MsgID = 156204;
        public void Excute(){}
        public void Send()
        {
            lock (ProtoBufUtils.WriteLocker)
            {
                byte[] bytes = null;
                ProtoBufUtils.InitWriteData();
                ProtoBufUtils.WriteInt32(1,maxValue);
                ProtoBufUtils.WriteInt32(2,maxNum);
                ProtoBufUtils.WriteString(3,notice);
                ProtoBufUtils.WriteInt64(4,rpId);
                ProtoBufUtils.WriteInt32(5,itemType);
                bytes = ProtoBufUtils.GetData();
                Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
            }
        }
        public void Clear()
        {
             maxValue = 0;
             maxNum = 0;
             notice = null;
             rpId = 0;
             itemType = 0;
        }
        public int maxValue;
        public int maxNum;
        public string notice;
        public long rpId;
        public int itemType;
    }
    public partial class ResSendRedPacket : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResSendRedPacket(this);
        }
    
        public const uint MsgID = 156104;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        state = ProtoBufUtils.ReadInt32(ref readPos);
                            break;
                        case 2:
                        rpId = ProtoBufUtils.ReadInt64(ref readPos);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             state = 0;
             rpId = 0;
        }
        public int state;
        public long rpId;
    }
    public partial class ResNewRedPacket : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResNewRedPacket(this);
        }
    
        public const uint MsgID = 156105;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        roleId = ProtoBufUtils.ReadInt64(ref readPos);
                            break;
                        case 2:
                        type = ProtoBufUtils.ReadInt32(ref readPos);
                            break;
                        case 3:
                        rpId = ProtoBufUtils.ReadInt64(ref readPos);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             roleId = 0;
             type = 0;
             rpId = 0;
        }
        public long roleId;
        public int type;
        public long rpId;
    }
    public partial class ResMineHaveRedpacket : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResMineHaveRedpacket(this);
        }
    
        public const uint MsgID = 156106;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        mineSendNum = ProtoBufUtils.ReadInt32(ref readPos);
                            break;
                        case 2:
                        if(rpId == null)
                        {
                          rpId = new List<long>();
                        }
                        rpId.Add(ProtoBufUtils.ReadInt64(ref readPos));
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             mineSendNum = 0;
             if(rpId != null)
             {
                rpId.Clear();
             }
        }
        public int mineSendNum;
        public List<long> rpId =  new List<long>();
    }
    public partial class ReqSendMineRechargeRedpacket : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
    {
    
        public const uint MsgID = 156207;
        public void Excute(){}
        public void Send()
        {
            lock (ProtoBufUtils.WriteLocker)
            {
                byte[] bytes = null;
                ProtoBufUtils.InitWriteData();
                ProtoBufUtils.WriteInt64(1,rpId);
                ProtoBufUtils.WriteInt32(2,maxNum);
                bytes = ProtoBufUtils.GetData();
                Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
            }
        }
        public void Clear()
        {
             rpId = 0;
             maxNum = 0;
        }
        public long rpId;
        public int maxNum;
    }
    public partial class ResSendMineRechargeRedpacket : ProtoBuf.IExtensible, ProtoBuf.IResMessage
    {
        public void Excute()
        {
			HandleMsgResult.getInstance().GS2U_ResSendMineRechargeRedpacket(this);
        }
    
        public const uint MsgID = 156107;
        public void Send(){}
        public void ReadMessage(byte[] bytes)
        {
            lock (ProtoBufUtils.ReadLocker)
            {
                Clear();
                int endIndex = bytes.Length - 1;
                int readPos = 0;
                int totalCount = 0;
                ProtoBufUtils.InitReadData(bytes, ref readPos);
                while (readPos <= endIndex)
                {
                    int curType = bytes[readPos] & 7;
                    int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
                    switch (fieldNumber)
                    {
                        case 1:
                        rpId = ProtoBufUtils.ReadInt64(ref readPos);
                            break;
                        case 2:
                        state = ProtoBufUtils.ReadInt32(ref readPos);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public void Clear()
        {
             rpId = 0;
             state = 0;
        }
        public long rpId;
        public int state;
    }
}