// Code generated by protogen.go; DO NOT EDIT.

package proto

// NEO. protocol messages to/from wire marshalling.

import (
	"encoding/binary"
	"reflect"
	"sort"

	"github.com/tinylib/msgp/msgp"
	"lab.nexedi.com/kirr/neo/go/neo/internal/msgpack"

	"lab.nexedi.com/kirr/go123/mem"
	"lab.nexedi.com/kirr/neo/go/zodb"
)

// messages marshalling

// 0 | answerBit. Error

func (*Error) neoMsgCode() uint16 {
	return 0 | answerBit
}

func (p *Error) neoMsgEncodedLenN() int {
	return 8 + len(p.Message)
}

func (p *Error) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], uint32(p.Code))
	{
		l := uint32(len(p.Message))
		binary.BigEndian.PutUint32(data[4:], l)
		data = data[8:]
		copy(data, p.Message)
		data = data[l:]
	}
}

func (p *Error) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 8 {
		goto overflow
	}
	p.Code = ErrorCode(binary.BigEndian.Uint32(data[0 : 0+4]))
	{
		l := binary.BigEndian.Uint32(data[4 : 4+4])
		data = data[8:]
		if uint64(len(data)) < uint64(l) {
			goto overflow
		}
		nread += uint64(l)
		p.Message = string(data[:l])
		data = data[l:]
	}
	return 8 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *Error) neoMsgEncodedLenM() int {
	return 4 + msgpack.BinHeadSize(len(p.Message)) + len(p.Message)
}

func (p *Error) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 0
	if !(0 <= p.Code && p.Code <= 0x7f) {
		panic("p.Code: invalid ErrorCode enum value)")
	}
	data[3] = byte(p.Code)
	{
		l := len(p.Message)
		n := msgpack.PutBinHead(data[4:], l)
		data = data[4+n:]
		copy(data, p.Message)
		data = data[l:]
	}
}

func (p *Error) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"Error", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("Error.Code", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 0 {
		return 0, mdecodeEnumTypeErr("Error.Code", enumType, 0)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("Error.Code", v)
		}
		p.Code = ErrorCode(v)
	}
	data = data[4:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("Error.Message", err)
		}
		p.Message = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 1. RequestIdentification

func (*RequestIdentification) neoMsgCode() uint16 {
	return 1
}

func (p *RequestIdentification) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.DevPath); i++ {
		a := &p.DevPath[i]
		size += len((*a))
	}
	return 17 + p.Address.neoEncodedLenN() + len(p.ClusterName) + p.IdTime.neoEncodedLenN() + len(p.DevPath)*4 + len(p.NewNID)*4 + size
}

func (p *RequestIdentification) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = uint8(int8(p.NodeType))
	binary.BigEndian.PutUint32(data[1:], uint32(int32(p.NID)))
	{
		n := p.Address.neoEncodeN(data[5:])
		data = data[5+n:]
	}
	{
		l := uint32(len(p.ClusterName))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.ClusterName)
		data = data[l:]
	}
	{
		n := p.IdTime.neoEncodeN(data[0:])
		data = data[0+n:]
	}
	{
		l := len(p.DevPath)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.DevPath[i]
			{
				l := uint32(len((*a)))
				binary.BigEndian.PutUint32(data[0:], l)
				data = data[4:]
				copy(data, (*a))
				data = data[l:]
			}
		}
	}
	{
		l := len(p.NewNID)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.NewNID[i]
			binary.BigEndian.PutUint32(data[0:], (*a))
			data = data[4:]
		}
	}
}

func (p *RequestIdentification) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 5 {
		goto overflow
	}
	p.NodeType = NodeType(int8((data[0 : 0+1])[0]))
	p.NID = NodeID(int32(binary.BigEndian.Uint32(data[1 : 1+4])))
	data = data[5:]
	{
		n, ok := p.Address.neoDecodeN(data)
		if !ok {
			goto overflow
		}
		data = data[n:]
		nread += n
	}
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l) {
			goto overflow
		}
		nread += uint64(l)
		p.ClusterName = string(data[:l])
		data = data[l:]
	}
	{
		n, ok := p.IdTime.neoDecodeN(data)
		if !ok {
			goto overflow
		}
		data = data[n:]
		nread += n
	}
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		p.DevPath = make([]string, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.DevPath[i]
			if len(data) < 4 {
				goto overflow
			}
			{
				l := binary.BigEndian.Uint32(data[0 : 0+4])
				data = data[4:]
				if uint64(len(data)) < uint64(l) {
					goto overflow
				}
				nread += uint64(l)
				(*a) = string(data[:l])
				data = data[l:]
			}
		}
		if len(data) < 4 {
			goto overflow
		}
		nread += uint64(l) * 4
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.NewNID = make([]uint32, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NewNID[i]
			(*a) = binary.BigEndian.Uint32(data[0 : 0+4])
			data = data[4:]
		}
	}
	return 17 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *RequestIdentification) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.DevPath); i++ {
		a := &p.DevPath[i]
		size += msgpack.BinHeadSize(len((*a))) + len((*a))
	}
	for i := 0; i < len(p.NewNID); i++ {
		a := &p.NewNID[i]
		size += msgpack.Uint32Size((*a))
	}
	return 14 + msgpack.Int32Size(int32(p.NID)) + msgpack.BinHeadSize(len(p.Address.Host)) + len(p.Address.Host) + msgpack.Uint16Size(p.Address.Port) + msgpack.BinHeadSize(len(p.ClusterName)) + len(p.ClusterName) + msgpack.ArrayHeadSize(len(p.DevPath)) + msgpack.ArrayHeadSize(len(p.NewNID)) + size
}

func (p *RequestIdentification) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 7)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 2
	if !(0 <= p.NodeType && p.NodeType <= 0x7f) {
		panic("p.NodeType: invalid NodeType enum value)")
	}
	data[3] = byte(p.NodeType)
	{
		n := msgpack.PutInt32(data[4:], int32(p.NID))
		data = data[4+n:]
	}
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		l := len(p.Address.Host)
		n := msgpack.PutBinHead(data[1:], l)
		data = data[1+n:]
		copy(data, p.Address.Host)
		data = data[l:]
	}
	{
		n := msgpack.PutUint16(data[0:], p.Address.Port)
		data = data[0+n:]
	}
	{
		l := len(p.ClusterName)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.ClusterName)
		data = data[l:]
	}
	data[0] = byte(msgpack.Float64)
	float64_neoEncode(data[1:], float64(p.IdTime))
	{
		l := len(p.DevPath)
		n := msgpack.PutArrayHead(data[9:], l)
		data = data[9+n:]
		for i := 0; i < l; i++ {
			a := &p.DevPath[i]
			{
				l := len((*a))
				n := msgpack.PutBinHead(data[0:], l)
				data = data[0+n:]
				copy(data, (*a))
				data = data[l:]
			}
		}
	}
	{
		l := len(p.NewNID)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.NewNID[i]
			{
				n := msgpack.PutUint32(data[0:], (*a))
				data = data[0+n:]
			}
		}
	}
}

func (p *RequestIdentification) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|7; op != opOk {
		return 0, &mstructDecodeError{"RequestIdentification", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("RequestIdentification.NodeType", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 2 {
		return 0, mdecodeEnumTypeErr("RequestIdentification.NodeType", enumType, 2)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("RequestIdentification.NodeType", v)
		}
		p.NodeType = NodeType(v)
	}
	data = data[4:]
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.NID", err)
		}
		p.NID = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"RequestIdentification.Address", op, opOk}
	}
	data = data[1:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.Address.Host", err)
		}
		p.Address.Host = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint16Bytes(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.Address.Port", err)
		}
		p.Address.Port = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.ClusterName", err)
		}
		p.ClusterName = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadFloat64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.IdTime", err)
		}
		p.IdTime = IdTime(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.DevPath", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.DevPath = make([]string, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.DevPath[i]
			{
				b, tail, err := msgp.ReadBytesZC(data)
				if err != nil {
					return 0, mdecodeErr("RequestIdentification", err)
				}
				(*a) = string(b)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("RequestIdentification.NewNID", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NewNID = make([]uint32, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NewNID[i]
			{
				v, tail, err := msgp.ReadUint32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("RequestIdentification", err)
				}
				(*a) = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 5 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 1 | answerBit. AcceptIdentification

func (*AcceptIdentification) neoMsgCode() uint16 {
	return 1 | answerBit
}

func (p *AcceptIdentification) neoMsgEncodedLenN() int {
	return 9
}

func (p *AcceptIdentification) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = uint8(int8(p.NodeType))
	binary.BigEndian.PutUint32(data[1:], uint32(int32(p.MyNID)))
	binary.BigEndian.PutUint32(data[5:], uint32(int32(p.YourNID)))
}

func (p *AcceptIdentification) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 9 {
		goto overflow
	}
	p.NodeType = NodeType(int8((data[0 : 0+1])[0]))
	p.MyNID = NodeID(int32(binary.BigEndian.Uint32(data[1 : 1+4])))
	p.YourNID = NodeID(int32(binary.BigEndian.Uint32(data[5 : 5+4])))
	return 9, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AcceptIdentification) neoMsgEncodedLenM() int {
	return 4 + msgpack.Int32Size(int32(p.MyNID)) + msgpack.Int32Size(int32(p.YourNID))
}

func (p *AcceptIdentification) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 2
	if !(0 <= p.NodeType && p.NodeType <= 0x7f) {
		panic("p.NodeType: invalid NodeType enum value)")
	}
	data[3] = byte(p.NodeType)
	{
		n := msgpack.PutInt32(data[4:], int32(p.MyNID))
		data = data[4+n:]
	}
	{
		n := msgpack.PutInt32(data[0:], int32(p.YourNID))
		data = data[0+n:]
	}
}

func (p *AcceptIdentification) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AcceptIdentification", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("AcceptIdentification.NodeType", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 2 {
		return 0, mdecodeEnumTypeErr("AcceptIdentification.NodeType", enumType, 2)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("AcceptIdentification.NodeType", v)
		}
		p.NodeType = NodeType(v)
	}
	data = data[4:]
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AcceptIdentification.MyNID", err)
		}
		p.MyNID = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AcceptIdentification.YourNID", err)
		}
		p.YourNID = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 2. Ping

func (*Ping) neoMsgCode() uint16 {
	return 2
}

func (p *Ping) neoMsgEncodedLenN() int {
	return 0
}

func (p *Ping) neoMsgEncodeN(data []byte) {
}

func (p *Ping) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *Ping) neoMsgEncodedLenM() int {
	return 1
}

func (p *Ping) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *Ping) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"Ping", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 2 | answerBit. Pong

func (*Pong) neoMsgCode() uint16 {
	return 2 | answerBit
}

func (p *Pong) neoMsgEncodedLenN() int {
	return 0
}

func (p *Pong) neoMsgEncodeN(data []byte) {
}

func (p *Pong) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *Pong) neoMsgEncodedLenM() int {
	return 1
}

func (p *Pong) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *Pong) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"Pong", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 3. CloseClient

func (*CloseClient) neoMsgCode() uint16 {
	return 3
}

func (p *CloseClient) neoMsgEncodedLenN() int {
	return 0
}

func (p *CloseClient) neoMsgEncodeN(data []byte) {
}

func (p *CloseClient) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *CloseClient) neoMsgEncodedLenM() int {
	return 1
}

func (p *CloseClient) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *CloseClient) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"CloseClient", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 4. PrimaryMaster

func (*PrimaryMaster) neoMsgCode() uint16 {
	return 4
}

func (p *PrimaryMaster) neoMsgEncodedLenN() int {
	return 0
}

func (p *PrimaryMaster) neoMsgEncodeN(data []byte) {
}

func (p *PrimaryMaster) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *PrimaryMaster) neoMsgEncodedLenM() int {
	return 1
}

func (p *PrimaryMaster) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *PrimaryMaster) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"PrimaryMaster", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 4 | answerBit. AnswerPrimary

func (*AnswerPrimary) neoMsgCode() uint16 {
	return 4 | answerBit
}

func (p *AnswerPrimary) neoMsgEncodedLenN() int {
	return 4
}

func (p *AnswerPrimary) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], uint32(int32(p.PrimaryNodeID)))
}

func (p *AnswerPrimary) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	p.PrimaryNodeID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerPrimary) neoMsgEncodedLenM() int {
	return 1 + msgpack.Int32Size(int32(p.PrimaryNodeID))
}

func (p *AnswerPrimary) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		n := msgpack.PutInt32(data[1:], int32(p.PrimaryNodeID))
		data = data[1+n:]
	}
}

func (p *AnswerPrimary) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerPrimary", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPrimary.PrimaryNodeID", err)
		}
		p.PrimaryNodeID = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 5. NotPrimaryMaster

func (*NotPrimaryMaster) neoMsgCode() uint16 {
	return 5
}

func (p *NotPrimaryMaster) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.KnownMasterList); i++ {
		a := &p.KnownMasterList[i]
		size += (*a).neoEncodedLenN()
	}
	return 8 + size
}

func (p *NotPrimaryMaster) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], uint32(int32(p.Primary)))
	{
		l := len(p.KnownMasterList)
		binary.BigEndian.PutUint32(data[4:], uint32(l))
		data = data[8:]
		for i := 0; i < l; i++ {
			a := &p.KnownMasterList[i]
			{
				n := (*a).neoEncodeN(data[0:])
				data = data[0+n:]
			}
		}
	}
}

func (p *NotPrimaryMaster) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 8 {
		goto overflow
	}
	p.Primary = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
	{
		l := binary.BigEndian.Uint32(data[4 : 4+4])
		data = data[8:]
		p.KnownMasterList = make([]struct{ Address }, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.KnownMasterList[i]
			{
				n, ok := (*a).neoDecodeN(data)
				if !ok {
					goto overflow
				}
				data = data[n:]
				nread += n
			}
		}
	}
	return 8 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotPrimaryMaster) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.KnownMasterList); i++ {
		a := &p.KnownMasterList[i]
		size += msgpack.BinHeadSize(len((*a).Address.Host)) + len((*a).Address.Host) + msgpack.Uint16Size((*a).Address.Port)
	}
	return 1 + msgpack.Int32Size(int32(p.Primary)) + msgpack.ArrayHeadSize(len(p.KnownMasterList)) + len(p.KnownMasterList)*2 + size
}

func (p *NotPrimaryMaster) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		n := msgpack.PutInt32(data[1:], int32(p.Primary))
		data = data[1+n:]
	}
	{
		l := len(p.KnownMasterList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.KnownMasterList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			data[1] = byte(msgpack.FixArray_4 | 2)
			{
				l := len((*a).Address.Host)
				n := msgpack.PutBinHead(data[2:], l)
				data = data[2+n:]
				copy(data, (*a).Address.Host)
				data = data[l:]
			}
			{
				n := msgpack.PutUint16(data[0:], (*a).Address.Port)
				data = data[0+n:]
			}
		}
	}
}

func (p *NotPrimaryMaster) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"NotPrimaryMaster", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("NotPrimaryMaster.Primary", err)
		}
		p.Primary = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("NotPrimaryMaster.KnownMasterList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.KnownMasterList = make([]struct{ Address }, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.KnownMasterList[i]
			if len(data) < 2 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"NotPrimaryMaster", op, opOk}
			}
			if op, opOk := msgpack.Op(data[1]), msgpack.FixArray_4|2; op != opOk {
				return 0, &mstructDecodeError{"NotPrimaryMaster.Address", op, opOk}
			}
			data = data[2:]
			{
				b, tail, err := msgp.ReadBytesZC(data)
				if err != nil {
					return 0, mdecodeErr("NotPrimaryMaster.Address.Host", err)
				}
				(*a).Address.Host = string(b)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				v, tail, err := msgp.ReadUint16Bytes(data)
				if err != nil {
					return 0, mdecodeErr("NotPrimaryMaster.Address.Port", err)
				}
				(*a).Address.Port = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		nread += uint64(l) * 2
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 6. NotifyNodeInformation

func (*NotifyNodeInformation) neoMsgCode() uint16 {
	return 6
}

func (p *NotifyNodeInformation) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += (*a).Addr.neoEncodedLenN() + (*a).IdTime.neoEncodedLenN()
	}
	return 4 + p.IdTime.neoEncodedLenN() + len(p.NodeList)*6 + size
}

func (p *NotifyNodeInformation) neoMsgEncodeN(data []byte) {
	{
		n := p.IdTime.neoEncodeN(data[0:])
		data = data[0+n:]
	}
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			(data[0:])[0] = uint8(int8((*a).Type))
			{
				n := (*a).Addr.neoEncodeN(data[1:])
				data = data[1+n:]
			}
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
			(data[4:])[0] = uint8(int8((*a).State))
			{
				n := (*a).IdTime.neoEncodeN(data[5:])
				data = data[5+n:]
			}
		}
	}
}

func (p *NotifyNodeInformation) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	{
		n, ok := p.IdTime.neoDecodeN(data)
		if !ok {
			goto overflow
		}
		data = data[n:]
		nread += n
	}
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		p.NodeList = make([]NodeInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			if len(data) < 1 {
				goto overflow
			}
			(*a).Type = NodeType(int8((data[0 : 0+1])[0]))
			data = data[1:]
			{
				n, ok := (*a).Addr.neoDecodeN(data)
				if !ok {
					goto overflow
				}
				data = data[n:]
				nread += n
			}
			if len(data) < 5 {
				goto overflow
			}
			(*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			(*a).State = NodeState(int8((data[4 : 4+1])[0]))
			data = data[5:]
			{
				n, ok := (*a).IdTime.neoDecodeN(data)
				if !ok {
					goto overflow
				}
				data = data[n:]
				nread += n
			}
		}
		nread += uint64(l) * 6
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotifyNodeInformation) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.BinHeadSize(len((*a).Addr.Host)) + len((*a).Addr.Host) + msgpack.Uint16Size((*a).Addr.Port) + msgpack.Int32Size(int32((*a).NID))
	}
	return 10 + msgpack.ArrayHeadSize(len(p.NodeList)) + len(p.NodeList)*17 + size
}

func (p *NotifyNodeInformation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Float64)
	float64_neoEncode(data[2:], float64(p.IdTime))
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[10:], l)
		data = data[10+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			data[0] = byte(msgpack.FixArray_4 | 5)
			data[1] = byte(msgpack.FixExt1)
			data[2] = 2
			if !(0 <= (*a).Type && (*a).Type <= 0x7f) {
				panic("(*a).Type: invalid NodeType enum value)")
			}
			data[3] = byte((*a).Type)
			data[4] = byte(msgpack.FixArray_4 | 2)
			{
				l := len((*a).Addr.Host)
				n := msgpack.PutBinHead(data[5:], l)
				data = data[5+n:]
				copy(data, (*a).Addr.Host)
				data = data[l:]
			}
			{
				n := msgpack.PutUint16(data[0:], (*a).Addr.Port)
				data = data[0+n:]
			}
			{
				n := msgpack.PutInt32(data[0:], int32((*a).NID))
				data = data[0+n:]
			}
			data[0] = byte(msgpack.FixExt1)
			data[1] = 3
			if !(0 <= (*a).State && (*a).State <= 0x7f) {
				panic("(*a).State: invalid NodeState enum value)")
			}
			data[2] = byte((*a).State)
			data[3] = byte(msgpack.Float64)
			float64_neoEncode(data[4:], float64((*a).IdTime))
			data = data[12:]
		}
	}
}

func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"NotifyNodeInformation", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadFloat64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("NotifyNodeInformation.IdTime", err)
		}
		p.IdTime = IdTime(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("NotifyNodeInformation.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			if len(data) < 5 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
				return 0, &mstructDecodeError{"NotifyNodeInformation", op, opOk}
			}
			if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
				return 0, mdecodeOpErr("NotifyNodeInformation.Type", op, msgpack.FixExt1)
			}
			if enumType := data[2]; enumType != 2 {
				return 0, mdecodeEnumTypeErr("NotifyNodeInformation.Type", enumType, 2)
			}
			{
				v := data[3]
				if !(0 <= v && v <= 0x7f) {
					return 0, mdecodeEnumValueErr("NotifyNodeInformation.Type", v)
				}
				(*a).Type = NodeType(v)
			}
			if op, opOk := msgpack.Op(data[4]), msgpack.FixArray_4|2; op != opOk {
				return 0, &mstructDecodeError{"NotifyNodeInformation.Addr", op, opOk}
			}
			data = data[5:]
			{
				b, tail, err := msgp.ReadBytesZC(data)
				if err != nil {
					return 0, mdecodeErr("NotifyNodeInformation.Addr.Host", err)
				}
				(*a).Addr.Host = string(b)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				v, tail, err := msgp.ReadUint16Bytes(data)
				if err != nil {
					return 0, mdecodeErr("NotifyNodeInformation.Addr.Port", err)
				}
				(*a).Addr.Port = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("NotifyNodeInformation.NID", err)
				}
				(*a).NID = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			if len(data) < 3 {
				goto overflow
			}
			if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
				return 0, mdecodeOpErr("NotifyNodeInformation.State", op, msgpack.FixExt1)
			}
			if enumType := data[1]; enumType != 3 {
				return 0, mdecodeEnumTypeErr("NotifyNodeInformation.State", enumType, 3)
			}
			{
				v := data[2]
				if !(0 <= v && v <= 0x7f) {
					return 0, mdecodeEnumValueErr("NotifyNodeInformation.State", v)
				}
				(*a).State = NodeState(v)
			}
			data = data[3:]
			{
				v, tail, err := msgp.ReadFloat64Bytes(data)
				if err != nil {
					return 0, mdecodeErr("NotifyNodeInformation.IdTime", err)
				}
				(*a).IdTime = IdTime(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		nread += uint64(l) * 8
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 7. Recovery

func (*Recovery) neoMsgCode() uint16 {
	return 7
}

func (p *Recovery) neoMsgEncodedLenN() int {
	return 0
}

func (p *Recovery) neoMsgEncodeN(data []byte) {
}

func (p *Recovery) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *Recovery) neoMsgEncodedLenM() int {
	return 1
}

func (p *Recovery) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *Recovery) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"Recovery", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 7 | answerBit. AnswerRecovery

func (*AnswerRecovery) neoMsgCode() uint16 {
	return 7 | answerBit
}

func (p *AnswerRecovery) neoMsgEncodedLenN() int {
	return 24
}

