// EncodeMsg implements msgp.Encodable
334517
func (z NestInner) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 1
	// write "hello"
	err = en.Append(0x81, 0xa5, 0x68, 0x65, 0x6c, 0x6c, 0x6f)
	if err != nil {
		return
	}
	err = en.WriteString(z.Hello)
	if err != nil {
		return
	}
	return
}
1195596
func (z *Event) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 5
	// write "id"
	err = en.Append(0x85, 0xa2, 0x69, 0x64)
	if err != nil {
		return
	}
	err = en.WriteInt(z.Id)
	if err != nil {
		return
	}
	// write "user"
	// map header, size 2
	// write "first"
	err = en.Append(0xa4, 0x75, 0x73, 0x65, 0x72, 0x82, 0xa5, 0x66, 0x69, 0x72, 0x73, 0x74)
	if err != nil {
		return
	}
	err = en.WriteString(z.User.First)
	if err != nil {
		return
	}
	// write "last"
	err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
	if err != nil {
		return
	}
	err = en.WriteString(z.User.Last)
	if err != nil {
		return
	}
	// write "flight"
	err = en.Append(0xa6, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74)
	if err != nil {
		return
	}
	err = en.WriteString(z.Flight)
	if err != nil {
		return
	}
	// write "pilot"
	err = en.Append(0xa5, 0x70, 0x69, 0x6c, 0x6f, 0x74)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Pilot)))
	if err != nil {
		return
	}
	for za0001 := range z.Pilot {
		err = en.WriteString(z.Pilot[za0001])
		if err != nil {
			return
		}
	}
	// write "cancelled"
	err = en.Append(0xa9, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64)
	if err != nil {
		return
	}
	err = en.WriteBool(z.Cancelled)
	if err != nil {
		return
	}
	return
}
1318723
func (z *NestOuter) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 1
	// write "inner"
	err = en.Append(0x81, 0xa5, 0x69, 0x6e, 0x6e, 0x65, 0x72)
	if err != nil {
		return
	}
	if z.Inner == nil {
		err = en.WriteNil()
		if err != nil {
			return
		}
	} else {
		// map header, size 1
		// write "hello"
		err = en.Append(0x81, 0xa5, 0x68, 0x65, 0x6c, 0x6c, 0x6f)
		if err != nil {
			return
		}
		err = en.WriteString(z.Inner.Hello)
		if err != nil {
			return
		}
	}
	return
}
809937
func (z *IndexFindByTagResp) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 1
	// write "Metrics"
	err = en.Append(0x81, 0xa7, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Metrics)))
	if err != nil {
		err = msgp.WrapError(err, "Metrics")
		return
	}
	for za0001 := range z.Metrics {
		err = z.Metrics[za0001].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, "Metrics", za0001)
			return
		}
	}
	return
}
132180
func (z uint16Slice) EncodeMsg(en *msgp.Writer) (err error) {
	err = en.WriteArrayHeader(uint32(len(z)))
	if err != nil {
		return
	}
	for zzpf := range z {
		err = en.WriteUint16(z[zzpf])
		if err != nil {
			return
		}
	}
	return
}
153345
func (w *etmWriter) WriteMsg(b []byte) error {
	w.Lock()
	defer w.Unlock()

	// encrypt.
	buf := pool.Get(4 + len(b) + w.mac.Size())
	defer pool.Put(buf)
	data := buf[4 : 4+len(b)]
	w.str.XORKeyStream(data, b)

	// log.Debugf("ENC plaintext (%d): %s %v", len(b), b, b)
	// log.Debugf("ENC ciphertext (%d): %s %v", len(data), data, data)

	// then, mac.
	if _, err := w.mac.Write(data); err != nil {
		return err
	}

	// Sum appends.
	data = w.mac.Sum(data)
	w.mac.Reset()
	binary.BigEndian.PutUint32(buf[:4], uint32(len(data)))

	_, err := w.w.Write(buf)
	return err
}
812888
func (z *bitmapContainer) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zbzg uint32
	zbzg, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zbzg > 0 {
		zbzg--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "cardinality":
			z.cardinality, err = dc.ReadInt()
			if err != nil {
				return
			}
		case "bitmap":
			var zbai uint32
			zbai, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.bitmap) >= int(zbai) {
				z.bitmap = (z.bitmap)[:zbai]
			} else {
				z.bitmap = make([]uint64, zbai)
			}
			for zxvk := range z.bitmap {
				z.bitmap[zxvk], err = dc.ReadUint64()
				if err != nil {
					return
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
893048
func (z *IterGen) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 3
	// string "T0"
	o = append(o, 0x83, 0xa2, 0x54, 0x30)
	o = msgp.AppendUint32(o, z.T0)
	// string "IntervalHint"
	o = append(o, 0xac, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x48, 0x69, 0x6e, 0x74)
	o = msgp.AppendUint32(o, z.IntervalHint)
	// string "B"
	o = append(o, 0xa1, 0x42)
	o = msgp.AppendBytes(o, z.B)
	return
}
1043321
func (z *Archive) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 4
	// write "RowKey"
	err = en.Append(0x84, 0xa6, 0x52, 0x6f, 0x77, 0x4b, 0x65, 0x79)
	if err != nil {
		return
	}
	err = en.WriteString(z.RowKey)
	if err != nil {
		err = msgp.WrapError(err, "RowKey")
		return
	}
	// write "SecondsPerPoint"
	err = en.Append(0xaf, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x50, 0x65, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74)
	if err != nil {
		return
	}
	err = en.WriteUint32(z.SecondsPerPoint)
	if err != nil {
		err = msgp.WrapError(err, "SecondsPerPoint")
		return
	}
	// write "Points"
	err = en.Append(0xa6, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73)
	if err != nil {
		return
	}
	err = en.WriteUint32(z.Points)
	if err != nil {
		err = msgp.WrapError(err, "Points")
		return
	}
	// write "Chunks"
	err = en.Append(0xa6, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Chunks)))
	if err != nil {
		err = msgp.WrapError(err, "Chunks")
		return
	}
	for za0001 := range z.Chunks {
		err = z.Chunks[za0001].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, "Chunks", za0001)
			return
		}
	}
	return
}
516051
func (z Entry) EncodeMsg(en *msgp.Writer) (err error) {
	// array header, size 2
	err = en.Append(0x92)
	if err != nil {
		return
	}
	err = en.WriteInt64(z.Time)
	if err != nil {
		err = msgp.WrapError(err, "Time")
		return
	}
	err = en.WriteIntf(z.Record)
	if err != nil {
		err = msgp.WrapError(err, "Record")
		return
	}
	return
}
1028942
func (*MsgCodec) DecodeMsg(data []byte, msg api.Message) error {
	if msg == nil {
		return errors.New("nil message passed in")
	}

	var header interface{}

	// check which header is expected
	switch msg.GetMessageType() {
	case api.RequestMessage:
		header = new(VppRequestHeader)
	case api.ReplyMessage:
		header = new(VppReplyHeader)
	case api.EventMessage:
		header = new(VppEventHeader)
	default:
		header = new(VppOtherHeader)
	}

	buf := bytes.NewReader(data)

	// decode message header
	if err := struc.Unpack(buf, header); err != nil {
		return fmt.Errorf("failed to decode message header: %+v, error: %v", header, err)
	}

	// decode message content
	if err := struc.Unpack(buf, msg); err != nil {
		return fmt.Errorf("failed to decode message data: %+v, error: %v", data, err)
	}

	return nil
}
483364
func (z *Node) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 4
	// write "Path"
	err = en.Append(0x84, 0xa4, 0x50, 0x61, 0x74, 0x68)
	if err != nil {
		return
	}
	err = en.WriteString(z.Path)
	if err != nil {
		err = msgp.WrapError(err, "Path")
		return
	}
	// write "Leaf"
	err = en.Append(0xa4, 0x4c, 0x65, 0x61, 0x66)
	if err != nil {
		return
	}
	err = en.WriteBool(z.Leaf)
	if err != nil {
		err = msgp.WrapError(err, "Leaf")
		return
	}
	// write "Defs"
	err = en.Append(0xa4, 0x44, 0x65, 0x66, 0x73)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Defs)))
	if err != nil {
		err = msgp.WrapError(err, "Defs")
		return
	}
	for za0001 := range z.Defs {
		err = z.Defs[za0001].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, "Defs", za0001)
			return
		}
	}
	// write "HasChildren"
	err = en.Append(0xab, 0x48, 0x61, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e)
	if err != nil {
		return
	}
	err = en.WriteBool(z.HasChildren)
	if err != nil {
		err = msgp.WrapError(err, "HasChildren")
		return
	}
	return
}
1110571
func (z *IndexTagsResp) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 1
	// string "Tags"
	o = append(o, 0x81, 0xa4, 0x54, 0x61, 0x67, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Tags)))
	for za0001 := range z.Tags {
		o = msgp.AppendString(o, z.Tags[za0001])
	}
	return
}
424447
func (z *MessageExt) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// array header, size 4
	o = append(o, 0x94)
	o = msgp.AppendString(o, z.Tag)
	o, err = msgp.AppendExtension(o, &z.Time)
	if err != nil {
		err = msgp.WrapError(err, "Time")
		return
	}
	o, err = msgp.AppendIntf(o, z.Record)
	if err != nil {
		err = msgp.WrapError(err, "Record")
		return
	}
	o = msgp.AppendMapHeader(o, uint32(len(z.Option)))
	for za0001, za0002 := range z.Option {
		o = msgp.AppendString(o, za0001)
		o = msgp.AppendString(o, za0002)
	}
	return
}
938160
func (z *contype) DecodeMsg(dc *msgp.Reader) (err error) {
	{
		var zajw uint8
		zajw, err = dc.ReadUint8()
		(*z) = contype(zajw)
	}
	if err != nil {
		return
	}
	return
}
692219
func (z Entry) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// array header, size 2
	o = append(o, 0x92)
	o = msgp.AppendInt64(o, z.Time)
	o, err = msgp.AppendIntf(o, z.Record)
	if err != nil {
		err = msgp.WrapError(err, "Record")
		return
	}
	return
}
1132318
func (z *roaringArray) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 4
	// string "keys"
	o = append(o, 0x84, 0xa4, 0x6b, 0x65, 0x79, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.keys)))
	for zhct := range z.keys {
		o = msgp.AppendUint16(o, z.keys[zhct])
	}
	// string "needCopyOnWrite"
	o = append(o, 0xaf, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x70, 0x79, 0x4f, 0x6e, 0x57, 0x72, 0x69, 0x74, 0x65)
	o = msgp.AppendArrayHeader(o, uint32(len(z.needCopyOnWrite)))
	for zcua := range z.needCopyOnWrite {
		o = msgp.AppendBool(o, z.needCopyOnWrite[zcua])
	}
	// string "copyOnWrite"
	o = append(o, 0xab, 0x63, 0x6f, 0x70, 0x79, 0x4f, 0x6e, 0x57, 0x72, 0x69, 0x74, 0x65)
	o = msgp.AppendBool(o, z.copyOnWrite)
	// string "conserz"
	o = append(o, 0xa7, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x72, 0x7a)
	o = msgp.AppendArrayHeader(o, uint32(len(z.conserz)))
	for zxhx := range z.conserz {
		// map header, size 2
		// string "t"
		o = append(o, 0x82, 0xa1, 0x74)
		o = msgp.AppendUint8(o, uint8(z.conserz[zxhx].t))
		// string "r"
		o = append(o, 0xa1, 0x72)
		o, err = z.conserz[zxhx].r.MarshalMsg(o)
		if err != nil {
			return
		}
	}
	return
}