// EncodeMsg implements msgp.Encodable
540531
func (z *Weather) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 4
	// write "time"
	err = en.Append(0x84, 0xa4, 0x74, 0x69, 0x6d, 0x65)
	if err != nil {
		return
	}
	err = en.WriteTime(z.Time)
	if err != nil {
		return
	}
	// write "size"
	err = en.Append(0xa4, 0x73, 0x69, 0x7a, 0x65)
	if err != nil {
		return
	}
	err = en.WriteInt64(z.Size)
	if err != nil {
		return
	}
	// write "type"
	err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.Type)
	if err != nil {
		return
	}
	// write "details"
	err = en.Append(0xa7, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73)
	if err != nil {
		return
	}
	err = en.WriteBytes(z.Details)
	if err != nil {
		return
	}
	return
}
110468
func (z *runContainer16) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 2
	// write "iv"
	err = en.Append(0x82, 0xa2, 0x69, 0x76)
	if err != nil {
		return err
	}
	err = en.WriteArrayHeader(uint32(len(z.iv)))
	if err != nil {
		return
	}
	for zxpk := range z.iv {
		// map header, size 2
		// write "start"
		err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
		if err != nil {
			return err
		}
		err = en.WriteUint16(z.iv[zxpk].start)
		if err != nil {
			return
		}
		// write "last"
		err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
		if err != nil {
			return err
		}
		err = en.WriteUint16(z.iv[zxpk].last())
		if err != nil {
			return
		}
	}
	// write "card"
	err = en.Append(0xa4, 0x63, 0x61, 0x72, 0x64)
	if err != nil {
		return err
	}
	err = en.WriteInt64(z.card)
	if err != nil {
		return
	}
	return
}
1173843
func (m *Memberlist) encodeAndSendMsg(addr string, msgType messageType, msg interface{}) error {
	out, err := encode(msgType, msg)
	if err != nil {
		return err
	}
	if err := m.sendMsg(addr, out.Bytes()); err != nil {
		return err
	}
	return nil
}
675402
func (z *addHelper16) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 5
	// write "runstart"
	err = en.Append(0x85, 0xa8, 0x72, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x74)
	if err != nil {
		return err
	}
	err = en.WriteUint16(z.runstart)
	if err != nil {
		return
	}
	// write "runlen"
	err = en.Append(0xa6, 0x72, 0x75, 0x6e, 0x6c, 0x65, 0x6e)
	if err != nil {
		return err
	}
	err = en.WriteUint16(z.runlen)
	if err != nil {
		return
	}
	// write "actuallyAdded"
	err = en.Append(0xad, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64)
	if err != nil {
		return err
	}
	err = en.WriteUint16(z.actuallyAdded)
	if err != nil {
		return
	}
	// write "m"
	err = en.Append(0xa1, 0x6d)
	if err != nil {
		return err
	}
	err = en.WriteArrayHeader(uint32(len(z.m)))
	if err != nil {
		return
	}
	for zxvk := range z.m {
		// map header, size 2
		// write "start"
		err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
		if err != nil {
			return err
		}
		err = en.WriteUint16(z.m[zxvk].start)
		if err != nil {
			return
		}
		// write "last"
		err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
		if err != nil {
			return err
		}
		err = en.WriteUint16(z.m[zxvk].last())
		if err != nil {
			return
		}
	}
	// write "rc"
	err = en.Append(0xa2, 0x72, 0x63)
	if err != nil {
		return err
	}
	if z.rc == nil {
		err = en.WriteNil()
		if err != nil {
			return
		}
	} else {
		// map header, size 2
		// write "iv"
		err = en.Append(0x82, 0xa2, 0x69, 0x76)
		if err != nil {
			return err
		}
		err = en.WriteArrayHeader(uint32(len(z.rc.iv)))
		if err != nil {
			return
		}
		for zbzg := range z.rc.iv {
			// map header, size 2
			// write "start"
			err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
			if err != nil {
				return err
			}
			err = en.WriteUint16(z.rc.iv[zbzg].start)
			if err != nil {
				return
			}
			// write "last"
			err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
			if err != nil {
				return err
			}
			err = en.WriteUint16(z.rc.iv[zbzg].last())
			if err != nil {
				return
			}
		}
		// write "card"
		err = en.Append(0xa4, 0x63, 0x61, 0x72, 0x64)
		if err != nil {
			return err
		}
		err = en.WriteInt64(z.rc.card)
		if err != nil {
			return
		}
	}
	return
}
706418
func (*MsgCodec) EncodeMsg(msg api.Message, msgID uint16) (data []byte, err error) {
	if msg == nil {
		return nil, errors.New("nil message passed in")
	}

	// try to recover panic which might possibly occur in struc.Pack call
	defer func() {
		if r := recover(); r != nil {
			var ok bool
			if err, ok = r.(error); !ok {
				err = fmt.Errorf("%v", r)
			}
			err = fmt.Errorf("panic occurred: %v", err)
		}
	}()

	var header interface{}

	// encode message header
	switch msg.GetMessageType() {
	case api.RequestMessage:
		header = &VppRequestHeader{VlMsgID: msgID}
	case api.ReplyMessage:
		header = &VppReplyHeader{VlMsgID: msgID}
	case api.EventMessage:
		header = &VppEventHeader{VlMsgID: msgID}
	default:
		header = &VppOtherHeader{VlMsgID: msgID}
	}

	buf := new(bytes.Buffer)

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

	// encode message content
	if reflect.TypeOf(msg).Elem().NumField() > 0 {
		if err := struc.Pack(buf, msg); err != nil {
			return nil, fmt.Errorf("failed to encode message data: %+v, error: %v", data, err)
		}
	}

	return buf.Bytes(), nil
}
563665
func (z *Consolidator) DecodeMsg(dc *msgp.Reader) (err error) {
	{
		var zb0001 int
		zb0001, err = dc.ReadInt()
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		(*z) = Consolidator(zb0001)
	}
	return
}
1204122
func (z MetricsDeleteResp) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 1
	// write "DeletedDefs"
	err = en.Append(0x81, 0xab, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x44, 0x65, 0x66, 0x73)
	if err != nil {
		return
	}
	err = en.WriteInt(z.DeletedDefs)
	if err != nil {
		err = msgp.WrapError(err, "DeletedDefs")
		return
	}
	return
}
931218
func (z *IndexTagsResp) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, err = dc.ReadMapHeader()
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "Tags":
			var zb0002 uint32
			zb0002, err = dc.ReadArrayHeader()
			if err != nil {
				err = msgp.WrapError(err, "Tags")
				return
			}
			if cap(z.Tags) >= int(zb0002) {
				z.Tags = (z.Tags)[:zb0002]
			} else {
				z.Tags = make([]string, zb0002)
			}
			for za0001 := range z.Tags {
				z.Tags[za0001], err = dc.ReadString()
				if err != nil {
					err = msgp.WrapError(err, "Tags", za0001)
					return
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				err = msgp.WrapError(err)
				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
}
773755
func (z *Archive) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 5
	// write "MetricDefinition"
	err = en.Append(0x85, 0xb0, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e)
	if err != nil {
		return
	}
	err = z.MetricDefinition.EncodeMsg(en)
	if err != nil {
		err = msgp.WrapError(err, "MetricDefinition")
		return
	}
	// write "SchemaId"
	err = en.Append(0xa8, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64)
	if err != nil {
		return
	}
	err = en.WriteUint16(z.SchemaId)
	if err != nil {
		err = msgp.WrapError(err, "SchemaId")
		return
	}
	// write "AggId"
	err = en.Append(0xa5, 0x41, 0x67, 0x67, 0x49, 0x64)
	if err != nil {
		return
	}
	err = en.WriteUint16(z.AggId)
	if err != nil {
		err = msgp.WrapError(err, "AggId")
		return
	}
	// write "IrId"
	err = en.Append(0xa4, 0x49, 0x72, 0x49, 0x64)
	if err != nil {
		return
	}
	err = en.WriteUint16(z.IrId)
	if err != nil {
		err = msgp.WrapError(err, "IrId")
		return
	}
	// write "LastSave"
	err = en.Append(0xa8, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x61, 0x76, 0x65)
	if err != nil {
		return
	}
	err = en.WriteUint32(z.LastSave)
	if err != nil {
		err = msgp.WrapError(err, "LastSave")
		return
	}
	return
}
805407
func (z contype) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendUint8(o, uint8(z))
	return
}
558035
func (z *Key) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 3
	// string "u"
	o = append(o, 0x83, 0xa1, 0x75)
	o = msgp.AppendBytes(o, []byte(z.UUID))
	// string "v"
	o = append(o, 0xa1, 0x76)
	o, err = msgp.AppendIntf(o, z.Value)
	if err != nil {
		return
	}
	// string "p"
	o = append(o, 0xa1, 0x70)
	o = msgp.AppendBytes(o, z.Payload)
	return
}
210693
func (z SeriesListForPickle) EncodeMsg(en *msgp.Writer) (err error) {
	err = en.WriteArrayHeader(uint32(len(z)))
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0003 := range z {
		err = z[zb0003].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, zb0003)
			return
		}
	}
	return
}
53857
func (z IndexTagDelSeriesResp) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 1
	// write "Count"
	err = en.Append(0x81, 0xa5, 0x43, 0x6f, 0x75, 0x6e, 0x74)
	if err != nil {
		return
	}
	err = en.WriteInt(z.Count)
	if err != nil {
		err = msgp.WrapError(err, "Count")
		return
	}
	return
}
39025
func (z *AckResp) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, err = dc.ReadMapHeader()
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "ack":
			z.Ack, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "Ack")
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	return
}
1150796
func (w *Writer) WriteMsg(res *dns.Msg) error {
	w.Msg = res
	return nil
}
1234251
func (z *Row) EncodeMsg(en *msgp.Writer) (err error) {
	if p, ok := interface{}(z).(msgp.PreSave); ok {
		p.PreSaveHook()
	}

	// honor the omitempty tags
	var empty_zgensym_56fd93edf47ccbd5_6 [3]bool
	fieldsInUse_zgensym_56fd93edf47ccbd5_7 := z.fieldsNotEmpty(empty_zgensym_56fd93edf47ccbd5_6[:])

	// map header
	err = en.WriteMapHeader(fieldsInUse_zgensym_56fd93edf47ccbd5_7)
	if err != nil {
		return err
	}

	if !empty_zgensym_56fd93edf47ccbd5_6[0] {
		// write "K__slc"
		err = en.Append(0xa6, 0x4b, 0x5f, 0x5f, 0x73, 0x6c, 0x63)
		if err != nil {
			return err
		}
		err = en.WriteArrayHeader(uint32(len(z.K)))
		if err != nil {
			return
		}
		for zgensym_56fd93edf47ccbd5_0 := range z.K {
			err = en.WriteIntf(z.K[zgensym_56fd93edf47ccbd5_0])
			if err != nil {
				return
			}
		}
	}

	if !empty_zgensym_56fd93edf47ccbd5_6[1] {
		// write "V__slc"
		err = en.Append(0xa6, 0x56, 0x5f, 0x5f, 0x73, 0x6c, 0x63)
		if err != nil {
			return err
		}
		err = en.WriteArrayHeader(uint32(len(z.V)))
		if err != nil {
			return
		}
		for zgensym_56fd93edf47ccbd5_1 := range z.V {
			err = en.WriteIntf(z.V[zgensym_56fd93edf47ccbd5_1])
			if err != nil {
				return
			}
		}
	}

	if !empty_zgensym_56fd93edf47ccbd5_6[2] {
		// write "T__i64"
		err = en.Append(0xa6, 0x54, 0x5f, 0x5f, 0x69, 0x36, 0x34)
		if err != nil {
			return err
		}
		err = en.WriteInt64(z.T)
		if err != nil {
			return
		}
	}

	return
}