func (p *AnswerRecovery) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.BackupTid))
	binary.BigEndian.PutUint64(data[16:], uint64(p.TruncateTid))
}

func (p *AnswerRecovery) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 24 {
		goto overflow
	}
	p.PTid = PTid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.BackupTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.TruncateTid = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	return 24, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerRecovery) neoMsgEncodedLenM() int {
	return 21 + msgpack.Uint64Size(uint64(p.PTid))
}

func (p *AnswerRecovery) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint64(data[1:], uint64(p.PTid))
		data = data[1+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.BackupTid))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.TruncateTid))
}

func (p *AnswerRecovery) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AnswerRecovery", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerRecovery.PTid", err)
		}
		p.PTid = PTid(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 20 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerRecovery.BackupTid", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("AnswerRecovery.BackupTid", l, 8)
	}
	p.BackupTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerRecovery.TruncateTid", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("AnswerRecovery.TruncateTid", l, 8)
	}
	p.TruncateTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	return 21 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 8. LastIDs

func (*LastIDs) neoMsgCode() uint16 {
	return 8
}

func (p *LastIDs) neoMsgEncodedLenN() int {
	return 0
}

func (p *LastIDs) neoMsgEncodeN(data []byte) {
}

func (p *LastIDs) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *LastIDs) neoMsgEncodedLenM() int {
	return 1
}

func (p *LastIDs) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *LastIDs) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"LastIDs", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 8 | answerBit. AnswerLastIDs

func (*AnswerLastIDs) neoMsgCode() uint16 {
	return 8 | answerBit
}

func (p *AnswerLastIDs) neoMsgEncodedLenN() int {
	return 16
}

func (p *AnswerLastIDs) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.LastOid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.LastTid))
}

func (p *AnswerLastIDs) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.LastOid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.LastTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerLastIDs) neoMsgEncodedLenM() int {
	return 21
}

func (p *AnswerLastIDs) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.LastOid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.LastTid))
}

func (p *AnswerLastIDs) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"AnswerLastIDs", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerLastIDs.LastOid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerLastIDs.LastOid", l, 8)
	}
	p.LastOid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerLastIDs.LastTid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AnswerLastIDs.LastTid", l, 8)
	}
	p.LastTid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 9. AskPartitionTable

func (*AskPartitionTable) neoMsgCode() uint16 {
	return 9
}

func (p *AskPartitionTable) neoMsgEncodedLenN() int {
	return 0
}

func (p *AskPartitionTable) neoMsgEncodeN(data []byte) {
}

func (p *AskPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *AskPartitionTable) neoMsgEncodedLenM() int {
	return 1
}

func (p *AskPartitionTable) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *AskPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"AskPartitionTable", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 9 | answerBit. AnswerPartitionTable

func (*AnswerPartitionTable) neoMsgCode() uint16 {
	return 9 | answerBit
}

func (p *AnswerPartitionTable) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		size += len((*a).CellList) * 5
	}
	return 16 + len(p.RowList)*4 + size
}

func (p *AnswerPartitionTable) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
	binary.BigEndian.PutUint32(data[8:], p.NumReplicas)
	{
		l := len(p.RowList)
		binary.BigEndian.PutUint32(data[12:], uint32(l))
		data = data[16:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			{
				l := len((*a).CellList)
				binary.BigEndian.PutUint32(data[0:], uint32(l))
				data = data[4:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
					(data[4:])[0] = uint8(int8((*a).State))
					data = data[5:]
				}
			}
		}
	}
}

func (p *AnswerPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 16 {
		goto overflow
	}
	p.PTid = PTid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.NumReplicas = binary.BigEndian.Uint32(data[8 : 8+4])
	{
		l := binary.BigEndian.Uint32(data[12 : 12+4])
		data = data[16:]
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 4 {
				goto overflow
			}
			{
				l := binary.BigEndian.Uint32(data[0 : 0+4])
				data = data[4:]
				if uint64(len(data)) < uint64(l)*5 {
					goto overflow
				}
				nread += uint64(l) * 5
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					(*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
					(*a).State = CellState(int8((data[4 : 4+1])[0]))
					data = data[5:]
				}
			}
		}
		nread += uint64(l) * 4
	}
	return 16 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerPartitionTable) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		for i := 0; i < len((*a).CellList); i++ {
			a := &(*a).CellList[i]
			size += msgpack.Int32Size(int32((*a).NID))
		}
		size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
	}
	return 1 + msgpack.Uint64Size(uint64(p.PTid)) + msgpack.Uint32Size(p.NumReplicas) + msgpack.ArrayHeadSize(len(p.RowList)) + len(p.RowList)*1 + size
}

func (p *AnswerPartitionTable) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint64(data[1:], uint64(p.PTid))
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.NumReplicas)
		data = data[0+n:]
	}
	{
		l := len(p.RowList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			{
				l := len((*a).CellList)
				n := msgpack.PutArrayHead(data[1:], l)
				data = data[1+n:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					data[0] = byte(msgpack.FixArray_4 | 2)
					{
						n := msgpack.PutInt32(data[1:], int32((*a).NID))
						data = data[1+n:]
					}
					data[0] = byte(msgpack.FixExt1)
					data[1] = 4
					if !(0 <= (*a).State && (*a).State <= 0x7f) {
						panic("(*a).State: invalid CellState enum value)")
					}
					data[2] = byte((*a).State)
					data = data[3:]
				}
			}
		}
	}
}

func (p *AnswerPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AnswerPartitionTable", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPartitionTable.PTid", err)
		}
		p.PTid = PTid(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPartitionTable.NumReplicas", err)
		}
		p.NumReplicas = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPartitionTable.RowList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"AnswerPartitionTable", op, opOk}
			}
			{
				data = data[1:]
				l, tail, err := msgp.ReadArrayHeaderBytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerPartitionTable.CellList", err)
				}
				nread += uint64(len(data) - len(tail))
				data = tail
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					if len(data) < 1 {
						goto overflow
					}
					if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
						return 0, &mstructDecodeError{"AnswerPartitionTable", op, opOk}
					}
					data = data[1:]
					{
						v, tail, err := msgp.ReadInt32Bytes(data)
						if err != nil {
							return 0, mdecodeErr("AnswerPartitionTable.NID", err)
						}
						(*a).NID = NodeID(v)
						nread += uint64(len(data) - len(tail))
						data = tail
					}
					if len(data) < 3 {
						goto overflow
					}
					if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
						return 0, mdecodeOpErr("AnswerPartitionTable.State", op, msgpack.FixExt1)
					}
					if enumType := data[1]; enumType != 4 {
						return 0, mdecodeEnumTypeErr("AnswerPartitionTable.State", enumType, 4)
					}
					{
						v := data[2]
						if !(0 <= v && v <= 0x7f) {
							return 0, mdecodeEnumValueErr("AnswerPartitionTable.State", v)
						}
						(*a).State = CellState(v)
					}
					data = data[3:]
				}
				nread += uint64(l) * 4
			}
		}
		nread += uint64(l) * 1
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 10. SendPartitionTable

func (*SendPartitionTable) neoMsgCode() uint16 {
	return 10
}

func (p *SendPartitionTable) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		size += len((*a).CellList) * 5
	}
	return 16 + len(p.RowList)*4 + size
}

func (p *SendPartitionTable) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
	binary.BigEndian.PutUint32(data[8:], p.NumReplicas)
	{
		l := len(p.RowList)
		binary.BigEndian.PutUint32(data[12:], uint32(l))
		data = data[16:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			{
				l := len((*a).CellList)
				binary.BigEndian.PutUint32(data[0:], uint32(l))
				data = data[4:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
					(data[4:])[0] = uint8(int8((*a).State))
					data = data[5:]
				}
			}
		}
	}
}

func (p *SendPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 16 {
		goto overflow
	}
	p.PTid = PTid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.NumReplicas = binary.BigEndian.Uint32(data[8 : 8+4])
	{
		l := binary.BigEndian.Uint32(data[12 : 12+4])
		data = data[16:]
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 4 {
				goto overflow
			}
			{
				l := binary.BigEndian.Uint32(data[0 : 0+4])
				data = data[4:]
				if uint64(len(data)) < uint64(l)*5 {
					goto overflow
				}
				nread += uint64(l) * 5
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					(*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
					(*a).State = CellState(int8((data[4 : 4+1])[0]))
					data = data[5:]
				}
			}
		}
		nread += uint64(l) * 4
	}
	return 16 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *SendPartitionTable) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		for i := 0; i < len((*a).CellList); i++ {
			a := &(*a).CellList[i]
			size += msgpack.Int32Size(int32((*a).NID))
		}
		size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
	}
	return 1 + msgpack.Uint64Size(uint64(p.PTid)) + msgpack.Uint32Size(p.NumReplicas) + msgpack.ArrayHeadSize(len(p.RowList)) + len(p.RowList)*1 + size
}

func (p *SendPartitionTable) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint64(data[1:], uint64(p.PTid))
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.NumReplicas)
		data = data[0+n:]
	}
	{
		l := len(p.RowList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			{
				l := len((*a).CellList)
				n := msgpack.PutArrayHead(data[1:], l)
				data = data[1+n:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					data[0] = byte(msgpack.FixArray_4 | 2)
					{
						n := msgpack.PutInt32(data[1:], int32((*a).NID))
						data = data[1+n:]
					}
					data[0] = byte(msgpack.FixExt1)
					data[1] = 4
					if !(0 <= (*a).State && (*a).State <= 0x7f) {
						panic("(*a).State: invalid CellState enum value)")
					}
					data[2] = byte((*a).State)
					data = data[3:]
				}
			}
		}
	}
}

func (p *SendPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"SendPartitionTable", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("SendPartitionTable.PTid", err)
		}
		p.PTid = PTid(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("SendPartitionTable.NumReplicas", err)
		}
		p.NumReplicas = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("SendPartitionTable.RowList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"SendPartitionTable", op, opOk}
			}
			{
				data = data[1:]
				l, tail, err := msgp.ReadArrayHeaderBytes(data)
				if err != nil {
					return 0, mdecodeErr("SendPartitionTable.CellList", err)
				}
				nread += uint64(len(data) - len(tail))
				data = tail
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					if len(data) < 1 {
						goto overflow
					}
					if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
						return 0, &mstructDecodeError{"SendPartitionTable", op, opOk}
					}
					data = data[1:]
					{
						v, tail, err := msgp.ReadInt32Bytes(data)
						if err != nil {
							return 0, mdecodeErr("SendPartitionTable.NID", err)
						}
						(*a).NID = NodeID(v)
						nread += uint64(len(data) - len(tail))
						data = tail
					}
					if len(data) < 3 {
						goto overflow
					}
					if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
						return 0, mdecodeOpErr("SendPartitionTable.State", op, msgpack.FixExt1)
					}
					if enumType := data[1]; enumType != 4 {
						return 0, mdecodeEnumTypeErr("SendPartitionTable.State", enumType, 4)
					}
					{
						v := data[2]
						if !(0 <= v && v <= 0x7f) {
							return 0, mdecodeEnumValueErr("SendPartitionTable.State", v)
						}
						(*a).State = CellState(v)
					}
					data = data[3:]
				}
				nread += uint64(l) * 4
			}
		}
		nread += uint64(l) * 1
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 11. NotifyPartitionChanges

func (*NotifyPartitionChanges) neoMsgCode() uint16 {
	return 11
}

func (p *NotifyPartitionChanges) neoMsgEncodedLenN() int {
	return 16 + len(p.CellList)*9
}

func (p *NotifyPartitionChanges) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
	binary.BigEndian.PutUint32(data[8:], p.NumReplicas)
	{
		l := len(p.CellList)
		binary.BigEndian.PutUint32(data[12:], uint32(l))
		data = data[16:]
		for i := 0; i < l; i++ {
			a := &p.CellList[i]
			binary.BigEndian.PutUint32(data[0:], (*a).Offset)
			binary.BigEndian.PutUint32(data[4:], uint32(int32((*a).CellInfo.NID)))
			(data[8:])[0] = uint8(int8((*a).CellInfo.State))
			data = data[9:]
		}
	}
}

func (p *NotifyPartitionChanges) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 16 {
		goto overflow
	}
	p.PTid = PTid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.NumReplicas = binary.BigEndian.Uint32(data[8 : 8+4])
	{
		l := binary.BigEndian.Uint32(data[12 : 12+4])
		data = data[16:]
		if uint64(len(data)) < uint64(l)*9 {
			goto overflow
		}
		nread += uint64(l) * 9
		p.CellList = make([]struct {
			Offset   uint32
			CellInfo CellInfo
		}, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.CellList[i]
			(*a).Offset = binary.BigEndian.Uint32(data[0 : 0+4])
			(*a).CellInfo.NID = NodeID(int32(binary.BigEndian.Uint32(data[4 : 4+4])))
			(*a).CellInfo.State = CellState(int8((data[8 : 8+1])[0]))
			data = data[9:]
		}
	}
	return 16 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotifyPartitionChanges) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.CellList); i++ {
		a := &p.CellList[i]
		size += msgpack.Uint32Size((*a).Offset) + msgpack.Int32Size(int32((*a).CellInfo.NID))
	}
	return 1 + msgpack.Uint64Size(uint64(p.PTid)) + msgpack.Uint32Size(p.NumReplicas) + msgpack.ArrayHeadSize(len(p.CellList)) + len(p.CellList)*5 + size
}

func (p *NotifyPartitionChanges) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint64(data[1:], uint64(p.PTid))
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.NumReplicas)
		data = data[0+n:]
	}
	{
		l := len(p.CellList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.CellList[i]
			data[0] = byte(msgpack.FixArray_4 | 2)
			{
				n := msgpack.PutUint32(data[1:], (*a).Offset)
				data = data[1+n:]
			}
			data[0] = byte(msgpack.FixArray_4 | 2)
			{
				n := msgpack.PutInt32(data[1:], int32((*a).CellInfo.NID))
				data = data[1+n:]
			}
			data[0] = byte(msgpack.FixExt1)
			data[1] = 4
			if !(0 <= (*a).CellInfo.State && (*a).CellInfo.State <= 0x7f) {
				panic("(*a).CellInfo.State: invalid CellState enum value)")
			}
			data[2] = byte((*a).CellInfo.State)
			data = data[3:]
		}
	}
}

func (p *NotifyPartitionChanges) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"NotifyPartitionChanges", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("NotifyPartitionChanges.PTid", err)
		}
		p.PTid = PTid(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("NotifyPartitionChanges.NumReplicas", err)
		}
		p.NumReplicas = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("NotifyPartitionChanges.CellList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.CellList = make([]struct {
			Offset   uint32
			CellInfo CellInfo
		}, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.CellList[i]
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
				return 0, &mstructDecodeError{"NotifyPartitionChanges", op, opOk}
			}
			data = data[1:]
			{
				v, tail, err := msgp.ReadUint32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("NotifyPartitionChanges.Offset", err)
				}
				(*a).Offset = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
				return 0, &mstructDecodeError{"NotifyPartitionChanges.CellInfo", op, opOk}
			}
			data = data[1:]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("NotifyPartitionChanges.CellInfo.NID", err)
				}
				(*a).CellInfo.NID = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			if len(data) < 3 {
				goto overflow
			}
			if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
				return 0, mdecodeOpErr("NotifyPartitionChanges.CellInfo.State", op, msgpack.FixExt1)
			}
			if enumType := data[1]; enumType != 4 {
				return 0, mdecodeEnumTypeErr("NotifyPartitionChanges.CellInfo.State", enumType, 4)
			}
			{
				v := data[2]
				if !(0 <= v && v <= 0x7f) {
					return 0, mdecodeEnumValueErr("NotifyPartitionChanges.CellInfo.State", v)
				}
				(*a).CellInfo.State = CellState(v)
			}
			data = data[3:]
		}
		nread += uint64(l) * 5
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 12. StartOperation

func (*StartOperation) neoMsgCode() uint16 {
	return 12
}

func (p *StartOperation) neoMsgEncodedLenN() int {
	return 1
}

func (p *StartOperation) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = bool2byte(p.Backup)
}

func (p *StartOperation) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.Backup = byte2bool((data[0 : 0+1])[0])
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *StartOperation) neoMsgEncodedLenM() int {
	return 2
}

func (p *StartOperation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bool(p.Backup))
}

func (p *StartOperation) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 2 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"StartOperation", op, opOk}
	}
	switch op := msgpack.Op(data[1]); op {
	default:
		return 0, mdecodeOpErr("StartOperation.Backup", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Backup = true
	case msgpack.False:
		p.Backup = false
	}
	return 2, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 13. StopOperation

func (*StopOperation) neoMsgCode() uint16 {
	return 13
}

func (p *StopOperation) neoMsgEncodedLenN() int {
	return 0
}

func (p *StopOperation) neoMsgEncodeN(data []byte) {
}

func (p *StopOperation) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *StopOperation) neoMsgEncodedLenM() int {
	return 1
}

func (p *StopOperation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *StopOperation) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"StopOperation", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 14. UnfinishedTransactions

func (*UnfinishedTransactions) neoMsgCode() uint16 {
	return 14
}

func (p *UnfinishedTransactions) neoMsgEncodedLenN() int {
	return 4 + len(p.RowList)*4
}

func (p *UnfinishedTransactions) neoMsgEncodeN(data []byte) {
	{
		l := len(p.RowList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			binary.BigEndian.PutUint32(data[0:], (*a).Offset)
			data = data[4:]
		}
	}
}

func (p *UnfinishedTransactions) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.RowList = make([]struct{ Offset uint32 }, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			(*a).Offset = binary.BigEndian.Uint32(data[0 : 0+4])
			data = data[4:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *UnfinishedTransactions) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		size += msgpack.Uint32Size((*a).Offset)
	}
	return 1 + msgpack.ArrayHeadSize(len(p.RowList)) + len(p.RowList)*1 + size
}

func (p *UnfinishedTransactions) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.RowList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			{
				n := msgpack.PutUint32(data[1:], (*a).Offset)
				data = data[1+n:]
			}
		}
	}
}

func (p *UnfinishedTransactions) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"UnfinishedTransactions", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("UnfinishedTransactions.RowList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.RowList = make([]struct{ Offset uint32 }, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"UnfinishedTransactions", op, opOk}
			}
			data = data[1:]
			{
				v, tail, err := msgp.ReadUint32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("UnfinishedTransactions.Offset", err)
				}
				(*a).Offset = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		nread += uint64(l) * 1
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 14 | answerBit. AnswerUnfinishedTransactions

func (*AnswerUnfinishedTransactions) neoMsgCode() uint16 {
	return 14 | answerBit
}

func (p *AnswerUnfinishedTransactions) neoMsgEncodedLenN() int {
	return 12 + len(p.TidList)*8
}

func (p *AnswerUnfinishedTransactions) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.MaxTID))
	{
		l := len(p.TidList)
		binary.BigEndian.PutUint32(data[8:], uint32(l))
		data = data[12:]
		for i := 0; i < l; i++ {
			a := &p.TidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a).UnfinishedTID))
			data = data[8:]
		}
	}
}

func (p *AnswerUnfinishedTransactions) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.TidList = make([]struct{ UnfinishedTID zodb.Tid }, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TidList[i]
			(*a).UnfinishedTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerUnfinishedTransactions) neoMsgEncodedLenM() int {
	return 11 + msgpack.ArrayHeadSize(len(p.TidList)) + len(p.TidList)*11
}

func (p *AnswerUnfinishedTransactions) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.MaxTID))
	{
		l := len(p.TidList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.TidList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			data[1] = byte(msgpack.Bin8)
			data[2] = 8
			binary.BigEndian.PutUint64(data[3:], uint64((*a).UnfinishedTID))
			data = data[11:]
		}
	}
}

func (p *AnswerUnfinishedTransactions) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"AnswerUnfinishedTransactions", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerUnfinishedTransactions.MaxTID", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerUnfinishedTransactions.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerUnfinishedTransactions.TidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*11 {
			goto overflow
		}
		nread += uint64(l) * 11
		p.TidList = make([]struct{ UnfinishedTID zodb.Tid }, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TidList[i]
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"AnswerUnfinishedTransactions", op, opOk}
			}
			if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerUnfinishedTransactions.UnfinishedTID", op, msgpack.Bin8)
			}
			if l := data[2]; l != 8 {
				return 0, mdecodeLen8Err("AnswerUnfinishedTransactions.UnfinishedTID", l, 8)
			}
			(*a).UnfinishedTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
			data = data[11:]
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 15. LockedTransactions

func (*LockedTransactions) neoMsgCode() uint16 {
	return 15
}

func (p *LockedTransactions) neoMsgEncodedLenN() int {
	return 0
}

func (p *LockedTransactions) neoMsgEncodeN(data []byte) {
}

func (p *LockedTransactions) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *LockedTransactions) neoMsgEncodedLenM() int {
	return 1
}

func (p *LockedTransactions) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *LockedTransactions) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"LockedTransactions", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 15 | answerBit. AnswerLockedTransactions

func (*AnswerLockedTransactions) neoMsgCode() uint16 {
	return 15 | answerBit
}

func (p *AnswerLockedTransactions) neoMsgEncodedLenN() int {
	return 4 + len(p.TidDict)*16
}

func (p *AnswerLockedTransactions) neoMsgEncodeN(data []byte) {
	{
		l := len(p.TidDict)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		keyv := make([]zodb.Tid, 0, l)
		for key := range p.TidDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			binary.BigEndian.PutUint64(data[0:], uint64(key))
			binary.BigEndian.PutUint64(data[8:], uint64(p.TidDict[key]))
			data = data[16:]
		}
	}
}

func (p *AnswerLockedTransactions) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*16 {
			goto overflow
		}
		nread += uint64(l) * 16
		p.TidDict = make(map[zodb.Tid]zodb.Tid, l)
		m := p.TidDict
		for i := 0; uint32(i) < l; i++ {
			var key zodb.Tid
			key = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			m[key] = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
			data = data[16:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerLockedTransactions) neoMsgEncodedLenM() int {
	return 1 + msgpack.MapHeadSize(len(p.TidDict)) + len(p.TidDict)*20
}

func (p *AnswerLockedTransactions) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.TidDict)
		n := msgpack.PutMapHead(data[1:], l)
		data = data[1+n:]
		keyv := make([]zodb.Tid, 0, l)
		for key := range p.TidDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64(key))
			data[10] = byte(msgpack.Bin8)
			data[11] = 8
			binary.BigEndian.PutUint64(data[12:], uint64(p.TidDict[key]))
			data = data[20:]
		}
	}
}

