package cmd

// Code generated by github.com/tinylib/msgp DO NOT EDIT.

import (
	"time"

	"github.com/tinylib/msgp/msgp"
)

// DecodeMsg implements msgp.Decodable
func (z *BatchJobExpire) 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 "APIVersion":
			z.APIVersion, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "APIVersion")
				return
			}
		case "Bucket":
			z.Bucket, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "Bucket")
				return
			}
		case "Prefix":
			z.Prefix, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "Prefix")
				return
			}
		case "NotificationCfg":
			err = z.NotificationCfg.DecodeMsg(dc)
			if err != nil {
				err = msgp.WrapError(err, "NotificationCfg")
				return
			}
		case "Retry":
			err = z.Retry.DecodeMsg(dc)
			if err != nil {
				err = msgp.WrapError(err, "Retry")
				return
			}
		case "Rules":
			var zb0002 uint32
			zb0002, err = dc.ReadArrayHeader()
			if err != nil {
				err = msgp.WrapError(err, "Rules")
				return
			}
			if cap(z.Rules) >= int(zb0002) {
				z.Rules = (z.Rules)[:zb0002]
			} else {
				z.Rules = make([]BatchJobExpireFilter, zb0002)
			}
			for za0001 := range z.Rules {
				err = z.Rules[za0001].DecodeMsg(dc)
				if err != nil {
					err = msgp.WrapError(err, "Rules", za0001)
					return
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	return
}

// EncodeMsg implements msgp.Encodable
func (z *BatchJobExpire) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 6
	// write "APIVersion"
	err = en.Append(0x86, 0xaa, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
	if err != nil {
		return
	}
	err = en.WriteString(z.APIVersion)
	if err != nil {
		err = msgp.WrapError(err, "APIVersion")
		return
	}
	// write "Bucket"
	err = en.Append(0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74)
	if err != nil {
		return
	}
	err = en.WriteString(z.Bucket)
	if err != nil {
		err = msgp.WrapError(err, "Bucket")
		return
	}
	// write "Prefix"
	err = en.Append(0xa6, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78)
	if err != nil {
		return
	}
	err = en.WriteString(z.Prefix)
	if err != nil {
		err = msgp.WrapError(err, "Prefix")
		return
	}
	// write "NotificationCfg"
	err = en.Append(0xaf, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x66, 0x67)
	if err != nil {
		return
	}
	err = z.NotificationCfg.EncodeMsg(en)
	if err != nil {
		err = msgp.WrapError(err, "NotificationCfg")
		return
	}
	// write "Retry"
	err = en.Append(0xa5, 0x52, 0x65, 0x74, 0x72, 0x79)
	if err != nil {
		return
	}
	err = z.Retry.EncodeMsg(en)
	if err != nil {
		err = msgp.WrapError(err, "Retry")
		return
	}
	// write "Rules"
	err = en.Append(0xa5, 0x52, 0x75, 0x6c, 0x65, 0x73)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Rules)))
	if err != nil {
		err = msgp.WrapError(err, "Rules")
		return
	}
	for za0001 := range z.Rules {
		err = z.Rules[za0001].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, "Rules", za0001)
			return
		}
	}
	return
}

// MarshalMsg implements msgp.Marshaler
func (z *BatchJobExpire) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 6
	// string "APIVersion"
	o = append(o, 0x86, 0xaa, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
	o = msgp.AppendString(o, z.APIVersion)
	// string "Bucket"
	o = append(o, 0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74)
	o = msgp.AppendString(o, z.Bucket)
	// string "Prefix"
	o = append(o, 0xa6, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78)
	o = msgp.AppendString(o, z.Prefix)
	// string "NotificationCfg"
	o = append(o, 0xaf, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x66, 0x67)
	o, err = z.NotificationCfg.MarshalMsg(o)
	if err != nil {
		err = msgp.WrapError(err, "NotificationCfg")
		return
	}
	// string "Retry"
	o = append(o, 0xa5, 0x52, 0x65, 0x74, 0x72, 0x79)
	o, err = z.Retry.MarshalMsg(o)
	if err != nil {
		err = msgp.WrapError(err, "Retry")
		return
	}
	// string "Rules"
	o = append(o, 0xa5, 0x52, 0x75, 0x6c, 0x65, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Rules)))
	for za0001 := range z.Rules {
		o, err = z.Rules[za0001].MarshalMsg(o)
		if err != nil {
			err = msgp.WrapError(err, "Rules", za0001)
			return
		}
	}
	return
}

