package vestingsc

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

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

// MarshalMsg implements msgp.Marshaler
func (z *clientPools) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 1
	// string "Pools"
	o = append(o, 0x81, 0xa5, 0x50, 0x6f, 0x6f, 0x6c, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Pools)))
	for za0001 := range z.Pools {
		o = msgp.AppendString(o, z.Pools[za0001])
	}
	return
}

// UnmarshalMsg implements msgp.Unmarshaler
func (z *clientPools) 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 "Pools":
			var zb0002 uint32
			zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "Pools")
				return
			}
			if cap(z.Pools) >= int(zb0002) {
				z.Pools = (z.Pools)[:zb0002]
			} else {
				z.Pools = make([]string, zb0002)
			}
			for za0001 := range z.Pools {
				z.Pools[za0001], bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					err = msgp.WrapError(err, "Pools", 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 *clientPools) Msgsize() (s int) {
	s = 1 + 6 + msgp.ArrayHeaderSize
	for za0001 := range z.Pools {
		s += msgp.StringPrefixSize + len(z.Pools[za0001])
	}
	return
}