func (p *AnswerLockedTransactions) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerLockedTransactions", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadMapHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerLockedTransactions.TidDict", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*20 {
			goto overflow
		}
		nread += uint64(l) * 20
		p.TidDict = make(map[zodb.Tid]zodb.Tid, l)
		m := p.TidDict
		for i := 0; uint32(i) < l; i++ {
			var key zodb.Tid
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerLockedTransactions", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerLockedTransactions", l, 8)
			}
			key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerLockedTransactions", op, msgpack.Bin8)
			}
			if l := data[11]; l != 8 {
				return 0, mdecodeLen8Err("AnswerLockedTransactions", l, 8)
			}
			m[key] = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
			data = data[20:]
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 16. FinalTID

func (*FinalTID) neoMsgCode() uint16 {
	return 16
}

func (p *FinalTID) neoMsgEncodedLenN() int {
	return 8
}

func (p *FinalTID) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
}

func (p *FinalTID) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *FinalTID) neoMsgEncodedLenM() int {
	return 11
}

func (p *FinalTID) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTID))
}

func (p *FinalTID) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"FinalTID", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FinalTID.TTID", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("FinalTID.TTID", l, 8)
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 16 | answerBit. AnswerFinalTID

func (*AnswerFinalTID) neoMsgCode() uint16 {
	return 16 | answerBit
}

func (p *AnswerFinalTID) neoMsgEncodedLenN() int {
	return 8
}

func (p *AnswerFinalTID) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *AnswerFinalTID) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerFinalTID) neoMsgEncodedLenM() int {
	return 11
}

func (p *AnswerFinalTID) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *AnswerFinalTID) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerFinalTID", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerFinalTID.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerFinalTID.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 17. ValidateTransaction

func (*ValidateTransaction) neoMsgCode() uint16 {
	return 17
}

func (p *ValidateTransaction) neoMsgEncodedLenN() int {
	return 16
}

func (p *ValidateTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
}

func (p *ValidateTransaction) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *ValidateTransaction) neoMsgEncodedLenM() int {
	return 21
}

func (p *ValidateTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTID))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Tid))
}

func (p *ValidateTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"ValidateTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ValidateTransaction.TTID", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("ValidateTransaction.TTID", l, 8)
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ValidateTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("ValidateTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 18. BeginTransaction

func (*BeginTransaction) neoMsgCode() uint16 {
	return 18
}

func (p *BeginTransaction) neoMsgEncodedLenN() int {
	return 8
}

func (p *BeginTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *BeginTransaction) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *BeginTransaction) neoMsgEncodedLenM() int {
	return 11
}

func (p *BeginTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *BeginTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"BeginTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("BeginTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("BeginTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 18 | answerBit. AnswerBeginTransaction

func (*AnswerBeginTransaction) neoMsgCode() uint16 {
	return 18 | answerBit
}

func (p *AnswerBeginTransaction) neoMsgEncodedLenN() int {
	return 8
}

func (p *AnswerBeginTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *AnswerBeginTransaction) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerBeginTransaction) neoMsgEncodedLenM() int {
	return 11
}

func (p *AnswerBeginTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *AnswerBeginTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerBeginTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerBeginTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerBeginTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 19. FailedVote

func (*FailedVote) neoMsgCode() uint16 {
	return 19
}

func (p *FailedVote) neoMsgEncodedLenN() int {
	return 12 + len(p.NodeList)*4
}

func (p *FailedVote) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[8:], uint32(l))
		data = data[12:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a))))
			data = data[4:]
		}
	}
}

func (p *FailedVote) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			(*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			data = data[4:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *FailedVote) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.Int32Size(int32((*a)))
	}
	return 11 + msgpack.ArrayHeadSize(len(p.NodeList)) + size
}

func (p *FailedVote) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			{
				n := msgpack.PutInt32(data[0:], int32((*a)))
				data = data[0+n:]
			}
		}
	}
}

func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"FailedVote", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FailedVote.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("FailedVote.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("FailedVote.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("FailedVote", err)
				}
				(*a) = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 20. FinishTransaction

func (*FinishTransaction) neoMsgCode() uint16 {
	return 20
}

func (p *FinishTransaction) neoMsgEncodedLenN() int {
	return 16 + len(p.OIDList)*8 + len(p.CheckedList)*8
}

func (p *FinishTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := len(p.OIDList)
		binary.BigEndian.PutUint32(data[8:], uint32(l))
		data = data[12:]
		for i := 0; i < l; i++ {
			a := &p.OIDList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
	{
		l := len(p.CheckedList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.CheckedList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *FinishTransaction) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < 4+uint64(l)*8 {
			goto overflow
		}
		nread += 4 + uint64(l)*8
		p.OIDList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OIDList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.CheckedList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.CheckedList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *FinishTransaction) neoMsgEncodedLenM() int {
	return 11 + msgpack.ArrayHeadSize(len(p.OIDList)) + len(p.OIDList)*10 + msgpack.ArrayHeadSize(len(p.CheckedList)) + len(p.CheckedList)*10
}

func (p *FinishTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.OIDList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.OIDList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
	{
		l := len(p.CheckedList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.CheckedList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"FinishTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FinishTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("FinishTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("FinishTransaction.OIDList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OIDList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OIDList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("FinishTransaction", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("FinishTransaction", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("FinishTransaction.CheckedList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.CheckedList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.CheckedList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("FinishTransaction", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("FinishTransaction", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 20 | answerBit. AnswerTransactionFinished

func (*AnswerTransactionFinished) neoMsgCode() uint16 {
	return 20 | answerBit
}

func (p *AnswerTransactionFinished) neoMsgEncodedLenN() int {
	return 16
}

func (p *AnswerTransactionFinished) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
}

func (p *AnswerTransactionFinished) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerTransactionFinished) neoMsgEncodedLenM() int {
	return 21
}

func (p *AnswerTransactionFinished) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Tid))
}

func (p *AnswerTransactionFinished) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"AnswerTransactionFinished", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerTransactionFinished.TTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerTransactionFinished.TTid", l, 8)
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerTransactionFinished.Tid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AnswerTransactionFinished.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 21. LockInformation

func (*LockInformation) neoMsgCode() uint16 {
	return 21
}

func (p *LockInformation) neoMsgEncodedLenN() int {
	return 16
}

func (p *LockInformation) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
}

func (p *LockInformation) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *LockInformation) neoMsgEncodedLenM() int {
	return 21
}

func (p *LockInformation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Ttid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Tid))
}

func (p *LockInformation) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"LockInformation", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("LockInformation.Ttid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("LockInformation.Ttid", l, 8)
	}
	p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("LockInformation.Tid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("LockInformation.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 21 | answerBit. AnswerInformationLocked

func (*AnswerInformationLocked) neoMsgCode() uint16 {
	return 21 | answerBit
}

func (p *AnswerInformationLocked) neoMsgEncodedLenN() int {
	return 8
}

func (p *AnswerInformationLocked) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid))
}

func (p *AnswerInformationLocked) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerInformationLocked) neoMsgEncodedLenM() int {
	return 11
}

func (p *AnswerInformationLocked) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Ttid))
}

func (p *AnswerInformationLocked) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerInformationLocked", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerInformationLocked.Ttid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerInformationLocked.Ttid", l, 8)
	}
	p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 22. InvalidateObjects

func (*InvalidateObjects) neoMsgCode() uint16 {
	return 22
}

func (p *InvalidateObjects) neoMsgEncodedLenN() int {
	return 12 + len(p.OidList)*8
}

func (p *InvalidateObjects) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[8:], uint32(l))
		data = data[12:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *InvalidateObjects) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *InvalidateObjects) neoMsgEncodedLenM() int {
	return 11 + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *InvalidateObjects) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *InvalidateObjects) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"InvalidateObjects", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("InvalidateObjects.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("InvalidateObjects.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("InvalidateObjects.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("InvalidateObjects", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("InvalidateObjects", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 23. NotifyUnlockInformation

func (*NotifyUnlockInformation) neoMsgCode() uint16 {
	return 23
}

func (p *NotifyUnlockInformation) neoMsgEncodedLenN() int {
	return 8
}

func (p *NotifyUnlockInformation) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
}

func (p *NotifyUnlockInformation) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotifyUnlockInformation) neoMsgEncodedLenM() int {
	return 11
}

func (p *NotifyUnlockInformation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTID))
}

func (p *NotifyUnlockInformation) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"NotifyUnlockInformation", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("NotifyUnlockInformation.TTID", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("NotifyUnlockInformation.TTID", l, 8)
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 24. AskNewOIDs

func (*AskNewOIDs) neoMsgCode() uint16 {
	return 24
}

func (p *AskNewOIDs) neoMsgEncodedLenN() int {
	return 4
}

func (p *AskNewOIDs) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.NumOIDs)
}

func (p *AskNewOIDs) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	p.NumOIDs = binary.BigEndian.Uint32(data[0 : 0+4])
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AskNewOIDs) neoMsgEncodedLenM() int {
	return 1 + msgpack.Uint32Size(p.NumOIDs)
}

func (p *AskNewOIDs) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		n := msgpack.PutUint32(data[1:], p.NumOIDs)
		data = data[1+n:]
	}
}

func (p *AskNewOIDs) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AskNewOIDs", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AskNewOIDs.NumOIDs", err)
		}
		p.NumOIDs = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 24 | answerBit. AnswerNewOIDs

func (*AnswerNewOIDs) neoMsgCode() uint16 {
	return 24 | answerBit
}

func (p *AnswerNewOIDs) neoMsgEncodedLenN() int {
	return 4 + len(p.OidList)*8
}

func (p *AnswerNewOIDs) neoMsgEncodeN(data []byte) {
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AnswerNewOIDs) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerNewOIDs) neoMsgEncodedLenM() int {
	return 1 + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *AnswerNewOIDs) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AnswerNewOIDs) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerNewOIDs", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerNewOIDs.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerNewOIDs", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerNewOIDs", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 25. NotifyDeadlock

func (*NotifyDeadlock) neoMsgCode() uint16 {
	return 25
}

func (p *NotifyDeadlock) neoMsgEncodedLenN() int {
	return 16
}

func (p *NotifyDeadlock) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.LockingTid))
}

func (p *NotifyDeadlock) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotifyDeadlock) neoMsgEncodedLenM() int {
	return 21
}

func (p *NotifyDeadlock) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.LockingTid))
}

func (p *NotifyDeadlock) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"NotifyDeadlock", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("NotifyDeadlock.TTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("NotifyDeadlock.TTid", l, 8)
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("NotifyDeadlock.LockingTid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("NotifyDeadlock.LockingTid", l, 8)
	}
	p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 26. RebaseTransaction

func (*RebaseTransaction) neoMsgCode() uint16 {
	return 26
}

func (p *RebaseTransaction) neoMsgEncodedLenN() int {
	return 16
}

func (p *RebaseTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.LockingTid))
}

func (p *RebaseTransaction) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *RebaseTransaction) neoMsgEncodedLenM() int {
	return 21
}

func (p *RebaseTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.LockingTid))
}

func (p *RebaseTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"RebaseTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("RebaseTransaction.TTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("RebaseTransaction.TTid", l, 8)
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("RebaseTransaction.LockingTid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("RebaseTransaction.LockingTid", l, 8)
	}
	p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 26 | answerBit. AnswerRebaseTransaction

func (*AnswerRebaseTransaction) neoMsgCode() uint16 {
	return 26 | answerBit
}

func (p *AnswerRebaseTransaction) neoMsgEncodedLenN() int {
	return 4 + len(p.OidList)*8
}

func (p *AnswerRebaseTransaction) neoMsgEncodeN(data []byte) {
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AnswerRebaseTransaction) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerRebaseTransaction) neoMsgEncodedLenM() int {
	return 1 + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *AnswerRebaseTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AnswerRebaseTransaction) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerRebaseTransaction", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerRebaseTransaction.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerRebaseTransaction", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerRebaseTransaction", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 27. RebaseObject

func (*RebaseObject) neoMsgCode() uint16 {
	return 27
}

func (p *RebaseObject) neoMsgEncodedLenN() int {
	return 16
}

func (p *RebaseObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Oid))
}

func (p *RebaseObject) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *RebaseObject) neoMsgEncodedLenM() int {
	return 21
}

func (p *RebaseObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Oid))
}

func (p *RebaseObject) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"RebaseObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("RebaseObject.TTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("RebaseObject.TTid", l, 8)
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("RebaseObject.Oid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("RebaseObject.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 27 | answerBit. AnswerRebaseObject

func (*AnswerRebaseObject) neoMsgCode() uint16 {
	return 27 | answerBit
}

func (p *AnswerRebaseObject) neoMsgEncodedLenN() int {
	return 41 + len(p.Data.XData())
}

func (p *AnswerRebaseObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Serial))
	binary.BigEndian.PutUint64(data[8:], uint64(p.ConflictSerial))
	(data[16:])[0] = bool2byte(p.Compression)
	copy(data[17:], p.Checksum[:])
	{
		l := uint32(len(p.Data.XData()))
		binary.BigEndian.PutUint32(data[37:], l)
		data = data[41:]
		copy(data, p.Data.XData())
		data = data[l:]
	}
}

func (p *AnswerRebaseObject) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 41 {
		goto overflow
	}
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.ConflictSerial = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.Compression = byte2bool((data[16 : 16+1])[0])
	copy(p.Checksum[:], data[17:37])
	{
		l := binary.BigEndian.Uint32(data[37 : 37+4])
		data = data[41:]
		if uint64(len(data)) < uint64(l) {
			goto overflow
		}
		nread += uint64(l)
		p.Data = mem.BufAlloc(int(l))
		copy(p.Data.Data, data[:l])
		data = data[l:]
	}
	return 41 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerRebaseObject) neoMsgEncodedLenM() int {
	return 44 + msgpack.BinHeadSize(len(p.Data.XData())) + len(p.Data.XData())
}

func (p *AnswerRebaseObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 5)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Serial))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.ConflictSerial))
	data[21] = byte(msgpack.Bool(p.Compression))
	data[22] = byte(msgpack.Bin8)
	data[23] = 20
	copy(data[24:], p.Checksum[:])
	{
		l := len(p.Data.XData())
		n := msgpack.PutBinHead(data[44:], l)
		data = data[44+n:]
		copy(data, p.Data.XData())
		data = data[l:]
	}
}

func (p *AnswerRebaseObject) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 44 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
		return 0, &mstructDecodeError{"AnswerRebaseObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerRebaseObject.Serial", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerRebaseObject.Serial", l, 8)
	}
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerRebaseObject.ConflictSerial", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AnswerRebaseObject.ConflictSerial", l, 8)
	}
	p.ConflictSerial = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	switch op := msgpack.Op(data[21]); op {
	default:
		return 0, mdecodeOpErr("AnswerRebaseObject.Compression", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Compression = true
	case msgpack.False:
		p.Compression = false
	}
	if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerRebaseObject.Checksum", op, msgpack.Bin8)
	}
	if l := data[23]; l != 20 {
		return 0, mdecodeLen8Err("AnswerRebaseObject.Checksum", l, 20)
	}
	copy(p.Checksum[:], data[24:44])
	data = data[44:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AnswerRebaseObject.Data", err)
		}
		p.Data = mem.BufAlloc(len(b))
		copy(p.Data.Data, b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 44 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 28. StoreObject

func (*StoreObject) neoMsgCode() uint16 {
	return 28
}

func (p *StoreObject) neoMsgEncodedLenN() int {
	return 57 + len(p.Data)
}

func (p *StoreObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Serial))
	(data[16:])[0] = bool2byte(p.Compression)
	copy(data[17:], p.Checksum[:])
	{
		l := uint32(len(p.Data))
		binary.BigEndian.PutUint32(data[37:], l)
		data = data[41:]
		copy(data, p.Data)
		data = data[l:]
	}
	binary.BigEndian.PutUint64(data[0:], uint64(p.DataSerial))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
}

func (p *StoreObject) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 41 {
		goto overflow
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.Compression = byte2bool((data[16 : 16+1])[0])
	copy(p.Checksum[:], data[17:37])
	{
		l := binary.BigEndian.Uint32(data[37 : 37+4])
		data = data[41:]
		if uint64(len(data)) < 16+uint64(l) {
			goto overflow
		}
		nread += 16 + uint64(l)
		p.Data = make([]byte, l)
		copy(p.Data, data[:l])
		data = data[l:]
	}
	p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 41 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *StoreObject) neoMsgEncodedLenM() int {
	return 64 + msgpack.BinHeadSize(len(p.Data)) + len(p.Data)
}

func (p *StoreObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 7)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Oid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Serial))
	data[21] = byte(msgpack.Bool(p.Compression))
	data[22] = byte(msgpack.Bin8)
	data[23] = 20
	copy(data[24:], p.Checksum[:])
	{
		l := len(p.Data)
		n := msgpack.PutBinHead(data[44:], l)
		data = data[44+n:]
		copy(data, p.Data)
		data = data[l:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.DataSerial))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.Tid))
}

func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 44 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|7; op != opOk {
		return 0, &mstructDecodeError{"StoreObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("StoreObject.Oid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("StoreObject.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("StoreObject.Serial", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("StoreObject.Serial", l, 8)
	}
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	switch op := msgpack.Op(data[21]); op {
	default:
		return 0, mdecodeOpErr("StoreObject.Compression", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Compression = true
	case msgpack.False:
		p.Compression = false
	}
	if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("StoreObject.Checksum", op, msgpack.Bin8)
	}
	if l := data[23]; l != 20 {
		return 0, mdecodeLen8Err("StoreObject.Checksum", l, 20)
	}
	copy(p.Checksum[:], data[24:44])
	data = data[44:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("StoreObject.Data", err)
		}
		p.Data = make([]byte, len(b))
		copy(p.Data, b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 20 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("StoreObject.DataSerial", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("StoreObject.DataSerial", l, 8)
	}
	p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("StoreObject.Tid", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("StoreObject.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	return 64 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 28 | answerBit. AnswerStoreObject

func (*AnswerStoreObject) neoMsgCode() uint16 {
	return 28 | answerBit
}

func (p *AnswerStoreObject) neoMsgEncodedLenN() int {
	return 8
}

func (p *AnswerStoreObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Conflict))
}

func (p *AnswerStoreObject) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerStoreObject) neoMsgEncodedLenM() int {
	return 11
}

func (p *AnswerStoreObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Conflict))
}

func (p *AnswerStoreObject) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerStoreObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerStoreObject.Conflict", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerStoreObject.Conflict", l, 8)
	}
	p.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 29. AbortTransaction

func (*AbortTransaction) neoMsgCode() uint16 {
	return 29
}

func (p *AbortTransaction) neoMsgEncodedLenN() int {
	return 12 + len(p.NodeList)*4
}

func (p *AbortTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[8:], uint32(l))
		data = data[12:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a))))
			data = data[4:]
		}
	}
}

func (p *AbortTransaction) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			(*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			data = data[4:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AbortTransaction) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.Int32Size(int32((*a)))
	}
	return 11 + msgpack.ArrayHeadSize(len(p.NodeList)) + size
}

func (p *AbortTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			{
				n := msgpack.PutInt32(data[0:], int32((*a)))
				data = data[0+n:]
			}
		}
	}
}

func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"AbortTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AbortTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AbortTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AbortTransaction.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("AbortTransaction", err)
				}
				(*a) = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 30. StoreTransaction

func (*StoreTransaction) neoMsgCode() uint16 {
	return 30
}

func (p *StoreTransaction) neoMsgEncodedLenN() int {
	return 24 + len(p.User) + len(p.Description) + len(p.Extension) + len(p.OidList)*8
}

func (p *StoreTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := uint32(len(p.User))
		binary.BigEndian.PutUint32(data[8:], l)
		data = data[12:]
		copy(data, p.User)
		data = data[l:]
	}
	{
		l := uint32(len(p.Description))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.Description)
		data = data[l:]
	}
	{
		l := uint32(len(p.Extension))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.Extension)
		data = data[l:]
	}
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *StoreTransaction) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.User = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.Description = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.Extension = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *StoreTransaction) neoMsgEncodedLenM() int {
	return 11 + msgpack.BinHeadSize(len(p.User)) + len(p.User) + msgpack.BinHeadSize(len(p.Description)) + len(p.Description) + msgpack.BinHeadSize(len(p.Extension)) + len(p.Extension) + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *StoreTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 5)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.User)
		n := msgpack.PutBinHead(data[11:], l)
		data = data[11+n:]
		copy(data, p.User)
		data = data[l:]
	}
	{
		l := len(p.Description)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.Description)
		data = data[l:]
	}
	{
		l := len(p.Extension)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.Extension)
		data = data[l:]
	}
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *StoreTransaction) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
		return 0, &mstructDecodeError{"StoreTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("StoreTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("StoreTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	data = data[11:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("StoreTransaction.User", err)
		}
		p.User = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("StoreTransaction.Description", err)
		}
		p.Description = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("StoreTransaction.Extension", err)
		}
		p.Extension = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("StoreTransaction.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("StoreTransaction", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("StoreTransaction", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 30 | answerBit. AnswerStoreTransaction

func (*AnswerStoreTransaction) neoMsgCode() uint16 {
	return 30 | answerBit
}

func (p *AnswerStoreTransaction) neoMsgEncodedLenN() int {
	return 0
}

func (p *AnswerStoreTransaction) neoMsgEncodeN(data []byte) {
}

func (p *AnswerStoreTransaction) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *AnswerStoreTransaction) neoMsgEncodedLenM() int {
	return 1
}

func (p *AnswerStoreTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *AnswerStoreTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"AnswerStoreTransaction", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 31. VoteTransaction

func (*VoteTransaction) neoMsgCode() uint16 {
	return 31
}

func (p *VoteTransaction) neoMsgEncodedLenN() int {
	return 8
}

func (p *VoteTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *VoteTransaction) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *VoteTransaction) neoMsgEncodedLenM() int {
	return 11
}