// UnmarshalMsg implements msgp.Unmarshaler
func (z *BatchJobExpire) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "APIVersion":
			z.APIVersion, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "APIVersion")
				return
			}
		case "Bucket":
			z.Bucket, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Bucket")
				return
			}
		case "Prefix":
			z.Prefix, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Prefix")
				return
			}
		case "NotificationCfg":
			bts, err = z.NotificationCfg.UnmarshalMsg(bts)
			if err != nil {
				err = msgp.WrapError(err, "NotificationCfg")
				return
			}
		case "Retry":
			bts, err = z.Retry.UnmarshalMsg(bts)
			if err != nil {
				err = msgp.WrapError(err, "Retry")
				return
			}
		case "Rules":
			var zb0002 uint32
			zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Rules")
				return
			}
			if cap(z.Rules) >= int(zb0002) {
				z.Rules = (z.Rules)[:zb0002]
			} else {
				z.Rules = make([]BatchJobExpireFilter, zb0002)
			}
			for za0001 := range z.Rules {
				bts, err = z.Rules[za0001].UnmarshalMsg(bts)
				if err != nil {
					err = msgp.WrapError(err, "Rules", za0001)
					return
				}
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	o = bts
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *BatchJobExpire) Msgsize() (s int) {
	s = 1 + 11 + msgp.StringPrefixSize + len(z.APIVersion) + 7 + msgp.StringPrefixSize + len(z.Bucket) + 7 + msgp.StringPrefixSize + len(z.Prefix) + 16 + z.NotificationCfg.Msgsize() + 6 + z.Retry.Msgsize() + 6 + msgp.ArrayHeaderSize
	for za0001 := range z.Rules {
		s += z.Rules[za0001].Msgsize()
	}
	return
}

// DecodeMsg implements msgp.Decodable
func (z *BatchJobExpireFilter) 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 "OlderThan":
			err = z.OlderThan.DecodeMsg(dc)
			if err != nil {
				err = msgp.WrapError(err, "OlderThan")
				return
			}
		case "CreatedBefore":
			if dc.IsNil() {
				err = dc.ReadNil()
				if err != nil {
					err = msgp.WrapError(err, "CreatedBefore")
					return
				}
				z.CreatedBefore = nil
			} else {
				if z.CreatedBefore == nil {
					z.CreatedBefore = new(time.Time)
				}
				*z.CreatedBefore, err = dc.ReadTime()
				if err != nil {
					err = msgp.WrapError(err, "CreatedBefore")
					return
				}
			}
		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([]BatchJobKV, zb0002)
			}
			for za0001 := range z.Tags {
				err = z.Tags[za0001].DecodeMsg(dc)
				if err != nil {
					err = msgp.WrapError(err, "Tags", za0001)
					return
				}
			}
		case "Metadata":
			var zb0003 uint32
			zb0003, err = dc.ReadArrayHeader()
			if err != nil {
				err = msgp.WrapError(err, "Metadata")
				return
			}
			if cap(z.Metadata) >= int(zb0003) {
				z.Metadata = (z.Metadata)[:zb0003]
			} else {
				z.Metadata = make([]BatchJobKV, zb0003)
			}
			for za0002 := range z.Metadata {
				err = z.Metadata[za0002].DecodeMsg(dc)
				if err != nil {
					err = msgp.WrapError(err, "Metadata", za0002)
					return
				}
			}
		case "Size":
			err = z.Size.DecodeMsg(dc)
			if err != nil {
				err = msgp.WrapError(err, "Size")
				return
			}
		case "Type":
			z.Type, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "Type")
				return
			}
		case "Name":
			z.Name, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "Name")
				return
			}
		case "Purge":
			var zb0004 uint32
			zb0004, err = dc.ReadMapHeader()
			if err != nil {
				err = msgp.WrapError(err, "Purge")
				return
			}
			for zb0004 > 0 {
				zb0004--
				field, err = dc.ReadMapKeyPtr()
				if err != nil {
					err = msgp.WrapError(err, "Purge")
					return
				}
				switch msgp.UnsafeString(field) {
				case "RetainVersions":
					z.Purge.RetainVersions, err = dc.ReadInt()
					if err != nil {
						err = msgp.WrapError(err, "Purge", "RetainVersions")
						return
					}
				default:
					err = dc.Skip()
					if err != nil {
						err = msgp.WrapError(err, "Purge")
						return
					}
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	return
}

// EncodeMsg implements msgp.Encodable
func (z *BatchJobExpireFilter) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 8
	// write "OlderThan"
	err = en.Append(0x88, 0xa9, 0x4f, 0x6c, 0x64, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e)
	if err != nil {
		return
	}
	err = z.OlderThan.EncodeMsg(en)
	if err != nil {
		err = msgp.WrapError(err, "OlderThan")
		return
	}
	// write "CreatedBefore"
	err = en.Append(0xad, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65)
	if err != nil {
		return
	}
	if z.CreatedBefore == nil {
		err = en.WriteNil()
		if err != nil {
			return
		}
	} else {
		err = en.WriteTime(*z.CreatedBefore)
		if err != nil {
			err = msgp.WrapError(err, "CreatedBefore")
			return
		}
	}
	// write "Tags"
	err = en.Append(0xa4, 0x54, 0x61, 0x67, 0x73)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Tags)))
	if err != nil {
		err = msgp.WrapError(err, "Tags")
		return
	}
	for za0001 := range z.Tags {
		err = z.Tags[za0001].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, "Tags", za0001)
			return
		}
	}
	// write "Metadata"
	err = en.Append(0xa8, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61)
	if err != nil {
		return
	}
	err = en.WriteArrayHeader(uint32(len(z.Metadata)))
	if err != nil {
		err = msgp.WrapError(err, "Metadata")
		return
	}
	for za0002 := range z.Metadata {
		err = z.Metadata[za0002].EncodeMsg(en)
		if err != nil {
			err = msgp.WrapError(err, "Metadata", za0002)
			return
		}
	}
	// write "Size"
	err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65)
	if err != nil {
		return
	}
	err = z.Size.EncodeMsg(en)
	if err != nil {
		err = msgp.WrapError(err, "Size")
		return
	}
	// write "Type"
	err = en.Append(0xa4, 0x54, 0x79, 0x70, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.Type)
	if err != nil {
		err = msgp.WrapError(err, "Type")
		return
	}
	// write "Name"
	err = en.Append(0xa4, 0x4e, 0x61, 0x6d, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.Name)
	if err != nil {
		err = msgp.WrapError(err, "Name")
		return
	}
	// write "Purge"
	err = en.Append(0xa5, 0x50, 0x75, 0x72, 0x67, 0x65)
	if err != nil {
		return
	}
	// map header, size 1
	// write "RetainVersions"
	err = en.Append(0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
	if err != nil {
		return
	}
	err = en.WriteInt(z.Purge.RetainVersions)
	if err != nil {
		err = msgp.WrapError(err, "Purge", "RetainVersions")
		return
	}
	return
}