func (p *VoteTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *VoteTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"VoteTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("VoteTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("VoteTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 31 | answerBit. AnswerVoteTransaction

func (*AnswerVoteTransaction) neoMsgCode() uint16 {
	return 31 | answerBit
}

func (p *AnswerVoteTransaction) neoMsgEncodedLenN() int {
	return 0
}

func (p *AnswerVoteTransaction) neoMsgEncodeN(data []byte) {
}

func (p *AnswerVoteTransaction) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *AnswerVoteTransaction) neoMsgEncodedLenM() int {
	return 1
}

func (p *AnswerVoteTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *AnswerVoteTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"AnswerVoteTransaction", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 32. GetObject

func (*GetObject) neoMsgCode() uint16 {
	return 32
}

func (p *GetObject) neoMsgEncodedLenN() int {
	return 24
}

func (p *GetObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.At))
	binary.BigEndian.PutUint64(data[16:], uint64(p.Before))
}

func (p *GetObject) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 24 {
		goto overflow
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.At = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.Before = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	return 24, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *GetObject) neoMsgEncodedLenM() int {
	return 31
}

func (p *GetObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Oid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.At))
	data[21] = byte(msgpack.Bin8)
	data[22] = 8
	binary.BigEndian.PutUint64(data[23:], uint64(p.Before))
}

func (p *GetObject) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 31 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"GetObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("GetObject.Oid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("GetObject.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("GetObject.At", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("GetObject.At", l, 8)
	}
	p.At = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	if op := msgpack.Op(data[21]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("GetObject.Before", op, msgpack.Bin8)
	}
	if l := data[22]; l != 8 {
		return 0, mdecodeLen8Err("GetObject.Before", l, 8)
	}
	p.Before = zodb.Tid(binary.BigEndian.Uint64(data[23:]))
	return 31, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 32 | answerBit. AnswerObject

func (*AnswerObject) neoMsgCode() uint16 {
	return 32 | answerBit
}

func (p *AnswerObject) neoMsgEncodedLenN() int {
	return 57 + len(p.Data.XData())
}

func (p *AnswerObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Serial))
	binary.BigEndian.PutUint64(data[16:], uint64(p.NextSerial))
	(data[24:])[0] = bool2byte(p.Compression)
	copy(data[25:], p.Checksum[:])
	{
		l := uint32(len(p.Data.XData()))
		binary.BigEndian.PutUint32(data[45:], l)
		data = data[49:]
		copy(data, p.Data.XData())
		data = data[l:]
	}
	binary.BigEndian.PutUint64(data[0:], uint64(p.DataSerial))
}

func (p *AnswerObject) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 49 {
		goto overflow
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.NextSerial = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	p.Compression = byte2bool((data[24 : 24+1])[0])
	copy(p.Checksum[:], data[25:45])
	{
		l := binary.BigEndian.Uint32(data[45 : 45+4])
		data = data[49:]
		if uint64(len(data)) < 8+uint64(l) {
			goto overflow
		}
		nread += 8 + uint64(l)
		p.Data = mem.BufAlloc(int(l))
		copy(p.Data.Data, data[:l])
		data = data[l:]
	}
	p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 49 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerObject) neoMsgEncodedLenM() int {
	return 64 + msgpack.BinHeadSize(len(p.Data.XData())) + len(p.Data.XData())
}

func (p *AnswerObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 7)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Oid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Serial))
	data[21] = byte(msgpack.Bin8)
	data[22] = 8
	binary.BigEndian.PutUint64(data[23:], uint64(p.NextSerial))
	data[31] = byte(msgpack.Bool(p.Compression))
	data[32] = byte(msgpack.Bin8)
	data[33] = 20
	copy(data[34:], p.Checksum[:])
	{
		l := len(p.Data.XData())
		n := msgpack.PutBinHead(data[54:], l)
		data = data[54+n:]
		copy(data, p.Data.XData())
		data = data[l:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.DataSerial))
}

func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 54 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|7; op != opOk {
		return 0, &mstructDecodeError{"AnswerObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerObject.Oid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerObject.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerObject.Serial", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AnswerObject.Serial", l, 8)
	}
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	if op := msgpack.Op(data[21]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerObject.NextSerial", op, msgpack.Bin8)
	}
	if l := data[22]; l != 8 {
		return 0, mdecodeLen8Err("AnswerObject.NextSerial", l, 8)
	}
	p.NextSerial = zodb.Tid(binary.BigEndian.Uint64(data[23:]))
	switch op := msgpack.Op(data[31]); op {
	default:
		return 0, mdecodeOpErr("AnswerObject.Compression", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Compression = true
	case msgpack.False:
		p.Compression = false
	}
	if op := msgpack.Op(data[32]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerObject.Checksum", op, msgpack.Bin8)
	}
	if l := data[33]; l != 20 {
		return 0, mdecodeLen8Err("AnswerObject.Checksum", l, 20)
	}
	copy(p.Checksum[:], data[34:54])
	data = data[54:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AnswerObject.Data", err)
		}
		p.Data = mem.BufAlloc(len(b))
		copy(p.Data.Data, b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 10 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerObject.DataSerial", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("AnswerObject.DataSerial", l, 8)
	}
	p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	return 64 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 33. AskTIDs

func (*AskTIDs) neoMsgCode() uint16 {
	return 33
}

func (p *AskTIDs) neoMsgEncodedLenN() int {
	return 20
}

func (p *AskTIDs) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], p.First)
	binary.BigEndian.PutUint64(data[8:], p.Last)
	binary.BigEndian.PutUint32(data[16:], p.Partition)
}

func (p *AskTIDs) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 20 {
		goto overflow
	}
	p.First = binary.BigEndian.Uint64(data[0 : 0+8])
	p.Last = binary.BigEndian.Uint64(data[8 : 8+8])
	p.Partition = binary.BigEndian.Uint32(data[16 : 16+4])
	return 20, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AskTIDs) neoMsgEncodedLenM() int {
	return 1 + msgpack.Uint64Size(p.First) + msgpack.Uint64Size(p.Last) + msgpack.Uint32Size(p.Partition)
}

func (p *AskTIDs) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint64(data[1:], p.First)
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint64(data[0:], p.Last)
		data = data[0+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.Partition)
		data = data[0+n:]
	}
}

func (p *AskTIDs) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AskTIDs", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AskTIDs.First", err)
		}
		p.First = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AskTIDs.Last", err)
		}
		p.Last = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AskTIDs.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 33 | answerBit. AnswerTIDs

func (*AnswerTIDs) neoMsgCode() uint16 {
	return 33 | answerBit
}

func (p *AnswerTIDs) neoMsgEncodedLenN() int {
	return 4 + len(p.TIDList)*8
}

func (p *AnswerTIDs) neoMsgEncodeN(data []byte) {
	{
		l := len(p.TIDList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.TIDList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AnswerTIDs) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.TIDList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TIDList[i]
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerTIDs) neoMsgEncodedLenM() int {
	return 1 + msgpack.ArrayHeadSize(len(p.TIDList)) + len(p.TIDList)*10
}

func (p *AnswerTIDs) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.TIDList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.TIDList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AnswerTIDs) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerTIDs", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTIDs.TIDList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.TIDList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TIDList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerTIDs", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerTIDs", l, 8)
			}
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 34. TransactionInformation

func (*TransactionInformation) neoMsgCode() uint16 {
	return 34
}

func (p *TransactionInformation) neoMsgEncodedLenN() int {
	return 8
}

func (p *TransactionInformation) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *TransactionInformation) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *TransactionInformation) neoMsgEncodedLenM() int {
	return 11
}

func (p *TransactionInformation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *TransactionInformation) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"TransactionInformation", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("TransactionInformation.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("TransactionInformation.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 34 | answerBit. AnswerTransactionInformation

func (*AnswerTransactionInformation) neoMsgCode() uint16 {
	return 34 | answerBit
}

func (p *AnswerTransactionInformation) neoMsgEncodedLenN() int {
	return 25 + len(p.User) + len(p.Description) + len(p.Extension) + len(p.OidList)*8
}

func (p *AnswerTransactionInformation) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := uint32(len(p.User))
		binary.BigEndian.PutUint32(data[8:], l)
		data = data[12:]
		copy(data, p.User)
		data = data[l:]
	}
	{
		l := uint32(len(p.Description))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.Description)
		data = data[l:]
	}
	{
		l := uint32(len(p.Extension))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.Extension)
		data = data[l:]
	}
	(data[0:])[0] = bool2byte(p.Packed)
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[1:], uint32(l))
		data = data[5:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AnswerTransactionInformation) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.User = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.Description = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 5+uint64(l) {
			goto overflow
		}
		nread += 5 + uint64(l)
		p.Extension = string(data[:l])
		data = data[l:]
	}
	p.Packed = byte2bool((data[0 : 0+1])[0])
	{
		l := binary.BigEndian.Uint32(data[1 : 1+4])
		data = data[5:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerTransactionInformation) neoMsgEncodedLenM() int {
	return 12 + msgpack.BinHeadSize(len(p.User)) + len(p.User) + msgpack.BinHeadSize(len(p.Description)) + len(p.Description) + msgpack.BinHeadSize(len(p.Extension)) + len(p.Extension) + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *AnswerTransactionInformation) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 6)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.User)
		n := msgpack.PutBinHead(data[11:], l)
		data = data[11+n:]
		copy(data, p.User)
		data = data[l:]
	}
	{
		l := len(p.Description)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.Description)
		data = data[l:]
	}
	{
		l := len(p.Extension)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.Extension)
		data = data[l:]
	}
	data[0] = byte(msgpack.Bool(p.Packed))
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AnswerTransactionInformation) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|6; op != opOk {
		return 0, &mstructDecodeError{"AnswerTransactionInformation", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerTransactionInformation.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerTransactionInformation.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	data = data[11:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTransactionInformation.User", err)
		}
		p.User = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTransactionInformation.Description", err)
		}
		p.Description = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTransactionInformation.Extension", err)
		}
		p.Extension = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 1 {
		goto overflow
	}
	switch op := msgpack.Op(data[0]); op {
	default:
		return 0, mdecodeOpErr("AnswerTransactionInformation.Packed", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Packed = true
	case msgpack.False:
		p.Packed = false
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTransactionInformation.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerTransactionInformation", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerTransactionInformation", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 35. ObjectHistory

func (*ObjectHistory) neoMsgCode() uint16 {
	return 35
}

func (p *ObjectHistory) neoMsgEncodedLenN() int {
	return 24
}

func (p *ObjectHistory) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
	binary.BigEndian.PutUint64(data[8:], p.First)
	binary.BigEndian.PutUint64(data[16:], p.Last)
}

func (p *ObjectHistory) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 24 {
		goto overflow
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.First = binary.BigEndian.Uint64(data[8 : 8+8])
	p.Last = binary.BigEndian.Uint64(data[16 : 16+8])
	return 24, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *ObjectHistory) neoMsgEncodedLenM() int {
	return 11 + msgpack.Uint64Size(p.First) + msgpack.Uint64Size(p.Last)
}

func (p *ObjectHistory) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Oid))
	{
		n := msgpack.PutUint64(data[11:], p.First)
		data = data[11+n:]
	}
	{
		n := msgpack.PutUint64(data[0:], p.Last)
		data = data[0+n:]
	}
}

func (p *ObjectHistory) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"ObjectHistory", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ObjectHistory.Oid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("ObjectHistory.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	data = data[11:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("ObjectHistory.First", err)
		}
		p.First = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("ObjectHistory.Last", err)
		}
		p.Last = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 35 | answerBit. AnswerObjectHistory

func (*AnswerObjectHistory) neoMsgCode() uint16 {
	return 35 | answerBit
}

func (p *AnswerObjectHistory) neoMsgEncodedLenN() int {
	return 12 + len(p.HistoryList)*12
}

func (p *AnswerObjectHistory) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
	{
		l := len(p.HistoryList)
		binary.BigEndian.PutUint32(data[8:], uint32(l))
		data = data[12:]
		for i := 0; i < l; i++ {
			a := &p.HistoryList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a).Serial))
			binary.BigEndian.PutUint32(data[8:], (*a).Size)
			data = data[12:]
		}
	}
}

func (p *AnswerObjectHistory) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < uint64(l)*12 {
			goto overflow
		}
		nread += uint64(l) * 12
		p.HistoryList = make([]struct {
			Serial zodb.Tid
			Size   uint32
		}, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.HistoryList[i]
			(*a).Serial = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			(*a).Size = binary.BigEndian.Uint32(data[8 : 8+4])
			data = data[12:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerObjectHistory) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.HistoryList); i++ {
		a := &p.HistoryList[i]
		size += msgpack.Uint32Size((*a).Size)
	}
	return 11 + msgpack.ArrayHeadSize(len(p.HistoryList)) + len(p.HistoryList)*11 + size
}

func (p *AnswerObjectHistory) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Oid))
	{
		l := len(p.HistoryList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.HistoryList[i]
			data[0] = byte(msgpack.FixArray_4 | 2)
			data[1] = byte(msgpack.Bin8)
			data[2] = 8
			binary.BigEndian.PutUint64(data[3:], uint64((*a).Serial))
			{
				n := msgpack.PutUint32(data[11:], (*a).Size)
				data = data[11+n:]
			}
		}
	}
}

func (p *AnswerObjectHistory) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"AnswerObjectHistory", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerObjectHistory.Oid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerObjectHistory.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerObjectHistory.HistoryList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.HistoryList = make([]struct {
			Serial zodb.Tid
			Size   uint32
		}, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.HistoryList[i]
			if len(data) < 11 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
				return 0, &mstructDecodeError{"AnswerObjectHistory", op, opOk}
			}
			if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerObjectHistory.Serial", op, msgpack.Bin8)
			}
			if l := data[2]; l != 8 {
				return 0, mdecodeLen8Err("AnswerObjectHistory.Serial", l, 8)
			}
			(*a).Serial = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
			data = data[11:]
			{
				v, tail, err := msgp.ReadUint32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerObjectHistory.Size", err)
				}
				(*a).Size = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		nread += uint64(l) * 11
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 36. PartitionList

func (*PartitionList) neoMsgCode() uint16 {
	return 36
}

func (p *PartitionList) neoMsgEncodedLenN() int {
	return 12
}

func (p *PartitionList) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.MinOffset)
	binary.BigEndian.PutUint32(data[4:], p.MaxOffset)
	binary.BigEndian.PutUint32(data[8:], uint32(int32(p.NodeID)))
}

func (p *PartitionList) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 12 {
		goto overflow
	}
	p.MinOffset = binary.BigEndian.Uint32(data[0 : 0+4])
	p.MaxOffset = binary.BigEndian.Uint32(data[4 : 4+4])
	p.NodeID = NodeID(int32(binary.BigEndian.Uint32(data[8 : 8+4])))
	return 12, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *PartitionList) neoMsgEncodedLenM() int {
	return 1 + msgpack.Uint32Size(p.MinOffset) + msgpack.Uint32Size(p.MaxOffset) + msgpack.Int32Size(int32(p.NodeID))
}

func (p *PartitionList) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint32(data[1:], p.MinOffset)
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.MaxOffset)
		data = data[0+n:]
	}
	{
		n := msgpack.PutInt32(data[0:], int32(p.NodeID))
		data = data[0+n:]
	}
}

func (p *PartitionList) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"PartitionList", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("PartitionList.MinOffset", err)
		}
		p.MinOffset = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("PartitionList.MaxOffset", err)
		}
		p.MaxOffset = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("PartitionList.NodeID", err)
		}
		p.NodeID = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 36 | answerBit. AnswerPartitionList

func (*AnswerPartitionList) neoMsgCode() uint16 {
	return 36 | answerBit
}

func (p *AnswerPartitionList) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		size += len((*a).CellList) * 5
	}
	return 16 + len(p.RowList)*4 + size
}

func (p *AnswerPartitionList) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
	binary.BigEndian.PutUint32(data[8:], p.NumReplicas)
	{
		l := len(p.RowList)
		binary.BigEndian.PutUint32(data[12:], uint32(l))
		data = data[16:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			{
				l := len((*a).CellList)
				binary.BigEndian.PutUint32(data[0:], uint32(l))
				data = data[4:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
					(data[4:])[0] = uint8(int8((*a).State))
					data = data[5:]
				}
			}
		}
	}
}

func (p *AnswerPartitionList) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 16 {
		goto overflow
	}
	p.PTid = PTid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.NumReplicas = binary.BigEndian.Uint32(data[8 : 8+4])
	{
		l := binary.BigEndian.Uint32(data[12 : 12+4])
		data = data[16:]
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 4 {
				goto overflow
			}
			{
				l := binary.BigEndian.Uint32(data[0 : 0+4])
				data = data[4:]
				if uint64(len(data)) < uint64(l)*5 {
					goto overflow
				}
				nread += uint64(l) * 5
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					(*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
					(*a).State = CellState(int8((data[4 : 4+1])[0]))
					data = data[5:]
				}
			}
		}
		nread += uint64(l) * 4
	}
	return 16 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerPartitionList) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		for i := 0; i < len((*a).CellList); i++ {
			a := &(*a).CellList[i]
			size += msgpack.Int32Size(int32((*a).NID))
		}
		size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
	}
	return 1 + msgpack.Uint64Size(uint64(p.PTid)) + msgpack.Uint32Size(p.NumReplicas) + msgpack.ArrayHeadSize(len(p.RowList)) + len(p.RowList)*1 + size
}

func (p *AnswerPartitionList) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint64(data[1:], uint64(p.PTid))
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.NumReplicas)
		data = data[0+n:]
	}
	{
		l := len(p.RowList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			{
				l := len((*a).CellList)
				n := msgpack.PutArrayHead(data[1:], l)
				data = data[1+n:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					data[0] = byte(msgpack.FixArray_4 | 2)
					{
						n := msgpack.PutInt32(data[1:], int32((*a).NID))
						data = data[1+n:]
					}
					data[0] = byte(msgpack.FixExt1)
					data[1] = 4
					if !(0 <= (*a).State && (*a).State <= 0x7f) {
						panic("(*a).State: invalid CellState enum value)")
					}
					data[2] = byte((*a).State)
					data = data[3:]
				}
			}
		}
	}
}

func (p *AnswerPartitionList) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AnswerPartitionList", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint64Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPartitionList.PTid", err)
		}
		p.PTid = PTid(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPartitionList.NumReplicas", err)
		}
		p.NumReplicas = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerPartitionList.RowList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"AnswerPartitionList", op, opOk}
			}
			{
				data = data[1:]
				l, tail, err := msgp.ReadArrayHeaderBytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerPartitionList.CellList", err)
				}
				nread += uint64(len(data) - len(tail))
				data = tail
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					if len(data) < 1 {
						goto overflow
					}
					if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
						return 0, &mstructDecodeError{"AnswerPartitionList", op, opOk}
					}
					data = data[1:]
					{
						v, tail, err := msgp.ReadInt32Bytes(data)
						if err != nil {
							return 0, mdecodeErr("AnswerPartitionList.NID", err)
						}
						(*a).NID = NodeID(v)
						nread += uint64(len(data) - len(tail))
						data = tail
					}
					if len(data) < 3 {
						goto overflow
					}
					if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
						return 0, mdecodeOpErr("AnswerPartitionList.State", op, msgpack.FixExt1)
					}
					if enumType := data[1]; enumType != 4 {
						return 0, mdecodeEnumTypeErr("AnswerPartitionList.State", enumType, 4)
					}
					{
						v := data[2]
						if !(0 <= v && v <= 0x7f) {
							return 0, mdecodeEnumValueErr("AnswerPartitionList.State", v)
						}
						(*a).State = CellState(v)
					}
					data = data[3:]
				}
				nread += uint64(l) * 4
			}
		}
		nread += uint64(l) * 1
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 37. NodeList

func (*NodeList) neoMsgCode() uint16 {
	return 37
}

func (p *NodeList) neoMsgEncodedLenN() int {
	return 1
}

func (p *NodeList) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = uint8(int8(p.NodeType))
}

func (p *NodeList) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.NodeType = NodeType(int8((data[0 : 0+1])[0]))
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NodeList) neoMsgEncodedLenM() int {
	return 4
}

func (p *NodeList) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 2
	if !(0 <= p.NodeType && p.NodeType <= 0x7f) {
		panic("p.NodeType: invalid NodeType enum value)")
	}
	data[3] = byte(p.NodeType)
}

func (p *NodeList) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"NodeList", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("NodeList.NodeType", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 2 {
		return 0, mdecodeEnumTypeErr("NodeList.NodeType", enumType, 2)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("NodeList.NodeType", v)
		}
		p.NodeType = NodeType(v)
	}
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 37 | answerBit. AnswerNodeList

func (*AnswerNodeList) neoMsgCode() uint16 {
	return 37 | answerBit
}

func (p *AnswerNodeList) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += (*a).Addr.neoEncodedLenN() + (*a).IdTime.neoEncodedLenN()
	}
	return 4 + len(p.NodeList)*6 + size
}

func (p *AnswerNodeList) neoMsgEncodeN(data []byte) {
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			(data[0:])[0] = uint8(int8((*a).Type))
			{
				n := (*a).Addr.neoEncodeN(data[1:])
				data = data[1+n:]
			}
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
			(data[4:])[0] = uint8(int8((*a).State))
			{
				n := (*a).IdTime.neoEncodeN(data[5:])
				data = data[5+n:]
			}
		}
	}
}

func (p *AnswerNodeList) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		p.NodeList = make([]NodeInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			if len(data) < 1 {
				goto overflow
			}
			(*a).Type = NodeType(int8((data[0 : 0+1])[0]))
			data = data[1:]
			{
				n, ok := (*a).Addr.neoDecodeN(data)
				if !ok {
					goto overflow
				}
				data = data[n:]
				nread += n
			}
			if len(data) < 5 {
				goto overflow
			}
			(*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			(*a).State = NodeState(int8((data[4 : 4+1])[0]))
			data = data[5:]
			{
				n, ok := (*a).IdTime.neoDecodeN(data)
				if !ok {
					goto overflow
				}
				data = data[n:]
				nread += n
			}
		}
		nread += uint64(l) * 6
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerNodeList) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.BinHeadSize(len((*a).Addr.Host)) + len((*a).Addr.Host) + msgpack.Uint16Size((*a).Addr.Port) + msgpack.Int32Size(int32((*a).NID))
	}
	return 1 + msgpack.ArrayHeadSize(len(p.NodeList)) + len(p.NodeList)*17 + size
}

func (p *AnswerNodeList) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			data[0] = byte(msgpack.FixArray_4 | 5)
			data[1] = byte(msgpack.FixExt1)
			data[2] = 2
			if !(0 <= (*a).Type && (*a).Type <= 0x7f) {
				panic("(*a).Type: invalid NodeType enum value)")
			}
			data[3] = byte((*a).Type)
			data[4] = byte(msgpack.FixArray_4 | 2)
			{
				l := len((*a).Addr.Host)
				n := msgpack.PutBinHead(data[5:], l)
				data = data[5+n:]
				copy(data, (*a).Addr.Host)
				data = data[l:]
			}
			{
				n := msgpack.PutUint16(data[0:], (*a).Addr.Port)
				data = data[0+n:]
			}
			{
				n := msgpack.PutInt32(data[0:], int32((*a).NID))
				data = data[0+n:]
			}
			data[0] = byte(msgpack.FixExt1)
			data[1] = 3
			if !(0 <= (*a).State && (*a).State <= 0x7f) {
				panic("(*a).State: invalid NodeState enum value)")
			}
			data[2] = byte((*a).State)
			data[3] = byte(msgpack.Float64)
			float64_neoEncode(data[4:], float64((*a).IdTime))
			data = data[12:]
		}
	}
}

func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerNodeList", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerNodeList.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			if len(data) < 5 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
				return 0, &mstructDecodeError{"AnswerNodeList", op, opOk}
			}
			if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
				return 0, mdecodeOpErr("AnswerNodeList.Type", op, msgpack.FixExt1)
			}
			if enumType := data[2]; enumType != 2 {
				return 0, mdecodeEnumTypeErr("AnswerNodeList.Type", enumType, 2)
			}
			{
				v := data[3]
				if !(0 <= v && v <= 0x7f) {
					return 0, mdecodeEnumValueErr("AnswerNodeList.Type", v)
				}
				(*a).Type = NodeType(v)
			}
			if op, opOk := msgpack.Op(data[4]), msgpack.FixArray_4|2; op != opOk {
				return 0, &mstructDecodeError{"AnswerNodeList.Addr", op, opOk}
			}
			data = data[5:]
			{
				b, tail, err := msgp.ReadBytesZC(data)
				if err != nil {
					return 0, mdecodeErr("AnswerNodeList.Addr.Host", err)
				}
				(*a).Addr.Host = string(b)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				v, tail, err := msgp.ReadUint16Bytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerNodeList.Addr.Port", err)
				}
				(*a).Addr.Port = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerNodeList.NID", err)
				}
				(*a).NID = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			if len(data) < 3 {
				goto overflow
			}
			if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
				return 0, mdecodeOpErr("AnswerNodeList.State", op, msgpack.FixExt1)
			}
			if enumType := data[1]; enumType != 3 {
				return 0, mdecodeEnumTypeErr("AnswerNodeList.State", enumType, 3)
			}
			{
				v := data[2]
				if !(0 <= v && v <= 0x7f) {
					return 0, mdecodeEnumValueErr("AnswerNodeList.State", v)
				}
				(*a).State = NodeState(v)
			}
			data = data[3:]
			{
				v, tail, err := msgp.ReadFloat64Bytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerNodeList.IdTime", err)
				}
				(*a).IdTime = IdTime(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		nread += uint64(l) * 8
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 38. SetNodeState

func (*SetNodeState) neoMsgCode() uint16 {
	return 38
}

func (p *SetNodeState) neoMsgEncodedLenN() int {
	return 5
}

func (p *SetNodeState) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeID)))
	(data[4:])[0] = uint8(int8(p.NodeState))
}

func (p *SetNodeState) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 5 {
		goto overflow
	}
	p.NodeID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
	p.NodeState = NodeState(int8((data[4 : 4+1])[0]))
	return 5, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *SetNodeState) neoMsgEncodedLenM() int {
	return 4 + msgpack.Int32Size(int32(p.NodeID))
}

func (p *SetNodeState) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		n := msgpack.PutInt32(data[1:], int32(p.NodeID))
		data = data[1+n:]
	}
	data[0] = byte(msgpack.FixExt1)
	data[1] = 3
	if !(0 <= p.NodeState && p.NodeState <= 0x7f) {
		panic("p.NodeState: invalid NodeState enum value)")
	}
	data[2] = byte(p.NodeState)
}

func (p *SetNodeState) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"SetNodeState", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadInt32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("SetNodeState.NodeID", err)
		}
		p.NodeID = NodeID(v)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 3 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("SetNodeState.NodeState", op, msgpack.FixExt1)
	}
	if enumType := data[1]; enumType != 3 {
		return 0, mdecodeEnumTypeErr("SetNodeState.NodeState", enumType, 3)
	}
	{
		v := data[2]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("SetNodeState.NodeState", v)
		}
		p.NodeState = NodeState(v)
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 39. AddPendingNodes

func (*AddPendingNodes) neoMsgCode() uint16 {
	return 39
}

func (p *AddPendingNodes) neoMsgEncodedLenN() int {
	return 4 + len(p.NodeList)*4
}

func (p *AddPendingNodes) neoMsgEncodeN(data []byte) {
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a))))
			data = data[4:]
		}
	}
}

func (p *AddPendingNodes) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			(*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			data = data[4:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AddPendingNodes) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.Int32Size(int32((*a)))
	}
	return 1 + msgpack.ArrayHeadSize(len(p.NodeList)) + size
}

func (p *AddPendingNodes) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			{
				n := msgpack.PutInt32(data[0:], int32((*a)))
				data = data[0+n:]
			}
		}
	}
}

func (p *AddPendingNodes) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AddPendingNodes", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AddPendingNodes.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("AddPendingNodes", err)
				}
				(*a) = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 40. TweakPartitionTable

func (*TweakPartitionTable) neoMsgCode() uint16 {
	return 40
}

func (p *TweakPartitionTable) neoMsgEncodedLenN() int {
	return 5 + len(p.NodeList)*4
}

func (p *TweakPartitionTable) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = bool2byte(p.DryRun)
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[1:], uint32(l))
		data = data[5:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a))))
			data = data[4:]
		}
	}
}

func (p *TweakPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 5 {
		goto overflow
	}
	p.DryRun = byte2bool((data[0 : 0+1])[0])
	{
		l := binary.BigEndian.Uint32(data[1 : 1+4])
		data = data[5:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			(*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			data = data[4:]
		}
	}
	return 5 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *TweakPartitionTable) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.Int32Size(int32((*a)))
	}
	return 2 + msgpack.ArrayHeadSize(len(p.NodeList)) + size
}

func (p *TweakPartitionTable) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bool(p.DryRun))
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[2:], l)
		data = data[2+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			{
				n := msgpack.PutInt32(data[0:], int32((*a)))
				data = data[0+n:]
			}
		}
	}
}

func (p *TweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 2 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"TweakPartitionTable", op, opOk}
	}
	switch op := msgpack.Op(data[1]); op {
	default:
		return 0, mdecodeOpErr("TweakPartitionTable.DryRun", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.DryRun = true
	case msgpack.False:
		p.DryRun = false
	}
	{
		data = data[2:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("TweakPartitionTable.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("TweakPartitionTable", err)
				}
				(*a) = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 2 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 40 | answerBit. AnswerTweakPartitionTable

func (*AnswerTweakPartitionTable) neoMsgCode() uint16 {
	return 40 | answerBit
}

func (p *AnswerTweakPartitionTable) neoMsgEncodedLenN() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		size += len((*a).CellList) * 5
	}
	return 5 + len(p.RowList)*4 + size
}

func (p *AnswerTweakPartitionTable) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = bool2byte(p.Changed)
	{
		l := len(p.RowList)
		binary.BigEndian.PutUint32(data[1:], uint32(l))
		data = data[5:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			{
				l := len((*a).CellList)
				binary.BigEndian.PutUint32(data[0:], uint32(l))
				data = data[4:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
					(data[4:])[0] = uint8(int8((*a).State))
					data = data[5:]
				}
			}
		}
	}
}

func (p *AnswerTweakPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 5 {
		goto overflow
	}
	p.Changed = byte2bool((data[0 : 0+1])[0])
	{
		l := binary.BigEndian.Uint32(data[1 : 1+4])
		data = data[5:]
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 4 {
				goto overflow
			}
			{
				l := binary.BigEndian.Uint32(data[0 : 0+4])
				data = data[4:]
				if uint64(len(data)) < uint64(l)*5 {
					goto overflow
				}
				nread += uint64(l) * 5
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					(*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
					(*a).State = CellState(int8((data[4 : 4+1])[0]))
					data = data[5:]
				}
			}
		}
		nread += uint64(l) * 4
	}
	return 5 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerTweakPartitionTable) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.RowList); i++ {
		a := &p.RowList[i]
		for i := 0; i < len((*a).CellList); i++ {
			a := &(*a).CellList[i]
			size += msgpack.Int32Size(int32((*a).NID))
		}
		size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
	}
	return 2 + msgpack.ArrayHeadSize(len(p.RowList)) + len(p.RowList)*1 + size
}

func (p *AnswerTweakPartitionTable) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bool(p.Changed))
	{
		l := len(p.RowList)
		n := msgpack.PutArrayHead(data[2:], l)
		data = data[2+n:]
		for i := 0; i < l; i++ {
			a := &p.RowList[i]
			data[0] = byte(msgpack.FixArray_4 | 1)
			{
				l := len((*a).CellList)
				n := msgpack.PutArrayHead(data[1:], l)
				data = data[1+n:]
				for i := 0; i < l; i++ {
					a := &(*a).CellList[i]
					data[0] = byte(msgpack.FixArray_4 | 2)
					{
						n := msgpack.PutInt32(data[1:], int32((*a).NID))
						data = data[1+n:]
					}
					data[0] = byte(msgpack.FixExt1)
					data[1] = 4
					if !(0 <= (*a).State && (*a).State <= 0x7f) {
						panic("(*a).State: invalid CellState enum value)")
					}
					data[2] = byte((*a).State)
					data = data[3:]
				}
			}
		}
	}
}

func (p *AnswerTweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 2 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"AnswerTweakPartitionTable", op, opOk}
	}
	switch op := msgpack.Op(data[1]); op {
	default:
		return 0, mdecodeOpErr("AnswerTweakPartitionTable.Changed", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Changed = true
	case msgpack.False:
		p.Changed = false
	}
	{
		data = data[2:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTweakPartitionTable.RowList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.RowList = make([]RowInfo, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.RowList[i]
			if len(data) < 1 {
				goto overflow
			}
			if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
				return 0, &mstructDecodeError{"AnswerTweakPartitionTable", op, opOk}
			}
			{
				data = data[1:]
				l, tail, err := msgp.ReadArrayHeaderBytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerTweakPartitionTable.CellList", err)
				}
				nread += uint64(len(data) - len(tail))
				data = tail
				(*a).CellList = make([]CellInfo, l)
				for i := 0; uint32(i) < l; i++ {
					a := &(*a).CellList[i]
					if len(data) < 1 {
						goto overflow
					}
					if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
						return 0, &mstructDecodeError{"AnswerTweakPartitionTable", op, opOk}
					}
					data = data[1:]
					{
						v, tail, err := msgp.ReadInt32Bytes(data)
						if err != nil {
							return 0, mdecodeErr("AnswerTweakPartitionTable.NID", err)
						}
						(*a).NID = NodeID(v)
						nread += uint64(len(data) - len(tail))
						data = tail
					}
					if len(data) < 3 {
						goto overflow
					}
					if op := msgpack.Op(data[0]); op != msgpack.FixExt1 {
						return 0, mdecodeOpErr("AnswerTweakPartitionTable.State", op, msgpack.FixExt1)
					}
					if enumType := data[1]; enumType != 4 {
						return 0, mdecodeEnumTypeErr("AnswerTweakPartitionTable.State", enumType, 4)
					}
					{
						v := data[2]
						if !(0 <= v && v <= 0x7f) {
							return 0, mdecodeEnumValueErr("AnswerTweakPartitionTable.State", v)
						}
						(*a).State = CellState(v)
					}
					data = data[3:]
				}
				nread += uint64(l) * 4
			}
		}
		nread += uint64(l) * 1
	}
	return 2 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 41. SetNumReplicas

func (*SetNumReplicas) neoMsgCode() uint16 {
	return 41
}

func (p *SetNumReplicas) neoMsgEncodedLenN() int {
	return 4
}

func (p *SetNumReplicas) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.NumReplicas)
}

func (p *SetNumReplicas) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	p.NumReplicas = binary.BigEndian.Uint32(data[0 : 0+4])
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *SetNumReplicas) neoMsgEncodedLenM() int {
	return 1 + msgpack.Uint32Size(p.NumReplicas)
}

func (p *SetNumReplicas) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		n := msgpack.PutUint32(data[1:], p.NumReplicas)
		data = data[1+n:]
	}
}

func (p *SetNumReplicas) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"SetNumReplicas", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("SetNumReplicas.NumReplicas", err)
		}
		p.NumReplicas = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 42. SetClusterState

func (*SetClusterState) neoMsgCode() uint16 {
	return 42
}

func (p *SetClusterState) neoMsgEncodedLenN() int {
	return 1
}

func (p *SetClusterState) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = uint8(int8(p.State))
}

func (p *SetClusterState) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.State = ClusterState(int8((data[0 : 0+1])[0]))
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *SetClusterState) neoMsgEncodedLenM() int {
	return 4
}

func (p *SetClusterState) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 1
	if !(0 <= p.State && p.State <= 0x7f) {
		panic("p.State: invalid ClusterState enum value)")
	}
	data[3] = byte(p.State)
}

func (p *SetClusterState) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"SetClusterState", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("SetClusterState.State", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 1 {
		return 0, mdecodeEnumTypeErr("SetClusterState.State", enumType, 1)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("SetClusterState.State", v)
		}
		p.State = ClusterState(v)
	}
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 43. Repair

func (*Repair) neoMsgCode() uint16 {
	return 43
}

func (p *Repair) neoMsgEncodedLenN() int {
	return 5 + len(p.NodeList)*4
}

func (p *Repair) neoMsgEncodeN(data []byte) {
	{
		l := len(p.NodeList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a))))
			data = data[4:]
		}
	}
	(data[0:])[0] = bool2byte(p.repairFlags.DryRun)
}

func (p *Repair) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 1+uint64(l)*4 {
			goto overflow
		}
		nread += 1 + uint64(l)*4
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			(*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			data = data[4:]
		}
	}
	p.repairFlags.DryRun = byte2bool((data[0 : 0+1])[0])
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *Repair) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.NodeList); i++ {
		a := &p.NodeList[i]
		size += msgpack.Int32Size(int32((*a)))
	}
	return 3 + msgpack.ArrayHeadSize(len(p.NodeList)) + size
}

func (p *Repair) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		l := len(p.NodeList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.NodeList[i]
			{
				n := msgpack.PutInt32(data[0:], int32((*a)))
				data = data[0+n:]
			}
		}
	}
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bool(p.repairFlags.DryRun))
}

func (p *Repair) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"Repair", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("Repair.NodeList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.NodeList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.NodeList[i]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("Repair", err)
				}
				(*a) = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		if len(data) < 2 {
			goto overflow
		}
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"Repair.repairFlags", op, opOk}
	}
	switch op := msgpack.Op(data[1]); op {
	default:
		return 0, mdecodeOpErr("Repair.repairFlags.DryRun", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.repairFlags.DryRun = true
	case msgpack.False:
		p.repairFlags.DryRun = false
	}
	return 3 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 44. RepairOne

func (*RepairOne) neoMsgCode() uint16 {
	return 44
}

func (p *RepairOne) neoMsgEncodedLenN() int {
	return 1
}

func (p *RepairOne) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = bool2byte(p.repairFlags.DryRun)
}

func (p *RepairOne) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.repairFlags.DryRun = byte2bool((data[0 : 0+1])[0])
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *RepairOne) neoMsgEncodedLenM() int {
	return 3
}

func (p *RepairOne) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.FixArray_4 | 1)
	data[2] = byte(msgpack.Bool(p.repairFlags.DryRun))
}

func (p *RepairOne) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 3 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"RepairOne", op, opOk}
	}
	if op, opOk := msgpack.Op(data[1]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"RepairOne.repairFlags", op, opOk}
	}
	switch op := msgpack.Op(data[2]); op {
	default:
		return 0, mdecodeOpErr("RepairOne.repairFlags.DryRun", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.repairFlags.DryRun = true
	case msgpack.False:
		p.repairFlags.DryRun = false
	}
	return 3, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 45. NotifyClusterState

func (*NotifyClusterState) neoMsgCode() uint16 {
	return 45
}

func (p *NotifyClusterState) neoMsgEncodedLenN() int {
	return 1
}

func (p *NotifyClusterState) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = uint8(int8(p.State))
}

func (p *NotifyClusterState) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.State = ClusterState(int8((data[0 : 0+1])[0]))
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotifyClusterState) neoMsgEncodedLenM() int {
	return 4
}

func (p *NotifyClusterState) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 1
	if !(0 <= p.State && p.State <= 0x7f) {
		panic("p.State: invalid ClusterState enum value)")
	}
	data[3] = byte(p.State)
}

func (p *NotifyClusterState) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"NotifyClusterState", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("NotifyClusterState.State", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 1 {
		return 0, mdecodeEnumTypeErr("NotifyClusterState.State", enumType, 1)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("NotifyClusterState.State", v)
		}
		p.State = ClusterState(v)
	}
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 46. AskClusterState

func (*AskClusterState) neoMsgCode() uint16 {
	return 46
}

func (p *AskClusterState) neoMsgEncodedLenN() int {
	return 0
}

func (p *AskClusterState) neoMsgEncodeN(data []byte) {
}

func (p *AskClusterState) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *AskClusterState) neoMsgEncodedLenM() int {
	return 1
}

func (p *AskClusterState) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *AskClusterState) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"AskClusterState", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 46 | answerBit. AnswerClusterState

func (*AnswerClusterState) neoMsgCode() uint16 {
	return 46 | answerBit
}

func (p *AnswerClusterState) neoMsgEncodedLenN() int {
	return 1
}

func (p *AnswerClusterState) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = uint8(int8(p.State))
}

func (p *AnswerClusterState) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.State = ClusterState(int8((data[0 : 0+1])[0]))
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerClusterState) neoMsgEncodedLenM() int {
	return 4
}

func (p *AnswerClusterState) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.FixExt1)
	data[2] = 1
	if !(0 <= p.State && p.State <= 0x7f) {
		panic("p.State: invalid ClusterState enum value)")
	}
	data[3] = byte(p.State)
}

func (p *AnswerClusterState) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 4 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerClusterState", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.FixExt1 {
		return 0, mdecodeOpErr("AnswerClusterState.State", op, msgpack.FixExt1)
	}
	if enumType := data[2]; enumType != 1 {
		return 0, mdecodeEnumTypeErr("AnswerClusterState.State", enumType, 1)
	}
	{
		v := data[3]
		if !(0 <= v && v <= 0x7f) {
			return 0, mdecodeEnumValueErr("AnswerClusterState.State", v)
		}
		p.State = ClusterState(v)
	}
	return 4, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 47. ObjectUndoSerial

func (*ObjectUndoSerial) neoMsgCode() uint16 {
	return 47
}

func (p *ObjectUndoSerial) neoMsgEncodedLenN() int {
	return 28 + len(p.OidList)*8
}

func (p *ObjectUndoSerial) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.LTID))
	binary.BigEndian.PutUint64(data[16:], uint64(p.UndoneTID))
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[24:], uint32(l))
		data = data[28:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *ObjectUndoSerial) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 28 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.LTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.UndoneTID = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	{
		l := binary.BigEndian.Uint32(data[24 : 24+4])
		data = data[28:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 28 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *ObjectUndoSerial) neoMsgEncodedLenM() int {
	return 31 + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *ObjectUndoSerial) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 4)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.LTID))
	data[21] = byte(msgpack.Bin8)
	data[22] = 8
	binary.BigEndian.PutUint64(data[23:], uint64(p.UndoneTID))
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[31:], l)
		data = data[31+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *ObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 31 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|4; op != opOk {
		return 0, &mstructDecodeError{"ObjectUndoSerial", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ObjectUndoSerial.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("ObjectUndoSerial.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ObjectUndoSerial.LTID", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("ObjectUndoSerial.LTID", l, 8)
	}
	p.LTID = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	if op := msgpack.Op(data[21]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ObjectUndoSerial.UndoneTID", op, msgpack.Bin8)
	}
	if l := data[22]; l != 8 {
		return 0, mdecodeLen8Err("ObjectUndoSerial.UndoneTID", l, 8)
	}
	p.UndoneTID = zodb.Tid(binary.BigEndian.Uint64(data[23:]))
	{
		data = data[31:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("ObjectUndoSerial.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("ObjectUndoSerial", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("ObjectUndoSerial", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 31 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 47 | answerBit. AnswerObjectUndoSerial

func (*AnswerObjectUndoSerial) neoMsgCode() uint16 {
	return 47 | answerBit
}

func (p *AnswerObjectUndoSerial) neoMsgEncodedLenN() int {
	return 4 + len(p.ObjectTIDDict)*25
}

func (p *AnswerObjectUndoSerial) neoMsgEncodeN(data []byte) {
	{
		l := len(p.ObjectTIDDict)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		keyv := make([]zodb.Oid, 0, l)
		for key := range p.ObjectTIDDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			binary.BigEndian.PutUint64(data[0:], uint64(key))
			binary.BigEndian.PutUint64(data[8:], uint64(p.ObjectTIDDict[key].CurrentSerial))
			binary.BigEndian.PutUint64(data[16:], uint64(p.ObjectTIDDict[key].UndoSerial))
			(data[24:])[0] = bool2byte(p.ObjectTIDDict[key].IsCurrent)
			data = data[25:]
		}
	}
}

func (p *AnswerObjectUndoSerial) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*25 {
			goto overflow
		}
		nread += uint64(l) * 25
		p.ObjectTIDDict = make(map[zodb.Oid]struct {
			CurrentSerial zodb.Tid
			UndoSerial    zodb.Tid
			IsCurrent     bool
		}, l)
		m := p.ObjectTIDDict
		for i := 0; uint32(i) < l; i++ {
			var key zodb.Oid
			key = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			var mv struct {
				CurrentSerial zodb.Tid
				UndoSerial    zodb.Tid
				IsCurrent     bool
			}
			mv.CurrentSerial = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
			mv.UndoSerial = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
			mv.IsCurrent = byte2bool((data[24 : 24+1])[0])
			m[key] = mv
			data = data[25:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerObjectUndoSerial) neoMsgEncodedLenM() int {
	return 1 + msgpack.MapHeadSize(len(p.ObjectTIDDict)) + len(p.ObjectTIDDict)*32
}

func (p *AnswerObjectUndoSerial) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.ObjectTIDDict)
		n := msgpack.PutMapHead(data[1:], l)
		data = data[1+n:]
		keyv := make([]zodb.Oid, 0, l)
		for key := range p.ObjectTIDDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64(key))
			data[10] = byte(msgpack.FixArray_4 | 3)
			data[11] = byte(msgpack.Bin8)
			data[12] = 8
			binary.BigEndian.PutUint64(data[13:], uint64(p.ObjectTIDDict[key].CurrentSerial))
			data[21] = byte(msgpack.Bin8)
			data[22] = 8
			binary.BigEndian.PutUint64(data[23:], uint64(p.ObjectTIDDict[key].UndoSerial))
			data[31] = byte(msgpack.Bool(p.ObjectTIDDict[key].IsCurrent))
			data = data[32:]
		}
	}
}

func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerObjectUndoSerial", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadMapHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerObjectUndoSerial.ObjectTIDDict", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*32 {
			goto overflow
		}
		nread += uint64(l) * 32
		p.ObjectTIDDict = make(map[zodb.Oid]struct {
			CurrentSerial zodb.Tid
			UndoSerial    zodb.Tid
			IsCurrent     bool
		}, l)
		m := p.ObjectTIDDict
		for i := 0; uint32(i) < l; i++ {
			var key zodb.Oid
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerObjectUndoSerial", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerObjectUndoSerial", l, 8)
			}
			key = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			var mv struct {
				CurrentSerial zodb.Tid
				UndoSerial    zodb.Tid
				IsCurrent     bool
			}
			if op, opOk := msgpack.Op(data[10]), msgpack.FixArray_4|3; op != opOk {
				return 0, &mstructDecodeError{"AnswerObjectUndoSerial", op, opOk}
			}
			if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerObjectUndoSerial.CurrentSerial", op, msgpack.Bin8)
			}
			if l := data[12]; l != 8 {
				return 0, mdecodeLen8Err("AnswerObjectUndoSerial.CurrentSerial", l, 8)
			}
			mv.CurrentSerial = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
			if op := msgpack.Op(data[21]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerObjectUndoSerial.UndoSerial", op, msgpack.Bin8)
			}
			if l := data[22]; l != 8 {
				return 0, mdecodeLen8Err("AnswerObjectUndoSerial.UndoSerial", l, 8)
			}
			mv.UndoSerial = zodb.Tid(binary.BigEndian.Uint64(data[23:]))
			switch op := msgpack.Op(data[31]); op {
			default:
				return 0, mdecodeOpErr("AnswerObjectUndoSerial.IsCurrent", op, msgpack.True, msgpack.False)
			case msgpack.True:
				mv.IsCurrent = true
			case msgpack.False:
				mv.IsCurrent = false
			}
			m[key] = mv
			data = data[32:]
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 48. AskTIDsFrom