// MarshalMsg implements msgp.Marshaler
func (z *BatchJobExpireFilter) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 8
	// string "OlderThan"
	o = append(o, 0x88, 0xa9, 0x4f, 0x6c, 0x64, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e)
	o, err = z.OlderThan.MarshalMsg(o)
	if err != nil {
		err = msgp.WrapError(err, "OlderThan")
		return
	}
	// string "CreatedBefore"
	o = append(o, 0xad, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65)
	if z.CreatedBefore == nil {
		o = msgp.AppendNil(o)
	} else {
		o = msgp.AppendTime(o, *z.CreatedBefore)
	}
	// string "Tags"
	o = append(o, 0xa4, 0x54, 0x61, 0x67, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Tags)))
	for za0001 := range z.Tags {
		o, err = z.Tags[za0001].MarshalMsg(o)
		if err != nil {
			err = msgp.WrapError(err, "Tags", za0001)
			return
		}
	}
	// string "Metadata"
	o = append(o, 0xa8, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Metadata)))
	for za0002 := range z.Metadata {
		o, err = z.Metadata[za0002].MarshalMsg(o)
		if err != nil {
			err = msgp.WrapError(err, "Metadata", za0002)
			return
		}
	}
	// string "Size"
	o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65)
	o, err = z.Size.MarshalMsg(o)
	if err != nil {
		err = msgp.WrapError(err, "Size")
		return
	}
	// string "Type"
	o = append(o, 0xa4, 0x54, 0x79, 0x70, 0x65)
	o = msgp.AppendString(o, z.Type)
	// string "Name"
	o = append(o, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.Name)
	// string "Purge"
	o = append(o, 0xa5, 0x50, 0x75, 0x72, 0x67, 0x65)
	// map header, size 1
	// string "RetainVersions"
	o = append(o, 0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
	o = msgp.AppendInt(o, z.Purge.RetainVersions)
	return
}