func (*AskTIDsFrom) neoMsgCode() uint16 {
	return 48
}

func (p *AskTIDsFrom) neoMsgEncodedLenN() int {
	return 24
}

func (p *AskTIDsFrom) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID))
	binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
	binary.BigEndian.PutUint32(data[16:], p.Length)
	binary.BigEndian.PutUint32(data[20:], p.Partition)
}

func (p *AskTIDsFrom) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 24 {
		goto overflow
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.Length = binary.BigEndian.Uint32(data[16 : 16+4])
	p.Partition = binary.BigEndian.Uint32(data[20 : 20+4])
	return 24, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AskTIDsFrom) neoMsgEncodedLenM() int {
	return 21 + msgpack.Uint32Size(p.Length) + msgpack.Uint32Size(p.Partition)
}

func (p *AskTIDsFrom) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 4)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.MinTID))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.MaxTID))
	{
		n := msgpack.PutUint32(data[21:], p.Length)
		data = data[21+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.Partition)
		data = data[0+n:]
	}
}

func (p *AskTIDsFrom) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|4; op != opOk {
		return 0, &mstructDecodeError{"AskTIDsFrom", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AskTIDsFrom.MinTID", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AskTIDsFrom.MinTID", l, 8)
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AskTIDsFrom.MaxTID", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AskTIDsFrom.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	data = data[21:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AskTIDsFrom.Length", err)
		}
		p.Length = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AskTIDsFrom.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	return 21 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 48 | answerBit. AnswerTIDsFrom

func (*AnswerTIDsFrom) neoMsgCode() uint16 {
	return 48 | answerBit
}

func (p *AnswerTIDsFrom) neoMsgEncodedLenN() int {
	return 4 + len(p.TidList)*8
}

func (p *AnswerTIDsFrom) neoMsgEncodeN(data []byte) {
	{
		l := len(p.TidList)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		for i := 0; i < l; i++ {
			a := &p.TidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AnswerTIDsFrom) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.TidList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TidList[i]
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerTIDsFrom) neoMsgEncodedLenM() int {
	return 1 + msgpack.ArrayHeadSize(len(p.TidList)) + len(p.TidList)*10
}

func (p *AnswerTIDsFrom) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	{
		l := len(p.TidList)
		n := msgpack.PutArrayHead(data[1:], l)
		data = data[1+n:]
		for i := 0; i < l; i++ {
			a := &p.TidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AnswerTIDsFrom) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerTIDsFrom", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerTIDsFrom.TidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.TidList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerTIDsFrom", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerTIDsFrom", l, 8)
			}
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 49. Pack

func (*Pack) neoMsgCode() uint16 {
	return 49
}

func (p *Pack) neoMsgEncodedLenN() int {
	return 8
}

func (p *Pack) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *Pack) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *Pack) neoMsgEncodedLenM() int {
	return 11
}

func (p *Pack) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *Pack) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"Pack", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("Pack.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("Pack.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 49 | answerBit. AnswerPack

func (*AnswerPack) neoMsgCode() uint16 {
	return 49 | answerBit
}

func (p *AnswerPack) neoMsgEncodedLenN() int {
	return 1
}

func (p *AnswerPack) neoMsgEncodeN(data []byte) {
	(data[0:])[0] = bool2byte(p.Status)
}

func (p *AnswerPack) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	p.Status = byte2bool((data[0 : 0+1])[0])
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerPack) neoMsgEncodedLenM() int {
	return 2
}

func (p *AnswerPack) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bool(p.Status))
}

func (p *AnswerPack) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 2 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerPack", op, opOk}
	}
	switch op := msgpack.Op(data[1]); op {
	default:
		return 0, mdecodeOpErr("AnswerPack.Status", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Status = true
	case msgpack.False:
		p.Status = false
	}
	return 2, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 50. CheckReplicas

func (*CheckReplicas) neoMsgCode() uint16 {
	return 50
}

func (p *CheckReplicas) neoMsgEncodedLenN() int {
	return 20 + len(p.PartitionDict)*8
}

func (p *CheckReplicas) neoMsgEncodeN(data []byte) {
	{
		l := len(p.PartitionDict)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		keyv := make([]uint32, 0, l)
		for key := range p.PartitionDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			binary.BigEndian.PutUint32(data[0:], key)
			binary.BigEndian.PutUint32(data[4:], uint32(int32(p.PartitionDict[key])))
			data = data[8:]
		}
	}
	binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID))
	binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
}

func (p *CheckReplicas) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 4 {
		goto overflow
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 16+uint64(l)*8 {
			goto overflow
		}
		nread += 16 + uint64(l)*8
		p.PartitionDict = make(map[uint32]NodeID, l)
		m := p.PartitionDict
		for i := 0; uint32(i) < l; i++ {
			var key uint32
			key = binary.BigEndian.Uint32(data[0 : 0+4])
			m[key] = NodeID(int32(binary.BigEndian.Uint32(data[4 : 4+4])))
			data = data[8:]
		}
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 4 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *CheckReplicas) neoMsgEncodedLenM() int {
	var size int
	for key := range p.PartitionDict {
		size += msgpack.Uint32Size(key) + msgpack.Int32Size(int32(p.PartitionDict[key]))
	}
	return 21 + msgpack.MapHeadSize(len(p.PartitionDict)) + size
}

func (p *CheckReplicas) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		l := len(p.PartitionDict)
		n := msgpack.PutMapHead(data[1:], l)
		data = data[1+n:]
		keyv := make([]uint32, 0, l)
		for key := range p.PartitionDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			{
				n := msgpack.PutUint32(data[0:], key)
				data = data[0+n:]
			}
			{
				n := msgpack.PutInt32(data[0:], int32(p.PartitionDict[key]))
				data = data[0+n:]
			}
		}
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.MinTID))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.MaxTID))
}

func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"CheckReplicas", op, opOk}
	}
	{
		data = data[1:]
		l, tail, err := msgp.ReadMapHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckReplicas.PartitionDict", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.PartitionDict = make(map[uint32]NodeID, l)
		m := p.PartitionDict
		for i := 0; uint32(i) < l; i++ {
			var key uint32
			{
				v, tail, err := msgp.ReadUint32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("CheckReplicas", err)
				}
				key = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("CheckReplicas", err)
				}
				m[key] = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
		if len(data) < 20 {
			goto overflow
		}
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckReplicas.MinTID", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("CheckReplicas.MinTID", l, 8)
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckReplicas.MaxTID", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("CheckReplicas.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	return 21 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 51. CheckPartition

func (*CheckPartition) neoMsgCode() uint16 {
	return 51
}

func (p *CheckPartition) neoMsgEncodedLenN() int {
	return 24 + len(p.Source.UpstreamName) + p.Source.Address.neoEncodedLenN()
}

func (p *CheckPartition) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Partition)
	{
		l := uint32(len(p.Source.UpstreamName))
		binary.BigEndian.PutUint32(data[4:], l)
		data = data[8:]
		copy(data, p.Source.UpstreamName)
		data = data[l:]
	}
	{
		n := p.Source.Address.neoEncodeN(data[0:])
		data = data[0+n:]
	}
	binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID))
	binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
}

func (p *CheckPartition) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 8 {
		goto overflow
	}
	p.Partition = binary.BigEndian.Uint32(data[0 : 0+4])
	{
		l := binary.BigEndian.Uint32(data[4 : 4+4])
		data = data[8:]
		if uint64(len(data)) < uint64(l) {
			goto overflow
		}
		nread += uint64(l)
		p.Source.UpstreamName = string(data[:l])
		data = data[l:]
	}
	{
		n, ok := p.Source.Address.neoDecodeN(data)
		if !ok {
			goto overflow
		}
		data = data[n:]
		nread += n
	}
	if len(data) < 16 {
		goto overflow
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 24 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *CheckPartition) neoMsgEncodedLenM() int {
	return 23 + msgpack.Uint32Size(p.Partition) + msgpack.BinHeadSize(len(p.Source.UpstreamName)) + len(p.Source.UpstreamName) + msgpack.BinHeadSize(len(p.Source.Address.Host)) + len(p.Source.Address.Host) + msgpack.Uint16Size(p.Source.Address.Port)
}

func (p *CheckPartition) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 4)
	{
		n := msgpack.PutUint32(data[1:], p.Partition)
		data = data[1+n:]
	}
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		l := len(p.Source.UpstreamName)
		n := msgpack.PutBinHead(data[1:], l)
		data = data[1+n:]
		copy(data, p.Source.UpstreamName)
		data = data[l:]
	}
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		l := len(p.Source.Address.Host)
		n := msgpack.PutBinHead(data[1:], l)
		data = data[1+n:]
		copy(data, p.Source.Address.Host)
		data = data[l:]
	}
	{
		n := msgpack.PutUint16(data[0:], p.Source.Address.Port)
		data = data[0+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.MinTID))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.MaxTID))
}

func (p *CheckPartition) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|4; op != opOk {
		return 0, &mstructDecodeError{"CheckPartition", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckPartition.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"CheckPartition.Source", op, opOk}
	}
	data = data[1:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("CheckPartition.Source.UpstreamName", err)
		}
		p.Source.UpstreamName = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"CheckPartition.Source.Address", op, opOk}
	}
	data = data[1:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("CheckPartition.Source.Address.Host", err)
		}
		p.Source.Address.Host = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint16Bytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckPartition.Source.Address.Port", err)
		}
		p.Source.Address.Port = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 20 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckPartition.MinTID", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("CheckPartition.MinTID", l, 8)
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckPartition.MaxTID", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("CheckPartition.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	return 23 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 52. CheckTIDRange

func (*CheckTIDRange) neoMsgCode() uint16 {
	return 52
}

func (p *CheckTIDRange) neoMsgEncodedLenN() int {
	return 24
}

func (p *CheckTIDRange) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Partition)
	binary.BigEndian.PutUint32(data[4:], p.Length)
	binary.BigEndian.PutUint64(data[8:], uint64(p.MinTID))
	binary.BigEndian.PutUint64(data[16:], uint64(p.MaxTID))
}

func (p *CheckTIDRange) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 24 {
		goto overflow
	}
	p.Partition = binary.BigEndian.Uint32(data[0 : 0+4])
	p.Length = binary.BigEndian.Uint32(data[4 : 4+4])
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	return 24, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *CheckTIDRange) neoMsgEncodedLenM() int {
	return 21 + msgpack.Uint32Size(p.Partition) + msgpack.Uint32Size(p.Length)
}

func (p *CheckTIDRange) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 4)
	{
		n := msgpack.PutUint32(data[1:], p.Partition)
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.Length)
		data = data[0+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.MinTID))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.MaxTID))
}

func (p *CheckTIDRange) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|4; op != opOk {
		return 0, &mstructDecodeError{"CheckTIDRange", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckTIDRange.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckTIDRange.Length", err)
		}
		p.Length = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 20 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckTIDRange.MinTID", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("CheckTIDRange.MinTID", l, 8)
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckTIDRange.MaxTID", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("CheckTIDRange.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	return 21 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 52 | answerBit. AnswerCheckTIDRange

func (*AnswerCheckTIDRange) neoMsgCode() uint16 {
	return 52 | answerBit
}

func (p *AnswerCheckTIDRange) neoMsgEncodedLenN() int {
	return 32
}

func (p *AnswerCheckTIDRange) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Count)
	copy(data[4:], p.Checksum[:])
	binary.BigEndian.PutUint64(data[24:], uint64(p.MaxTID))
}

func (p *AnswerCheckTIDRange) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 32 {
		goto overflow
	}
	p.Count = binary.BigEndian.Uint32(data[0 : 0+4])
	copy(p.Checksum[:], data[4:24])
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24 : 24+8]))
	return 32, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerCheckTIDRange) neoMsgEncodedLenM() int {
	return 33 + msgpack.Uint32Size(p.Count)
}

func (p *AnswerCheckTIDRange) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	{
		n := msgpack.PutUint32(data[1:], p.Count)
		data = data[1+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 20
	copy(data[2:], p.Checksum[:])
	data[22] = byte(msgpack.Bin8)
	data[23] = 8
	binary.BigEndian.PutUint64(data[24:], uint64(p.MaxTID))
}

func (p *AnswerCheckTIDRange) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AnswerCheckTIDRange", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerCheckTIDRange.Count", err)
		}
		p.Count = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 32 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckTIDRange.Checksum", op, msgpack.Bin8)
	}
	if l := data[1]; l != 20 {
		return 0, mdecodeLen8Err("AnswerCheckTIDRange.Checksum", l, 20)
	}
	copy(p.Checksum[:], data[2:22])
	if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckTIDRange.MaxTID", op, msgpack.Bin8)
	}
	if l := data[23]; l != 8 {
		return 0, mdecodeLen8Err("AnswerCheckTIDRange.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24:]))
	return 33 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 53. CheckSerialRange

func (*CheckSerialRange) neoMsgCode() uint16 {
	return 53
}

func (p *CheckSerialRange) neoMsgEncodedLenN() int {
	return 32
}

func (p *CheckSerialRange) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Partition)
	binary.BigEndian.PutUint32(data[4:], p.Length)
	binary.BigEndian.PutUint64(data[8:], uint64(p.MinTID))
	binary.BigEndian.PutUint64(data[16:], uint64(p.MaxTID))
	binary.BigEndian.PutUint64(data[24:], uint64(p.MinOID))
}

func (p *CheckSerialRange) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 32 {
		goto overflow
	}
	p.Partition = binary.BigEndian.Uint32(data[0 : 0+4])
	p.Length = binary.BigEndian.Uint32(data[4 : 4+4])
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	p.MinOID = zodb.Oid(binary.BigEndian.Uint64(data[24 : 24+8]))
	return 32, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *CheckSerialRange) neoMsgEncodedLenM() int {
	return 31 + msgpack.Uint32Size(p.Partition) + msgpack.Uint32Size(p.Length)
}

func (p *CheckSerialRange) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 5)
	{
		n := msgpack.PutUint32(data[1:], p.Partition)
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.Length)
		data = data[0+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.MinTID))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.MaxTID))
	data[20] = byte(msgpack.Bin8)
	data[21] = 8
	binary.BigEndian.PutUint64(data[22:], uint64(p.MinOID))
}

func (p *CheckSerialRange) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
		return 0, &mstructDecodeError{"CheckSerialRange", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckSerialRange.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("CheckSerialRange.Length", err)
		}
		p.Length = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 30 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckSerialRange.MinTID", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("CheckSerialRange.MinTID", l, 8)
	}
	p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckSerialRange.MaxTID", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("CheckSerialRange.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	if op := msgpack.Op(data[20]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckSerialRange.MinOID", op, msgpack.Bin8)
	}
	if l := data[21]; l != 8 {
		return 0, mdecodeLen8Err("CheckSerialRange.MinOID", l, 8)
	}
	p.MinOID = zodb.Oid(binary.BigEndian.Uint64(data[22:]))
	return 31 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 53 | answerBit. AnswerCheckSerialRange

func (*AnswerCheckSerialRange) neoMsgCode() uint16 {
	return 53 | answerBit
}

func (p *AnswerCheckSerialRange) neoMsgEncodedLenN() int {
	return 60
}

func (p *AnswerCheckSerialRange) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Count)
	copy(data[4:], p.TidChecksum[:])
	binary.BigEndian.PutUint64(data[24:], uint64(p.MaxTID))
	copy(data[32:], p.OidChecksum[:])
	binary.BigEndian.PutUint64(data[52:], uint64(p.MaxOID))
}

func (p *AnswerCheckSerialRange) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 60 {
		goto overflow
	}
	p.Count = binary.BigEndian.Uint32(data[0 : 0+4])
	copy(p.TidChecksum[:], data[4:24])
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24 : 24+8]))
	copy(p.OidChecksum[:], data[32:52])
	p.MaxOID = zodb.Oid(binary.BigEndian.Uint64(data[52 : 52+8]))
	return 60, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerCheckSerialRange) neoMsgEncodedLenM() int {
	return 65 + msgpack.Uint32Size(p.Count)
}

func (p *AnswerCheckSerialRange) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 5)
	{
		n := msgpack.PutUint32(data[1:], p.Count)
		data = data[1+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 20
	copy(data[2:], p.TidChecksum[:])
	data[22] = byte(msgpack.Bin8)
	data[23] = 8
	binary.BigEndian.PutUint64(data[24:], uint64(p.MaxTID))
	data[32] = byte(msgpack.Bin8)
	data[33] = 20
	copy(data[34:], p.OidChecksum[:])
	data[54] = byte(msgpack.Bin8)
	data[55] = 8
	binary.BigEndian.PutUint64(data[56:], uint64(p.MaxOID))
}

func (p *AnswerCheckSerialRange) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
		return 0, &mstructDecodeError{"AnswerCheckSerialRange", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerCheckSerialRange.Count", err)
		}
		p.Count = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 64 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckSerialRange.TidChecksum", op, msgpack.Bin8)
	}
	if l := data[1]; l != 20 {
		return 0, mdecodeLen8Err("AnswerCheckSerialRange.TidChecksum", l, 20)
	}
	copy(p.TidChecksum[:], data[2:22])
	if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckSerialRange.MaxTID", op, msgpack.Bin8)
	}
	if l := data[23]; l != 8 {
		return 0, mdecodeLen8Err("AnswerCheckSerialRange.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24:]))
	if op := msgpack.Op(data[32]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckSerialRange.OidChecksum", op, msgpack.Bin8)
	}
	if l := data[33]; l != 20 {
		return 0, mdecodeLen8Err("AnswerCheckSerialRange.OidChecksum", l, 20)
	}
	copy(p.OidChecksum[:], data[34:54])
	if op := msgpack.Op(data[54]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckSerialRange.MaxOID", op, msgpack.Bin8)
	}
	if l := data[55]; l != 8 {
		return 0, mdecodeLen8Err("AnswerCheckSerialRange.MaxOID", l, 8)
	}
	p.MaxOID = zodb.Oid(binary.BigEndian.Uint64(data[56:]))
	return 65 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 54. PartitionCorrupted

func (*PartitionCorrupted) neoMsgCode() uint16 {
	return 54
}

func (p *PartitionCorrupted) neoMsgEncodedLenN() int {
	return 8 + len(p.CellList)*4
}

func (p *PartitionCorrupted) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Partition)
	{
		l := len(p.CellList)
		binary.BigEndian.PutUint32(data[4:], uint32(l))
		data = data[8:]
		for i := 0; i < l; i++ {
			a := &p.CellList[i]
			binary.BigEndian.PutUint32(data[0:], uint32(int32((*a))))
			data = data[4:]
		}
	}
}

func (p *PartitionCorrupted) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 8 {
		goto overflow
	}
	p.Partition = binary.BigEndian.Uint32(data[0 : 0+4])
	{
		l := binary.BigEndian.Uint32(data[4 : 4+4])
		data = data[8:]
		if uint64(len(data)) < uint64(l)*4 {
			goto overflow
		}
		nread += uint64(l) * 4
		p.CellList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.CellList[i]
			(*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
			data = data[4:]
		}
	}
	return 8 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *PartitionCorrupted) neoMsgEncodedLenM() int {
	var size int
	for i := 0; i < len(p.CellList); i++ {
		a := &p.CellList[i]
		size += msgpack.Int32Size(int32((*a)))
	}
	return 1 + msgpack.Uint32Size(p.Partition) + msgpack.ArrayHeadSize(len(p.CellList)) + size
}

func (p *PartitionCorrupted) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		n := msgpack.PutUint32(data[1:], p.Partition)
		data = data[1+n:]
	}
	{
		l := len(p.CellList)
		n := msgpack.PutArrayHead(data[0:], l)
		data = data[0+n:]
		for i := 0; i < l; i++ {
			a := &p.CellList[i]
			{
				n := msgpack.PutInt32(data[0:], int32((*a)))
				data = data[0+n:]
			}
		}
	}
}

func (p *PartitionCorrupted) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"PartitionCorrupted", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("PartitionCorrupted.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("PartitionCorrupted.CellList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.CellList = make([]NodeID, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.CellList[i]
			{
				v, tail, err := msgp.ReadInt32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("PartitionCorrupted", err)
				}
				(*a) = NodeID(v)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 1 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 55. NotifyReady

func (*NotifyReady) neoMsgCode() uint16 {
	return 55
}

func (p *NotifyReady) neoMsgEncodedLenN() int {
	return 0
}

func (p *NotifyReady) neoMsgEncodeN(data []byte) {
}

func (p *NotifyReady) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *NotifyReady) neoMsgEncodedLenM() int {
	return 1
}

func (p *NotifyReady) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *NotifyReady) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"NotifyReady", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 56. LastTransaction

func (*LastTransaction) neoMsgCode() uint16 {
	return 56
}

func (p *LastTransaction) neoMsgEncodedLenN() int {
	return 0
}

func (p *LastTransaction) neoMsgEncodeN(data []byte) {
}

func (p *LastTransaction) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *LastTransaction) neoMsgEncodedLenM() int {
	return 1
}

func (p *LastTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *LastTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"LastTransaction", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 56 | answerBit. AnswerLastTransaction

func (*AnswerLastTransaction) neoMsgCode() uint16 {
	return 56 | answerBit
}

func (p *AnswerLastTransaction) neoMsgEncodedLenN() int {
	return 8
}

func (p *AnswerLastTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *AnswerLastTransaction) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerLastTransaction) neoMsgEncodedLenM() int {
	return 11
}

func (p *AnswerLastTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *AnswerLastTransaction) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerLastTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerLastTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerLastTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 57. CheckCurrentSerial

func (*CheckCurrentSerial) neoMsgCode() uint16 {
	return 57
}

func (p *CheckCurrentSerial) neoMsgEncodedLenN() int {
	return 24
}

func (p *CheckCurrentSerial) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Oid))
	binary.BigEndian.PutUint64(data[16:], uint64(p.Serial))
}

func (p *CheckCurrentSerial) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 24 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	return 24, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *CheckCurrentSerial) neoMsgEncodedLenM() int {
	return 31
}

func (p *CheckCurrentSerial) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Oid))
	data[21] = byte(msgpack.Bin8)
	data[22] = 8
	binary.BigEndian.PutUint64(data[23:], uint64(p.Serial))
}

func (p *CheckCurrentSerial) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 31 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"CheckCurrentSerial", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckCurrentSerial.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("CheckCurrentSerial.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckCurrentSerial.Oid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("CheckCurrentSerial.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[13:]))
	if op := msgpack.Op(data[21]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("CheckCurrentSerial.Serial", op, msgpack.Bin8)
	}
	if l := data[22]; l != 8 {
		return 0, mdecodeLen8Err("CheckCurrentSerial.Serial", l, 8)
	}
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[23:]))
	return 31, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 57 | answerBit. AnswerCheckCurrentSerial

func (*AnswerCheckCurrentSerial) neoMsgCode() uint16 {
	return 57 | answerBit
}

func (p *AnswerCheckCurrentSerial) neoMsgEncodedLenN() int {
	return 8
}

func (p *AnswerCheckCurrentSerial) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.AnswerStoreObject.Conflict))
}

func (p *AnswerCheckCurrentSerial) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.AnswerStoreObject.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerCheckCurrentSerial) neoMsgEncodedLenM() int {
	return 12
}

func (p *AnswerCheckCurrentSerial) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.FixArray_4 | 1)
	data[2] = byte(msgpack.Bin8)
	data[3] = 8
	binary.BigEndian.PutUint64(data[4:], uint64(p.AnswerStoreObject.Conflict))
}

func (p *AnswerCheckCurrentSerial) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 12 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerCheckCurrentSerial", op, opOk}
	}
	if op, opOk := msgpack.Op(data[1]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"AnswerCheckCurrentSerial.AnswerStoreObject", op, opOk}
	}
	if op := msgpack.Op(data[2]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerCheckCurrentSerial.AnswerStoreObject.Conflict", op, msgpack.Bin8)
	}
	if l := data[3]; l != 8 {
		return 0, mdecodeLen8Err("AnswerCheckCurrentSerial.AnswerStoreObject.Conflict", l, 8)
	}
	p.AnswerStoreObject.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[4:]))
	return 12, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 58. NotifyTransactionFinished

func (*NotifyTransactionFinished) neoMsgCode() uint16 {
	return 58
}

func (p *NotifyTransactionFinished) neoMsgEncodedLenN() int {
	return 16
}

func (p *NotifyTransactionFinished) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
	binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
}

func (p *NotifyTransactionFinished) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 16 {
		goto overflow
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	return 16, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *NotifyTransactionFinished) neoMsgEncodedLenM() int {
	return 21
}

func (p *NotifyTransactionFinished) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTID))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.MaxTID))
}

func (p *NotifyTransactionFinished) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"NotifyTransactionFinished", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("NotifyTransactionFinished.TTID", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("NotifyTransactionFinished.TTID", l, 8)
	}
	p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("NotifyTransactionFinished.MaxTID", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("NotifyTransactionFinished.MaxTID", l, 8)
	}
	p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	return 21, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 59. Replicate

func (*Replicate) neoMsgCode() uint16 {
	return 59
}

func (p *Replicate) neoMsgEncodedLenN() int {
	var size int
	for key := range p.SourceDict {
		size += len(p.SourceDict[key])
	}
	return 16 + len(p.UpstreamName) + len(p.SourceDict)*8 + size
}

func (p *Replicate) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := uint32(len(p.UpstreamName))
		binary.BigEndian.PutUint32(data[8:], l)
		data = data[12:]
		copy(data, p.UpstreamName)
		data = data[l:]
	}
	{
		l := len(p.SourceDict)
		binary.BigEndian.PutUint32(data[0:], uint32(l))
		data = data[4:]
		keyv := make([]uint32, 0, l)
		for key := range p.SourceDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			binary.BigEndian.PutUint32(data[0:], key)
			{
				l := uint32(len(p.SourceDict[key]))
				binary.BigEndian.PutUint32(data[4:], l)
				data = data[8:]
				copy(data, p.SourceDict[key])
				data = data[l:]
			}
		}
	}
}

func (p *Replicate) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.UpstreamName = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		p.SourceDict = make(map[uint32]string, l)
		m := p.SourceDict
		for i := 0; uint32(i) < l; i++ {
			if len(data) < 8 {
				goto overflow
			}
			var key uint32
			key = binary.BigEndian.Uint32(data[0 : 0+4])
			{
				l := binary.BigEndian.Uint32(data[4 : 4+4])
				data = data[8:]
				if uint64(len(data)) < uint64(l) {
					goto overflow
				}
				nread += uint64(l)
				m[key] = string(data[:l])
				data = data[l:]
			}
		}
		nread += uint64(l) * 8
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *Replicate) neoMsgEncodedLenM() int {
	var size int
	for key := range p.SourceDict {
		size += msgpack.Uint32Size(key) + msgpack.BinHeadSize(len(p.SourceDict[key])) + len(p.SourceDict[key])
	}
	return 11 + msgpack.BinHeadSize(len(p.UpstreamName)) + len(p.UpstreamName) + msgpack.MapHeadSize(len(p.SourceDict)) + size
}

func (p *Replicate) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.UpstreamName)
		n := msgpack.PutBinHead(data[11:], l)
		data = data[11+n:]
		copy(data, p.UpstreamName)
		data = data[l:]
	}
	{
		l := len(p.SourceDict)
		n := msgpack.PutMapHead(data[0:], l)
		data = data[0+n:]
		keyv := make([]uint32, 0, l)
		for key := range p.SourceDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			{
				n := msgpack.PutUint32(data[0:], key)
				data = data[0+n:]
			}
			{
				l := len(p.SourceDict[key])
				n := msgpack.PutBinHead(data[0:], l)
				data = data[0+n:]
				copy(data, p.SourceDict[key])
				data = data[l:]
			}
		}
	}
}

func (p *Replicate) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"Replicate", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("Replicate.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("Replicate.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	data = data[11:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("Replicate.UpstreamName", err)
		}
		p.UpstreamName = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		l, tail, err := msgp.ReadMapHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("Replicate.SourceDict", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.SourceDict = make(map[uint32]string, l)
		m := p.SourceDict
		for i := 0; uint32(i) < l; i++ {
			var key uint32
			{
				v, tail, err := msgp.ReadUint32Bytes(data)
				if err != nil {
					return 0, mdecodeErr("Replicate", err)
				}
				key = v
				nread += uint64(len(data) - len(tail))
				data = tail
			}
			{
				b, tail, err := msgp.ReadBytesZC(data)
				if err != nil {
					return 0, mdecodeErr("Replicate", err)
				}
				m[key] = string(b)
				nread += uint64(len(data) - len(tail))
				data = tail
			}
		}
	}
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 60. ReplicationDone

func (*ReplicationDone) neoMsgCode() uint16 {
	return 60
}

func (p *ReplicationDone) neoMsgEncodedLenN() int {
	return 12
}

func (p *ReplicationDone) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Offset)
	binary.BigEndian.PutUint64(data[4:], uint64(p.Tid))
}

func (p *ReplicationDone) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 12 {
		goto overflow
	}
	p.Offset = binary.BigEndian.Uint32(data[0 : 0+4])
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[4 : 4+8]))
	return 12, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *ReplicationDone) neoMsgEncodedLenM() int {
	return 11 + msgpack.Uint32Size(p.Offset)
}

func (p *ReplicationDone) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 2)
	{
		n := msgpack.PutUint32(data[1:], p.Offset)
		data = data[1+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.Tid))
}

func (p *ReplicationDone) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|2; op != opOk {
		return 0, &mstructDecodeError{"ReplicationDone", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("ReplicationDone.Offset", err)
		}
		p.Offset = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 10 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("ReplicationDone.Tid", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("ReplicationDone.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	return 11 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 61. FetchTransactions

func (*FetchTransactions) neoMsgCode() uint16 {
	return 61
}

func (p *FetchTransactions) neoMsgEncodedLenN() int {
	return 28 + len(p.TxnKnownList)*8
}

func (p *FetchTransactions) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Partition)
	binary.BigEndian.PutUint32(data[4:], p.Length)
	binary.BigEndian.PutUint64(data[8:], uint64(p.MinTid))
	binary.BigEndian.PutUint64(data[16:], uint64(p.MaxTid))
	{
		l := len(p.TxnKnownList)
		binary.BigEndian.PutUint32(data[24:], uint32(l))
		data = data[28:]
		for i := 0; i < l; i++ {
			a := &p.TxnKnownList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *FetchTransactions) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 28 {
		goto overflow
	}
	p.Partition = binary.BigEndian.Uint32(data[0 : 0+4])
	p.Length = binary.BigEndian.Uint32(data[4 : 4+4])
	p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	{
		l := binary.BigEndian.Uint32(data[24 : 24+4])
		data = data[28:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.TxnKnownList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TxnKnownList[i]
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 28 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *FetchTransactions) neoMsgEncodedLenM() int {
	return 21 + msgpack.Uint32Size(p.Partition) + msgpack.Uint32Size(p.Length) + msgpack.ArrayHeadSize(len(p.TxnKnownList)) + len(p.TxnKnownList)*10
}

func (p *FetchTransactions) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 5)
	{
		n := msgpack.PutUint32(data[1:], p.Partition)
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.Length)
		data = data[0+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.MinTid))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.MaxTid))
	{
		l := len(p.TxnKnownList)
		n := msgpack.PutArrayHead(data[20:], l)
		data = data[20+n:]
		for i := 0; i < l; i++ {
			a := &p.TxnKnownList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *FetchTransactions) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|5; op != opOk {
		return 0, &mstructDecodeError{"FetchTransactions", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("FetchTransactions.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("FetchTransactions.Length", err)
		}
		p.Length = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 20 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FetchTransactions.MinTid", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("FetchTransactions.MinTid", l, 8)
	}
	p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FetchTransactions.MaxTid", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("FetchTransactions.MaxTid", l, 8)
	}
	p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	{
		data = data[20:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("FetchTransactions.TxnKnownList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.TxnKnownList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TxnKnownList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("FetchTransactions", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("FetchTransactions", l, 8)
			}
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 21 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 61 | answerBit. AnswerFetchTransactions

func (*AnswerFetchTransactions) neoMsgCode() uint16 {
	return 61 | answerBit
}

func (p *AnswerFetchTransactions) neoMsgEncodedLenN() int {
	return 20 + len(p.TxnDeleteList)*8
}

func (p *AnswerFetchTransactions) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PackTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.NextTid))
	{
		l := len(p.TxnDeleteList)
		binary.BigEndian.PutUint32(data[16:], uint32(l))
		data = data[20:]
		for i := 0; i < l; i++ {
			a := &p.TxnDeleteList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AnswerFetchTransactions) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 20 {
		goto overflow
	}
	p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	{
		l := binary.BigEndian.Uint32(data[16 : 16+4])
		data = data[20:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.TxnDeleteList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TxnDeleteList[i]
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 20 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerFetchTransactions) neoMsgEncodedLenM() int {
	return 21 + msgpack.ArrayHeadSize(len(p.TxnDeleteList)) + len(p.TxnDeleteList)*10
}

func (p *AnswerFetchTransactions) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 3)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.PackTid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.NextTid))
	{
		l := len(p.TxnDeleteList)
		n := msgpack.PutArrayHead(data[21:], l)
		data = data[21+n:]
		for i := 0; i < l; i++ {
			a := &p.TxnDeleteList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AnswerFetchTransactions) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 21 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
		return 0, &mstructDecodeError{"AnswerFetchTransactions", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerFetchTransactions.PackTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerFetchTransactions.PackTid", l, 8)
	}
	p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerFetchTransactions.NextTid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AnswerFetchTransactions.NextTid", l, 8)
	}
	p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	{
		data = data[21:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerFetchTransactions.TxnDeleteList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.TxnDeleteList = make([]zodb.Tid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.TxnDeleteList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerFetchTransactions", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerFetchTransactions", l, 8)
			}
			(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 21 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 62. FetchObjects

func (*FetchObjects) neoMsgCode() uint16 {
	return 62
}

func (p *FetchObjects) neoMsgEncodedLenN() int {
	var size int
	for key := range p.ObjKnownDict {
		size += len(p.ObjKnownDict[key]) * 8
	}
	return 36 + len(p.ObjKnownDict)*12 + size
}

func (p *FetchObjects) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint32(data[0:], p.Partition)
	binary.BigEndian.PutUint32(data[4:], p.Length)
	binary.BigEndian.PutUint64(data[8:], uint64(p.MinTid))
	binary.BigEndian.PutUint64(data[16:], uint64(p.MaxTid))
	binary.BigEndian.PutUint64(data[24:], uint64(p.MinOid))
	{
		l := len(p.ObjKnownDict)
		binary.BigEndian.PutUint32(data[32:], uint32(l))
		data = data[36:]
		keyv := make([]zodb.Tid, 0, l)
		for key := range p.ObjKnownDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			binary.BigEndian.PutUint64(data[0:], uint64(key))
			{
				l := len(p.ObjKnownDict[key])
				binary.BigEndian.PutUint32(data[8:], uint32(l))
				data = data[12:]
				for i := 0; i < l; i++ {
					a := &p.ObjKnownDict[key][i]
					binary.BigEndian.PutUint64(data[0:], uint64((*a)))
					data = data[8:]
				}
			}
		}
	}
}

func (p *FetchObjects) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 36 {
		goto overflow
	}
	p.Partition = binary.BigEndian.Uint32(data[0 : 0+4])
	p.Length = binary.BigEndian.Uint32(data[4 : 4+4])
	p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[16 : 16+8]))
	p.MinOid = zodb.Oid(binary.BigEndian.Uint64(data[24 : 24+8]))
	{
		l := binary.BigEndian.Uint32(data[32 : 32+4])
		data = data[36:]
		p.ObjKnownDict = make(map[zodb.Tid][]zodb.Oid, l)
		m := p.ObjKnownDict
		for i := 0; uint32(i) < l; i++ {
			if len(data) < 12 {
				goto overflow
			}
			var key zodb.Tid
			key = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			var mv []zodb.Oid
			{
				l := binary.BigEndian.Uint32(data[8 : 8+4])
				data = data[12:]
				if uint64(len(data)) < uint64(l)*8 {
					goto overflow
				}
				nread += uint64(l) * 8
				mv = make([]zodb.Oid, l)
				for i := 0; uint32(i) < l; i++ {
					a := &mv[i]
					(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
					data = data[8:]
				}
			}
			m[key] = mv
		}
		nread += uint64(l) * 12
	}
	return 36 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *FetchObjects) neoMsgEncodedLenM() int {
	var size int
	for key := range p.ObjKnownDict {
		size += msgpack.ArrayHeadSize(len(p.ObjKnownDict[key])) + len(p.ObjKnownDict[key])*10
	}
	return 31 + msgpack.Uint32Size(p.Partition) + msgpack.Uint32Size(p.Length) + msgpack.MapHeadSize(len(p.ObjKnownDict)) + len(p.ObjKnownDict)*10 + size
}

func (p *FetchObjects) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 6)
	{
		n := msgpack.PutUint32(data[1:], p.Partition)
		data = data[1+n:]
	}
	{
		n := msgpack.PutUint32(data[0:], p.Length)
		data = data[0+n:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.MinTid))
	data[10] = byte(msgpack.Bin8)
	data[11] = 8
	binary.BigEndian.PutUint64(data[12:], uint64(p.MaxTid))
	data[20] = byte(msgpack.Bin8)
	data[21] = 8
	binary.BigEndian.PutUint64(data[22:], uint64(p.MinOid))
	{
		l := len(p.ObjKnownDict)
		n := msgpack.PutMapHead(data[30:], l)
		data = data[30+n:]
		keyv := make([]zodb.Tid, 0, l)
		for key := range p.ObjKnownDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64(key))
			{
				l := len(p.ObjKnownDict[key])
				n := msgpack.PutArrayHead(data[10:], l)
				data = data[10+n:]
				for i := 0; i < l; i++ {
					a := &p.ObjKnownDict[key][i]
					data[0] = byte(msgpack.Bin8)
					data[1] = 8
					binary.BigEndian.PutUint64(data[2:], uint64((*a)))
					data = data[10:]
				}
			}
		}
	}
}

func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|6; op != opOk {
		return 0, &mstructDecodeError{"FetchObjects", op, opOk}
	}
	data = data[1:]
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("FetchObjects.Partition", err)
		}
		p.Partition = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		v, tail, err := msgp.ReadUint32Bytes(data)
		if err != nil {
			return 0, mdecodeErr("FetchObjects.Length", err)
		}
		p.Length = v
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 30 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FetchObjects.MinTid", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("FetchObjects.MinTid", l, 8)
	}
	p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	if op := msgpack.Op(data[10]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FetchObjects.MaxTid", op, msgpack.Bin8)
	}
	if l := data[11]; l != 8 {
		return 0, mdecodeLen8Err("FetchObjects.MaxTid", l, 8)
	}
	p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
	if op := msgpack.Op(data[20]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("FetchObjects.MinOid", op, msgpack.Bin8)
	}
	if l := data[21]; l != 8 {
		return 0, mdecodeLen8Err("FetchObjects.MinOid", l, 8)
	}
	p.MinOid = zodb.Oid(binary.BigEndian.Uint64(data[22:]))
	{
		data = data[30:]
		l, tail, err := msgp.ReadMapHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("FetchObjects.ObjKnownDict", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.ObjKnownDict = make(map[zodb.Tid][]zodb.Oid, l)
		m := p.ObjKnownDict
		for i := 0; uint32(i) < l; i++ {
			if len(data) < 10 {
				goto overflow
			}
			var key zodb.Tid
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("FetchObjects", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("FetchObjects", l, 8)
			}
			key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			var mv []zodb.Oid
			{
				data = data[10:]
				l, tail, err := msgp.ReadArrayHeaderBytes(data)
				if err != nil {
					return 0, mdecodeErr("FetchObjects", err)
				}
				nread += uint64(len(data) - len(tail))
				data = tail
				if uint64(len(data)) < uint64(l)*10 {
					goto overflow
				}
				nread += uint64(l) * 10
				mv = make([]zodb.Oid, l)
				for i := 0; uint32(i) < l; i++ {
					a := &mv[i]
					if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
						return 0, mdecodeOpErr("FetchObjects", op, msgpack.Bin8)
					}
					if l := data[1]; l != 8 {
						return 0, mdecodeLen8Err("FetchObjects", l, 8)
					}
					(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
					data = data[10:]
				}
			}
			m[key] = mv
		}
		nread += uint64(l) * 10
	}
	return 31 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 62 | answerBit. AnswerFetchObjects

func (*AnswerFetchObjects) neoMsgCode() uint16 {
	return 62 | answerBit
}

func (p *AnswerFetchObjects) neoMsgEncodedLenN() int {
	var size int
	for key := range p.ObjDeleteDict {
		size += len(p.ObjDeleteDict[key]) * 8
	}
	return 28 + len(p.ObjDeleteDict)*12 + size
}

func (p *AnswerFetchObjects) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.PackTid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.NextTid))
	binary.BigEndian.PutUint64(data[16:], uint64(p.NextOid))
	{
		l := len(p.ObjDeleteDict)
		binary.BigEndian.PutUint32(data[24:], uint32(l))
		data = data[28:]
		keyv := make([]zodb.Tid, 0, l)
		for key := range p.ObjDeleteDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			binary.BigEndian.PutUint64(data[0:], uint64(key))
			{
				l := len(p.ObjDeleteDict[key])
				binary.BigEndian.PutUint32(data[8:], uint32(l))
				data = data[12:]
				for i := 0; i < l; i++ {
					a := &p.ObjDeleteDict[key][i]
					binary.BigEndian.PutUint64(data[0:], uint64((*a)))
					data = data[8:]
				}
			}
		}
	}
}