// UnmarshalMsg implements msgp.Unmarshaler
func (z *BatchJobExpireFilter) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "OlderThan":
			bts, err = z.OlderThan.UnmarshalMsg(bts)
			if err != nil {
				err = msgp.WrapError(err, "OlderThan")
				return
			}
		case "CreatedBefore":
			if msgp.IsNil(bts) {
				bts, err = msgp.ReadNilBytes(bts)
				if err != nil {
					return
				}
				z.CreatedBefore = nil
			} else {
				if z.CreatedBefore == nil {
					z.CreatedBefore = new(time.Time)
				}
				*z.CreatedBefore, bts, err = msgp.ReadTimeBytes(bts)
				if err != nil {
					err = msgp.WrapError(err, "CreatedBefore")
					return
				}
			}
		case "Tags":
			var zb0002 uint32
			zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Tags")
				return
			}
			if cap(z.Tags) >= int(zb0002) {
				z.Tags = (z.Tags)[:zb0002]
			} else {
				z.Tags = make([]BatchJobKV, zb0002)
			}
			for za0001 := range z.Tags {
				bts, err = z.Tags[za0001].UnmarshalMsg(bts)
				if err != nil {
					err = msgp.WrapError(err, "Tags", za0001)
					return
				}
			}
		case "Metadata":
			var zb0003 uint32
			zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Metadata")
				return
			}
			if cap(z.Metadata) >= int(zb0003) {
				z.Metadata = (z.Metadata)[:zb0003]
			} else {
				z.Metadata = make([]BatchJobKV, zb0003)
			}
			for za0002 := range z.Metadata {
				bts, err = z.Metadata[za0002].UnmarshalMsg(bts)
				if err != nil {
					err = msgp.WrapError(err, "Metadata", za0002)
					return
				}
			}
		case "Size":
			bts, err = z.Size.UnmarshalMsg(bts)
			if err != nil {
				err = msgp.WrapError(err, "Size")
				return
			}
		case "Type":
			z.Type, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Type")
				return
			}
		case "Name":
			z.Name, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Name")
				return
			}
		case "Purge":
			var zb0004 uint32
			zb0004, bts, err = msgp.ReadMapHeaderBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Purge")
				return
			}
			for zb0004 > 0 {
				zb0004--
				field, bts, err = msgp.ReadMapKeyZC(bts)
				if err != nil {
					err = msgp.WrapError(err, "Purge")
					return
				}
				switch msgp.UnsafeString(field) {
				case "RetainVersions":
					z.Purge.RetainVersions, bts, err = msgp.ReadIntBytes(bts)
					if err != nil {
						err = msgp.WrapError(err, "Purge", "RetainVersions")
						return
					}
				default:
					bts, err = msgp.Skip(bts)
					if err != nil {
						err = msgp.WrapError(err, "Purge")
						return
					}
				}
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	o = bts
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *BatchJobExpireFilter) Msgsize() (s int) {
	s = 1 + 10 + z.OlderThan.Msgsize() + 14
	if z.CreatedBefore == nil {
		s += msgp.NilSize
	} else {
		s += msgp.TimeSize
	}
	s += 5 + msgp.ArrayHeaderSize
	for za0001 := range z.Tags {
		s += z.Tags[za0001].Msgsize()
	}
	s += 9 + msgp.ArrayHeaderSize
	for za0002 := range z.Metadata {
		s += z.Metadata[za0002].Msgsize()
	}
	s += 5 + z.Size.Msgsize() + 5 + msgp.StringPrefixSize + len(z.Type) + 5 + msgp.StringPrefixSize + len(z.Name) + 6 + 1 + 15 + msgp.IntSize
	return
}

// DecodeMsg implements msgp.Decodable
func (z *BatchJobExpirePurge) 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 "RetainVersions":
			z.RetainVersions, err = dc.ReadInt()
			if err != nil {
				err = msgp.WrapError(err, "RetainVersions")
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	return
}

// EncodeMsg implements msgp.Encodable
func (z BatchJobExpirePurge) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 1
	// write "RetainVersions"
	err = en.Append(0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
	if err != nil {
		return
	}
	err = en.WriteInt(z.RetainVersions)
	if err != nil {
		err = msgp.WrapError(err, "RetainVersions")
		return
	}
	return
}

// MarshalMsg implements msgp.Marshaler
func (z BatchJobExpirePurge) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 1
	// string "RetainVersions"
	o = append(o, 0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
	o = msgp.AppendInt(o, z.RetainVersions)
	return
}

// UnmarshalMsg implements msgp.Unmarshaler
func (z *BatchJobExpirePurge) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "RetainVersions":
			z.RetainVersions, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "RetainVersions")
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	o = bts
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z BatchJobExpirePurge) Msgsize() (s int) {
	s = 1 + 15 + msgp.IntSize
	return
}