func (p *AnswerFetchObjects) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 28 {
		goto overflow
	}
	p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.NextOid = zodb.Oid(binary.BigEndian.Uint64(data[16 : 16+8]))
	{
		l := binary.BigEndian.Uint32(data[24 : 24+4])
		data = data[28:]
		p.ObjDeleteDict = make(map[zodb.Tid][]zodb.Oid, l)
		m := p.ObjDeleteDict
		for i := 0; uint32(i) < l; i++ {
			if len(data) < 12 {
				goto overflow
			}
			var key zodb.Tid
			key = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
			var mv []zodb.Oid
			{
				l := binary.BigEndian.Uint32(data[8 : 8+4])
				data = data[12:]
				if uint64(len(data)) < uint64(l)*8 {
					goto overflow
				}
				nread += uint64(l) * 8
				mv = make([]zodb.Oid, l)
				for i := 0; uint32(i) < l; i++ {
					a := &mv[i]
					(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
					data = data[8:]
				}
			}
			m[key] = mv
		}
		nread += uint64(l) * 12
	}
	return 28 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AnswerFetchObjects) neoMsgEncodedLenM() int {
	var size int
	for key := range p.ObjDeleteDict {
		size += msgpack.ArrayHeadSize(len(p.ObjDeleteDict[key])) + len(p.ObjDeleteDict[key])*10
	}
	return 31 + msgpack.MapHeadSize(len(p.ObjDeleteDict)) + len(p.ObjDeleteDict)*10 + size
}

func (p *AnswerFetchObjects) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 4)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.PackTid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.NextTid))
	data[21] = byte(msgpack.Bin8)
	data[22] = 8
	binary.BigEndian.PutUint64(data[23:], uint64(p.NextOid))
	{
		l := len(p.ObjDeleteDict)
		n := msgpack.PutMapHead(data[31:], l)
		data = data[31+n:]
		keyv := make([]zodb.Tid, 0, l)
		for key := range p.ObjDeleteDict {
			keyv = append(keyv, key)
		}
		sort.Slice(keyv, func(i, j int) bool { return keyv[i] < keyv[j] })
		for _, key := range keyv {
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64(key))
			{
				l := len(p.ObjDeleteDict[key])
				n := msgpack.PutArrayHead(data[10:], l)
				data = data[10+n:]
				for i := 0; i < l; i++ {
					a := &p.ObjDeleteDict[key][i]
					data[0] = byte(msgpack.Bin8)
					data[1] = 8
					binary.BigEndian.PutUint64(data[2:], uint64((*a)))
					data = data[10:]
				}
			}
		}
	}
}

func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 31 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|4; op != opOk {
		return 0, &mstructDecodeError{"AnswerFetchObjects", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerFetchObjects.PackTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AnswerFetchObjects.PackTid", l, 8)
	}
	p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerFetchObjects.NextTid", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AnswerFetchObjects.NextTid", l, 8)
	}
	p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	if op := msgpack.Op(data[21]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AnswerFetchObjects.NextOid", op, msgpack.Bin8)
	}
	if l := data[22]; l != 8 {
		return 0, mdecodeLen8Err("AnswerFetchObjects.NextOid", l, 8)
	}
	p.NextOid = zodb.Oid(binary.BigEndian.Uint64(data[23:]))
	{
		data = data[31:]
		l, tail, err := msgp.ReadMapHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AnswerFetchObjects.ObjDeleteDict", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		p.ObjDeleteDict = make(map[zodb.Tid][]zodb.Oid, l)
		m := p.ObjDeleteDict
		for i := 0; uint32(i) < l; i++ {
			if len(data) < 10 {
				goto overflow
			}
			var key zodb.Tid
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AnswerFetchObjects", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AnswerFetchObjects", l, 8)
			}
			key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
			var mv []zodb.Oid
			{
				data = data[10:]
				l, tail, err := msgp.ReadArrayHeaderBytes(data)
				if err != nil {
					return 0, mdecodeErr("AnswerFetchObjects", err)
				}
				nread += uint64(len(data) - len(tail))
				data = tail
				if uint64(len(data)) < uint64(l)*10 {
					goto overflow
				}
				nread += uint64(l) * 10
				mv = make([]zodb.Oid, l)
				for i := 0; uint32(i) < l; i++ {
					a := &mv[i]
					if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
						return 0, mdecodeOpErr("AnswerFetchObjects", op, msgpack.Bin8)
					}
					if l := data[1]; l != 8 {
						return 0, mdecodeLen8Err("AnswerFetchObjects", l, 8)
					}
					(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
					data = data[10:]
				}
			}
			m[key] = mv
		}
		nread += uint64(l) * 10
	}
	return 31 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 63. AddTransaction

func (*AddTransaction) neoMsgCode() uint16 {
	return 63
}

func (p *AddTransaction) neoMsgEncodedLenN() int {
	return 33 + len(p.User) + len(p.Description) + len(p.Extension) + len(p.OidList)*8
}

func (p *AddTransaction) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
	{
		l := uint32(len(p.User))
		binary.BigEndian.PutUint32(data[8:], l)
		data = data[12:]
		copy(data, p.User)
		data = data[l:]
	}
	{
		l := uint32(len(p.Description))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.Description)
		data = data[l:]
	}
	{
		l := uint32(len(p.Extension))
		binary.BigEndian.PutUint32(data[0:], l)
		data = data[4:]
		copy(data, p.Extension)
		data = data[l:]
	}
	(data[0:])[0] = bool2byte(p.Packed)
	binary.BigEndian.PutUint64(data[1:], uint64(p.TTid))
	{
		l := len(p.OidList)
		binary.BigEndian.PutUint32(data[9:], uint32(l))
		data = data[13:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			binary.BigEndian.PutUint64(data[0:], uint64((*a)))
			data = data[8:]
		}
	}
}

func (p *AddTransaction) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 12 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	{
		l := binary.BigEndian.Uint32(data[8 : 8+4])
		data = data[12:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.User = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 4+uint64(l) {
			goto overflow
		}
		nread += 4 + uint64(l)
		p.Description = string(data[:l])
		data = data[l:]
	}
	{
		l := binary.BigEndian.Uint32(data[0 : 0+4])
		data = data[4:]
		if uint64(len(data)) < 13+uint64(l) {
			goto overflow
		}
		nread += 13 + uint64(l)
		p.Extension = string(data[:l])
		data = data[l:]
	}
	p.Packed = byte2bool((data[0 : 0+1])[0])
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[1 : 1+8]))
	{
		l := binary.BigEndian.Uint32(data[9 : 9+4])
		data = data[13:]
		if uint64(len(data)) < uint64(l)*8 {
			goto overflow
		}
		nread += uint64(l) * 8
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
			data = data[8:]
		}
	}
	return 12 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AddTransaction) neoMsgEncodedLenM() int {
	return 22 + msgpack.BinHeadSize(len(p.User)) + len(p.User) + msgpack.BinHeadSize(len(p.Description)) + len(p.Description) + msgpack.BinHeadSize(len(p.Extension)) + len(p.Extension) + msgpack.ArrayHeadSize(len(p.OidList)) + len(p.OidList)*10
}

func (p *AddTransaction) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 7)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
	{
		l := len(p.User)
		n := msgpack.PutBinHead(data[11:], l)
		data = data[11+n:]
		copy(data, p.User)
		data = data[l:]
	}
	{
		l := len(p.Description)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.Description)
		data = data[l:]
	}
	{
		l := len(p.Extension)
		n := msgpack.PutBinHead(data[0:], l)
		data = data[0+n:]
		copy(data, p.Extension)
		data = data[l:]
	}
	data[0] = byte(msgpack.Bool(p.Packed))
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.TTid))
	{
		l := len(p.OidList)
		n := msgpack.PutArrayHead(data[11:], l)
		data = data[11+n:]
		for i := 0; i < l; i++ {
			a := &p.OidList[i]
			data[0] = byte(msgpack.Bin8)
			data[1] = 8
			binary.BigEndian.PutUint64(data[2:], uint64((*a)))
			data = data[10:]
		}
	}
}

func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|7; op != opOk {
		return 0, &mstructDecodeError{"AddTransaction", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AddTransaction.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AddTransaction.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	data = data[11:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AddTransaction.User", err)
		}
		p.User = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AddTransaction.Description", err)
		}
		p.Description = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AddTransaction.Extension", err)
		}
		p.Extension = string(b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 11 {
		goto overflow
	}
	switch op := msgpack.Op(data[0]); op {
	default:
		return 0, mdecodeOpErr("AddTransaction.Packed", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Packed = true
	case msgpack.False:
		p.Packed = false
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AddTransaction.TTid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AddTransaction.TTid", l, 8)
	}
	p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	{
		data = data[11:]
		l, tail, err := msgp.ReadArrayHeaderBytes(data)
		if err != nil {
			return 0, mdecodeErr("AddTransaction.OidList", err)
		}
		nread += uint64(len(data) - len(tail))
		data = tail
		if uint64(len(data)) < uint64(l)*10 {
			goto overflow
		}
		nread += uint64(l) * 10
		p.OidList = make([]zodb.Oid, l)
		for i := 0; uint32(i) < l; i++ {
			a := &p.OidList[i]
			if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
				return 0, mdecodeOpErr("AddTransaction", op, msgpack.Bin8)
			}
			if l := data[1]; l != 8 {
				return 0, mdecodeLen8Err("AddTransaction", l, 8)
			}
			(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
			data = data[10:]
		}
	}
	return 22 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 64. AddObject

func (*AddObject) neoMsgCode() uint16 {
	return 64
}

func (p *AddObject) neoMsgEncodedLenN() int {
	return 49 + len(p.Data.XData())
}

func (p *AddObject) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
	binary.BigEndian.PutUint64(data[8:], uint64(p.Serial))
	(data[16:])[0] = bool2byte(p.Compression)
	copy(data[17:], p.Checksum[:])
	{
		l := uint32(len(p.Data.XData()))
		binary.BigEndian.PutUint32(data[37:], l)
		data = data[41:]
		copy(data, p.Data.XData())
		data = data[l:]
	}
	binary.BigEndian.PutUint64(data[0:], uint64(p.DataSerial))
}

func (p *AddObject) neoMsgDecodeN(data []byte) (int, error) {
	var nread uint64
	if len(data) < 41 {
		goto overflow
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[0 : 0+8]))
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[8 : 8+8]))
	p.Compression = byte2bool((data[16 : 16+1])[0])
	copy(p.Checksum[:], data[17:37])
	{
		l := binary.BigEndian.Uint32(data[37 : 37+4])
		data = data[41:]
		if uint64(len(data)) < 8+uint64(l) {
			goto overflow
		}
		nread += 8 + uint64(l)
		p.Data = mem.BufAlloc(int(l))
		copy(p.Data.Data, data[:l])
		data = data[l:]
	}
	p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 41 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *AddObject) neoMsgEncodedLenM() int {
	return 54 + msgpack.BinHeadSize(len(p.Data.XData())) + len(p.Data.XData())
}

func (p *AddObject) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 6)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Oid))
	data[11] = byte(msgpack.Bin8)
	data[12] = 8
	binary.BigEndian.PutUint64(data[13:], uint64(p.Serial))
	data[21] = byte(msgpack.Bool(p.Compression))
	data[22] = byte(msgpack.Bin8)
	data[23] = 20
	copy(data[24:], p.Checksum[:])
	{
		l := len(p.Data.XData())
		n := msgpack.PutBinHead(data[44:], l)
		data = data[44+n:]
		copy(data, p.Data.XData())
		data = data[l:]
	}
	data[0] = byte(msgpack.Bin8)
	data[1] = 8
	binary.BigEndian.PutUint64(data[2:], uint64(p.DataSerial))
}

func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) {
	var nread uint64
	if len(data) < 44 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|6; op != opOk {
		return 0, &mstructDecodeError{"AddObject", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AddObject.Oid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("AddObject.Oid", l, 8)
	}
	p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[3:]))
	if op := msgpack.Op(data[11]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AddObject.Serial", op, msgpack.Bin8)
	}
	if l := data[12]; l != 8 {
		return 0, mdecodeLen8Err("AddObject.Serial", l, 8)
	}
	p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[13:]))
	switch op := msgpack.Op(data[21]); op {
	default:
		return 0, mdecodeOpErr("AddObject.Compression", op, msgpack.True, msgpack.False)
	case msgpack.True:
		p.Compression = true
	case msgpack.False:
		p.Compression = false
	}
	if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AddObject.Checksum", op, msgpack.Bin8)
	}
	if l := data[23]; l != 20 {
		return 0, mdecodeLen8Err("AddObject.Checksum", l, 20)
	}
	copy(p.Checksum[:], data[24:44])
	data = data[44:]
	{
		b, tail, err := msgp.ReadBytesZC(data)
		if err != nil {
			return 0, mdecodeErr("AddObject.Data", err)
		}
		p.Data = mem.BufAlloc(len(b))
		copy(p.Data.Data, b)
		nread += uint64(len(data) - len(tail))
		data = tail
	}
	if len(data) < 10 {
		goto overflow
	}
	if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("AddObject.DataSerial", op, msgpack.Bin8)
	}
	if l := data[1]; l != 8 {
		return 0, mdecodeLen8Err("AddObject.DataSerial", l, 8)
	}
	p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
	return 54 + int(nread), nil

overflow:
	return 0, ErrDecodeOverflow
}

// 65. Truncate

func (*Truncate) neoMsgCode() uint16 {
	return 65
}

func (p *Truncate) neoMsgEncodedLenN() int {
	return 8
}

func (p *Truncate) neoMsgEncodeN(data []byte) {
	binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
}

func (p *Truncate) neoMsgDecodeN(data []byte) (int, error) {
	if len(data) < 8 {
		goto overflow
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[0 : 0+8]))
	return 8, nil

overflow:
	return 0, ErrDecodeOverflow
}

func (p *Truncate) neoMsgEncodedLenM() int {
	return 11
}

func (p *Truncate) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 1)
	data[1] = byte(msgpack.Bin8)
	data[2] = 8
	binary.BigEndian.PutUint64(data[3:], uint64(p.Tid))
}

func (p *Truncate) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 11 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|1; op != opOk {
		return 0, &mstructDecodeError{"Truncate", op, opOk}
	}
	if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
		return 0, mdecodeOpErr("Truncate.Tid", op, msgpack.Bin8)
	}
	if l := data[2]; l != 8 {
		return 0, mdecodeLen8Err("Truncate.Tid", l, 8)
	}
	p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
	return 11, nil

overflow:
	return 0, ErrDecodeOverflow
}

// 66. FlushLog

func (*FlushLog) neoMsgCode() uint16 {
	return 66
}

func (p *FlushLog) neoMsgEncodedLenN() int {
	return 0
}

func (p *FlushLog) neoMsgEncodeN(data []byte) {
}

func (p *FlushLog) neoMsgDecodeN(data []byte) (int, error) {
	return 0, nil
}

func (p *FlushLog) neoMsgEncodedLenM() int {
	return 1
}

func (p *FlushLog) neoMsgEncodeM(data []byte) {
	data[0] = byte(msgpack.FixArray_4 | 0)
}

func (p *FlushLog) neoMsgDecodeM(data []byte) (int, error) {
	if len(data) < 1 {
		goto overflow
	}
	if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|0; op != opOk {
		return 0, &mstructDecodeError{"FlushLog", op, opOk}
	}
	return 1, nil

overflow:
	return 0, ErrDecodeOverflow
}

// registry of message types
var msgTypeRegistry = map[uint16]reflect.Type{
	0 | answerBit:  reflect.TypeOf(Error{}),
	1:              reflect.TypeOf(RequestIdentification{}),
	1 | answerBit:  reflect.TypeOf(AcceptIdentification{}),
	2:              reflect.TypeOf(Ping{}),
	2 | answerBit:  reflect.TypeOf(Pong{}),
	3:              reflect.TypeOf(CloseClient{}),
	4:              reflect.TypeOf(PrimaryMaster{}),
	4 | answerBit:  reflect.TypeOf(AnswerPrimary{}),
	5:              reflect.TypeOf(NotPrimaryMaster{}),
	6:              reflect.TypeOf(NotifyNodeInformation{}),
	7:              reflect.TypeOf(Recovery{}),
	7 | answerBit:  reflect.TypeOf(AnswerRecovery{}),
	8:              reflect.TypeOf(LastIDs{}),
	8 | answerBit:  reflect.TypeOf(AnswerLastIDs{}),
	9:              reflect.TypeOf(AskPartitionTable{}),
	9 | answerBit:  reflect.TypeOf(AnswerPartitionTable{}),
	10:             reflect.TypeOf(SendPartitionTable{}),
	11:             reflect.TypeOf(NotifyPartitionChanges{}),
	12:             reflect.TypeOf(StartOperation{}),
	13:             reflect.TypeOf(StopOperation{}),
	14:             reflect.TypeOf(UnfinishedTransactions{}),
	14 | answerBit: reflect.TypeOf(AnswerUnfinishedTransactions{}),
	15:             reflect.TypeOf(LockedTransactions{}),
	15 | answerBit: reflect.TypeOf(AnswerLockedTransactions{}),
	16:             reflect.TypeOf(FinalTID{}),
	16 | answerBit: reflect.TypeOf(AnswerFinalTID{}),
	17:             reflect.TypeOf(ValidateTransaction{}),
	18:             reflect.TypeOf(BeginTransaction{}),
	18 | answerBit: reflect.TypeOf(AnswerBeginTransaction{}),
	19:             reflect.TypeOf(FailedVote{}),
	20:             reflect.TypeOf(FinishTransaction{}),
	20 | answerBit: reflect.TypeOf(AnswerTransactionFinished{}),
	21:             reflect.TypeOf(LockInformation{}),
	21 | answerBit: reflect.TypeOf(AnswerInformationLocked{}),
	22:             reflect.TypeOf(InvalidateObjects{}),
	23:             reflect.TypeOf(NotifyUnlockInformation{}),
	24:             reflect.TypeOf(AskNewOIDs{}),
	24 | answerBit: reflect.TypeOf(AnswerNewOIDs{}),
	25:             reflect.TypeOf(NotifyDeadlock{}),
	26:             reflect.TypeOf(RebaseTransaction{}),
	26 | answerBit: reflect.TypeOf(AnswerRebaseTransaction{}),
	27:             reflect.TypeOf(RebaseObject{}),
	27 | answerBit: reflect.TypeOf(AnswerRebaseObject{}),
	28:             reflect.TypeOf(StoreObject{}),
	28 | answerBit: reflect.TypeOf(AnswerStoreObject{}),
	29:             reflect.TypeOf(AbortTransaction{}),
	30:             reflect.TypeOf(StoreTransaction{}),
	30 | answerBit: reflect.TypeOf(AnswerStoreTransaction{}),
	31:             reflect.TypeOf(VoteTransaction{}),
	31 | answerBit: reflect.TypeOf(AnswerVoteTransaction{}),
	32:             reflect.TypeOf(GetObject{}),
	32 | answerBit: reflect.TypeOf(AnswerObject{}),
	33:             reflect.TypeOf(AskTIDs{}),
	33 | answerBit: reflect.TypeOf(AnswerTIDs{}),
	34:             reflect.TypeOf(TransactionInformation{}),
	34 | answerBit: reflect.TypeOf(AnswerTransactionInformation{}),
	35:             reflect.TypeOf(ObjectHistory{}),
	35 | answerBit: reflect.TypeOf(AnswerObjectHistory{}),
	36:             reflect.TypeOf(PartitionList{}),
	36 | answerBit: reflect.TypeOf(AnswerPartitionList{}),
	37:             reflect.TypeOf(NodeList{}),
	37 | answerBit: reflect.TypeOf(AnswerNodeList{}),
	38:             reflect.TypeOf(SetNodeState{}),
	39:             reflect.TypeOf(AddPendingNodes{}),
	40:             reflect.TypeOf(TweakPartitionTable{}),
	40 | answerBit: reflect.TypeOf(AnswerTweakPartitionTable{}),
	41:             reflect.TypeOf(SetNumReplicas{}),
	42:             reflect.TypeOf(SetClusterState{}),
	43:             reflect.TypeOf(Repair{}),
	44:             reflect.TypeOf(RepairOne{}),
	45:             reflect.TypeOf(NotifyClusterState{}),
	46:             reflect.TypeOf(AskClusterState{}),
	46 | answerBit: reflect.TypeOf(AnswerClusterState{}),
	47:             reflect.TypeOf(ObjectUndoSerial{}),
	47 | answerBit: reflect.TypeOf(AnswerObjectUndoSerial{}),
	48:             reflect.TypeOf(AskTIDsFrom{}),
	48 | answerBit: reflect.TypeOf(AnswerTIDsFrom{}),
	49:             reflect.TypeOf(Pack{}),
	49 | answerBit: reflect.TypeOf(AnswerPack{}),
	50:             reflect.TypeOf(CheckReplicas{}),
	51:             reflect.TypeOf(CheckPartition{}),
	52:             reflect.TypeOf(CheckTIDRange{}),
	52 | answerBit: reflect.TypeOf(AnswerCheckTIDRange{}),
	53:             reflect.TypeOf(CheckSerialRange{}),
	53 | answerBit: reflect.TypeOf(AnswerCheckSerialRange{}),
	54:             reflect.TypeOf(PartitionCorrupted{}),
	55:             reflect.TypeOf(NotifyReady{}),
	56:             reflect.TypeOf(LastTransaction{}),
	56 | answerBit: reflect.TypeOf(AnswerLastTransaction{}),
	57:             reflect.TypeOf(CheckCurrentSerial{}),
	57 | answerBit: reflect.TypeOf(AnswerCheckCurrentSerial{}),
	58:             reflect.TypeOf(NotifyTransactionFinished{}),
	59:             reflect.TypeOf(Replicate{}),
	60:             reflect.TypeOf(ReplicationDone{}),
	61:             reflect.TypeOf(FetchTransactions{}),
	61 | answerBit: reflect.TypeOf(AnswerFetchTransactions{}),
	62:             reflect.TypeOf(FetchObjects{}),
	62 | answerBit: reflect.TypeOf(AnswerFetchObjects{}),
	63:             reflect.TypeOf(AddTransaction{}),
	64:             reflect.TypeOf(AddObject{}),
	65:             reflect.TypeOf(Truncate{}),
	66:             reflect.TypeOf(FlushLog{}),
}
