// Code generated by thriftgo (0.3.15) (fastgo). DO NOT EDIT.
package example3

import (
	"encoding/binary"
	"fmt"
	"unsafe"

	"github.com/cloudwego/dynamicgo/testdata/kitex_gen/base"
	"github.com/cloudwego/dynamicgo/testdata/kitex_gen/ref"
	"github.com/cloudwego/gopkg/protocol/thrift"
)

var (
	_ = base.KitexUnusedProtection
	_ = ref.KitexUnusedProtection
)

func (p *InnerBase) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Bool ID:1 thrift.BOOL
	off += 3
	off += 1

	// p.Byte ID:2 thrift.I08
	off += 3
	off += 1

	// p.Int16 ID:3 thrift.I16
	off += 3
	off += 2

	// p.Int32 ID:4 thrift.I32
	off += 3
	off += 4

	// p.Int64 ID:5 thrift.I64
	off += 3
	off += 8

	// p.Double ID:6 thrift.DOUBLE
	off += 3
	off += 8

	// p.String_ ID:7 thrift.STRING
	off += 3
	off += 4 + len(p.String_)

	// p.ListInt32 ID:8 thrift.LIST
	off += 3
	off += 5
	off += len(p.ListInt32) * 4

	// p.MapStringString ID:9 thrift.MAP
	off += 3
	off += 6
	for k, v := range p.MapStringString {
		off += 4 + len(k)
		off += 4 + len(v)
	}

	// p.SetInt32 ID:10 thrift.SET
	off += 3
	off += 5
	off += len(p.SetInt32) * 4

	// p.Foo ID:11 thrift.I32
	off += 3
	off += 4

	// p.MapInt32String ID:12 thrift.MAP
	off += 3
	off += 6
	off += len(p.MapInt32String) * 4
	for _, v := range p.MapInt32String {
		off += 4 + len(v)
	}

	// p.Binary ID:13 thrift.STRING
	off += 3
	off += 4 + len(p.Binary)

	// p.MapInt8String ID:14 thrift.MAP
	off += 3
	off += 6
	off += len(p.MapInt8String) * 1
	for _, v := range p.MapInt8String {
		off += 4 + len(v)
	}

	// p.MapInt16String ID:15 thrift.MAP
	off += 3
	off += 6
	off += len(p.MapInt16String) * 2
	for _, v := range p.MapInt16String {
		off += 4 + len(v)
	}

	// p.MapInt64String ID:16 thrift.MAP
	off += 3
	off += 6
	off += len(p.MapInt64String) * 8
	for _, v := range p.MapInt64String {
		off += 4 + len(v)
	}

	// p.ListInnerBase ID:18 thrift.LIST
	off += 3
	off += 5
	for _, v := range p.ListInnerBase {
		off += v.BLength()
	}

	// p.MapStringInnerBase ID:19 thrift.MAP
	off += 3
	off += 6
	for k, v := range p.MapStringInnerBase {
		off += 4 + len(k)
		off += v.BLength()
	}

	// p.InnerQuery ID:20 thrift.STRING
	off += 3
	off += 4 + len(p.InnerQuery)

	// p.Base ID:255 thrift.STRUCT
	off += 3
	off += p.Base.BLength()
	return off + 1
}

func (p *InnerBase) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *InnerBase) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Bool ID:1 thrift.BOOL
	b[off] = 2
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	b[off] = *((*byte)(unsafe.Pointer(&p.Bool)))
	off++

	// p.Byte ID:2 thrift.I08
	b[off] = 3
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	b[off] = byte(p.Byte)
	off++

	// p.Int16 ID:3 thrift.I16
	b[off] = 6
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	binary.BigEndian.PutUint16(b[off:], uint16(p.Int16))
	off += 2

	// p.Int32 ID:4 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Int32))
	off += 4

	// p.Int64 ID:5 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 5)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Int64))
	off += 8

	// p.Double ID:6 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 6)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.Double)))
	off += 8

	// p.String_ ID:7 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 7)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.String_)

	// p.ListInt32 ID:8 thrift.LIST
	b[off] = 15
	binary.BigEndian.PutUint16(b[off+1:], 8)
	off += 3
	b[off] = 8
	binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.ListInt32)))
	off += 5
	for _, v := range p.ListInt32 {
		binary.BigEndian.PutUint32(b[off:], uint32(v))
		off += 4
	}

	// p.MapStringString ID:9 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 9)
	off += 3
	b[off] = 11
	b[off+1] = 11
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapStringString)))
	off += 6
	for k, v := range p.MapStringString {
		off += thrift.Binary.WriteStringNocopy(b[off:], w, k)
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.SetInt32 ID:10 thrift.SET
	b[off] = 14
	binary.BigEndian.PutUint16(b[off+1:], 10)
	off += 3
	b[off] = 8
	binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.SetInt32)))
	off += 5
	for _, v := range p.SetInt32 {
		binary.BigEndian.PutUint32(b[off:], uint32(v))
		off += 4
	}

	// p.Foo ID:11 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 11)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Foo))
	off += 4

	// p.MapInt32String ID:12 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 12)
	off += 3
	b[off] = 8
	b[off+1] = 11
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapInt32String)))
	off += 6
	for k, v := range p.MapInt32String {
		binary.BigEndian.PutUint32(b[off:], uint32(k))
		off += 4
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.Binary ID:13 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 13)
	off += 3
	off += thrift.Binary.WriteBinaryNocopy(b[off:], w, p.Binary)

	// p.MapInt8String ID:14 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 14)
	off += 3
	b[off] = 3
	b[off+1] = 11
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapInt8String)))
	off += 6
	for k, v := range p.MapInt8String {
		b[off] = byte(k)
		off++
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.MapInt16String ID:15 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 15)
	off += 3
	b[off] = 6
	b[off+1] = 11
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapInt16String)))
	off += 6
	for k, v := range p.MapInt16String {
		binary.BigEndian.PutUint16(b[off:], uint16(k))
		off += 2
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.MapInt64String ID:16 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 16)
	off += 3
	b[off] = 10
	b[off+1] = 11
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapInt64String)))
	off += 6
	for k, v := range p.MapInt64String {
		binary.BigEndian.PutUint64(b[off:], uint64(k))
		off += 8
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.ListInnerBase ID:18 thrift.LIST
	b[off] = 15
	binary.BigEndian.PutUint16(b[off+1:], 18)
	off += 3
	b[off] = 12
	binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.ListInnerBase)))
	off += 5
	for _, v := range p.ListInnerBase {
		off += v.FastWriteNocopy(b[off:], w)
	}

	// p.MapStringInnerBase ID:19 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 19)
	off += 3
	b[off] = 11
	b[off+1] = 12
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapStringInnerBase)))
	off += 6
	for k, v := range p.MapStringInnerBase {
		off += thrift.Binary.WriteStringNocopy(b[off:], w, k)
		off += v.FastWriteNocopy(b[off:], w)
	}

	// p.InnerQuery ID:20 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 20)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.InnerQuery)

	// p.Base ID:255 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 255)
	off += 3
	off += p.Base.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *InnerBase) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var enum int32
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x102: // p.Bool ID:1 thrift.BOOL
			p.Bool, l, err = x.ReadBool(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x203: // p.Byte ID:2 thrift.I08
			p.Byte, l, err = x.ReadByte(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x306: // p.Int16 ID:3 thrift.I16
			p.Int16, l, err = x.ReadI16(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x408: // p.Int32 ID:4 thrift.I32
			p.Int32, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x50a: // p.Int64 ID:5 thrift.I64
			p.Int64, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x604: // p.Double ID:6 thrift.DOUBLE
			p.Double, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x70b: // p.String_ ID:7 thrift.STRING
			p.String_, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x80f: // p.ListInt32 ID:8 thrift.LIST
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.ListInt32 = make([]int32, sz)
			for i := 0; i < sz; i++ {
				p.ListInt32[i], l, err = x.ReadI32(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
		case 0x90d: // p.MapStringString ID:9 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapStringString = make(map[string]string, sz)
			for i := 0; i < sz; i++ {
				var k string
				var v string
				k, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapStringString[k] = v
			}
		case 0xa0e: // p.SetInt32 ID:10 thrift.SET
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.SetInt32 = make([]int32, sz)
			for i := 0; i < sz; i++ {
				p.SetInt32[i], l, err = x.ReadI32(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
		case 0xb08: // p.Foo ID:11 thrift.I32
			enum, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.Foo = FOO(enum)
		case 0xc0d: // p.MapInt32String ID:12 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapInt32String = make(map[int32]string, sz)
			for i := 0; i < sz; i++ {
				var k int32
				var v string
				k, l, err = x.ReadI32(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapInt32String[k] = v
			}
		case 0xd0b: // p.Binary ID:13 thrift.STRING
			p.Binary, l, err = x.ReadBinary(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xe0d: // p.MapInt8String ID:14 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapInt8String = make(map[int8]string, sz)
			for i := 0; i < sz; i++ {
				var k int8
				var v string
				k, l, err = x.ReadByte(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapInt8String[k] = v
			}
		case 0xf0d: // p.MapInt16String ID:15 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapInt16String = make(map[int16]string, sz)
			for i := 0; i < sz; i++ {
				var k int16
				var v string
				k, l, err = x.ReadI16(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapInt16String[k] = v
			}
		case 0x100d: // p.MapInt64String ID:16 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapInt64String = make(map[int64]string, sz)
			for i := 0; i < sz; i++ {
				var k int64
				var v string
				k, l, err = x.ReadI64(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapInt64String[k] = v
			}
		case 0x120f: // p.ListInnerBase ID:18 thrift.LIST
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.ListInnerBase = make([]*InnerBase, sz)
			for i := 0; i < sz; i++ {
				p.ListInnerBase[i] = NewInnerBase()
				l, err = p.ListInnerBase[i].FastRead(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
		case 0x130d: // p.MapStringInnerBase ID:19 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapStringInnerBase = make(map[string]*InnerBase, sz)
			for i := 0; i < sz; i++ {
				var k string
				var v *InnerBase
				k, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v = NewInnerBase()
				l, err = v.FastRead(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapStringInnerBase[k] = v
			}
		case 0x140b: // p.InnerQuery ID:20 thrift.STRING
			p.InnerQuery, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xff0c: // p.Base ID:255 thrift.STRUCT
			p.Base = base.NewBase()
			l, err = p.Base.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_InnerBase[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleReq) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	if p.Msg != nil {
		off += 3
		off += 4 + len(*p.Msg)
	}

	// p.Cookie ID:2 thrift.DOUBLE
	if p.Cookie != nil {
		off += 3
		off += 8
	}

	// p.Path ID:3 thrift.STRING
	off += 3
	off += 4 + len(p.Path)

	// p.Query ID:4 thrift.LIST
	if p.Query != nil {
		off += 3
		off += 5
		for _, v := range p.Query {
			off += 4 + len(v)
		}
	}

	// p.Header ID:5 thrift.BOOL
	if p.Header != nil {
		off += 3
		off += 1
	}

	// p.Code ID:6 thrift.I64
	off += 3
	off += 8

	// p.InnerBase ID:7 thrift.STRUCT
	off += 3
	off += p.InnerBase.BLength()

	// p.RawUri ID:8 thrift.STRING
	off += 3
	off += 4 + len(p.RawUri)

	// p.Base ID:255 thrift.STRUCT
	off += 3
	off += p.Base.BLength()

	// p.Subfix ID:32767 thrift.DOUBLE
	off += 3
	off += 8
	return off + 1
}

func (p *ExampleReq) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleReq) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	if p.Msg != nil {
		b[off] = 11
		binary.BigEndian.PutUint16(b[off+1:], 1)
		off += 3
		off += thrift.Binary.WriteStringNocopy(b[off:], w, *p.Msg)
	}

	// p.Cookie ID:2 thrift.DOUBLE
	if p.Cookie != nil {
		b[off] = 4
		binary.BigEndian.PutUint16(b[off+1:], 2)
		off += 3
		binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(p.Cookie)))
		off += 8
	}

	// p.Path ID:3 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Path)

	// p.Query ID:4 thrift.LIST
	if p.Query != nil {
		b[off] = 15
		binary.BigEndian.PutUint16(b[off+1:], 4)
		off += 3
		b[off] = 11
		binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.Query)))
		off += 5
		for _, v := range p.Query {
			off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
		}
	}

	// p.Header ID:5 thrift.BOOL
	if p.Header != nil {
		b[off] = 2
		binary.BigEndian.PutUint16(b[off+1:], 5)
		off += 3
		b[off] = *((*byte)(unsafe.Pointer(p.Header)))
		off++
	}

	// p.Code ID:6 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 6)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Code))
	off += 8

	// p.InnerBase ID:7 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 7)
	off += 3
	off += p.InnerBase.FastWriteNocopy(b[off:], w)

	// p.RawUri ID:8 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 8)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.RawUri)

	// p.Base ID:255 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 255)
	off += 3
	off += p.Base.FastWriteNocopy(b[off:], w)

	// p.Subfix ID:32767 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 32767)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.Subfix)))
	off += 8

	b[off] = 0
	return off + 1
}

func (p *ExampleReq) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Msg ID:1 thrift.STRING
			if p.Msg == nil {
				p.Msg = new(string)
			}
			*p.Msg, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x204: // p.Cookie ID:2 thrift.DOUBLE
			if p.Cookie == nil {
				p.Cookie = new(float64)
			}
			*p.Cookie, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30b: // p.Path ID:3 thrift.STRING
			p.Path, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		case 0x40f: // p.Query ID:4 thrift.LIST
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.Query = make([]string, sz)
			for i := 0; i < sz; i++ {
				p.Query[i], l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
		case 0x502: // p.Header ID:5 thrift.BOOL
			if p.Header == nil {
				p.Header = new(bool)
			}
			*p.Header, l, err = x.ReadBool(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x60a: // p.Code ID:6 thrift.I64
			p.Code, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x70c: // p.InnerBase ID:7 thrift.STRUCT
			p.InnerBase = NewInnerBase()
			l, err = p.InnerBase.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x80b: // p.RawUri ID:8 thrift.STRING
			p.RawUri, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xff0c: // p.Base ID:255 thrift.STRUCT
			p.Base = base.NewBase()
			l, err = p.Base.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x7fff04: // p.Subfix ID:32767 thrift.DOUBLE
			p.Subfix, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 3 // Path
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleReq[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExampleReq[fid]))
}

func (p *ExampleResp) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Msg)

	// p.Cookie ID:2 thrift.DOUBLE
	if p.Cookie != nil {
		off += 3
		off += 8
	}

	// p.Status ID:3 thrift.I32
	off += 3
	off += 4

	// p.Header ID:4 thrift.BOOL
	if p.Header != nil {
		off += 3
		off += 1
	}

	// p.Code ID:6 thrift.I64
	off += 3
	off += 8

	// p.InnerBase ID:7 thrift.STRUCT
	off += 3
	off += p.InnerBase.BLength()

	// p.BaseResp ID:255 thrift.STRUCT
	off += 3
	off += p.BaseResp.BLength()

	// p.Subfix ID:32767 thrift.DOUBLE
	off += 3
	off += 8
	return off + 1
}

func (p *ExampleResp) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleResp) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Msg)

	// p.Cookie ID:2 thrift.DOUBLE
	if p.Cookie != nil {
		b[off] = 4
		binary.BigEndian.PutUint16(b[off+1:], 2)
		off += 3
		binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(p.Cookie)))
		off += 8
	}

	// p.Status ID:3 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Status))
	off += 4

	// p.Header ID:4 thrift.BOOL
	if p.Header != nil {
		b[off] = 2
		binary.BigEndian.PutUint16(b[off+1:], 4)
		off += 3
		b[off] = *((*byte)(unsafe.Pointer(p.Header)))
		off++
	}

	// p.Code ID:6 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 6)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Code))
	off += 8

	// p.InnerBase ID:7 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 7)
	off += 3
	off += p.InnerBase.FastWriteNocopy(b[off:], w)

	// p.BaseResp ID:255 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 255)
	off += 3
	off += p.BaseResp.FastWriteNocopy(b[off:], w)

	// p.Subfix ID:32767 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 32767)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.Subfix)))
	off += 8

	b[off] = 0
	return off + 1
}

func (p *ExampleResp) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Msg ID:1 thrift.STRING
			p.Msg, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x204: // p.Cookie ID:2 thrift.DOUBLE
			if p.Cookie == nil {
				p.Cookie = new(float64)
			}
			*p.Cookie, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x308: // p.Status ID:3 thrift.I32
			p.Status, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		case 0x402: // p.Header ID:4 thrift.BOOL
			if p.Header == nil {
				p.Header = new(bool)
			}
			*p.Header, l, err = x.ReadBool(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x60a: // p.Code ID:6 thrift.I64
			p.Code, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x70c: // p.InnerBase ID:7 thrift.STRUCT
			p.InnerBase = NewInnerBase()
			l, err = p.InnerBase.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xff0c: // p.BaseResp ID:255 thrift.STRUCT
			p.BaseResp = base.NewBaseResp()
			l, err = p.BaseResp.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x7fff04: // p.Subfix ID:32767 thrift.DOUBLE
			p.Subfix, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 3 // Status
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleResp[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExampleResp[fid]))
}

func (p *ExampleError) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.MapInnerBaseInnerBase ID:1 thrift.MAP
	off += 3
	off += 6
	for k, v := range p.MapInnerBaseInnerBase {
		off += k.BLength()
		off += v.BLength()
	}

	// p.Base64 ID:2 thrift.STRING
	off += 3
	off += 4 + len(p.Base64)

	// p.Query ID:3 thrift.STRING
	off += 3
	off += 4 + len(p.Query)

	// p.Header ID:4 thrift.STRING
	off += 3
	off += 4 + len(p.Header)

	// p.Q2 ID:5 thrift.I32
	off += 3
	off += 4
	return off + 1
}

func (p *ExampleError) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleError) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.MapInnerBaseInnerBase ID:1 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	b[off] = 12
	b[off+1] = 12
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.MapInnerBaseInnerBase)))
	off += 6
	for k, v := range p.MapInnerBaseInnerBase {
		off += k.FastWriteNocopy(b[off:], w)
		off += v.FastWriteNocopy(b[off:], w)
	}

	// p.Base64 ID:2 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	off += thrift.Binary.WriteBinaryNocopy(b[off:], w, p.Base64)

	// p.Query ID:3 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Query)

	// p.Header ID:4 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Header)

	// p.Q2 ID:5 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 5)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Q2))
	off += 4

	b[off] = 0
	return off + 1
}

func (p *ExampleError) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10d: // p.MapInnerBaseInnerBase ID:1 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.MapInnerBaseInnerBase = make(map[*InnerBase]*InnerBase, sz)
			for i := 0; i < sz; i++ {
				var k *InnerBase
				var v *InnerBase
				k = NewInnerBase()
				l, err = k.FastRead(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v = NewInnerBase()
				l, err = v.FastRead(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.MapInnerBaseInnerBase[k] = v
			}
		case 0x20b: // p.Base64 ID:2 thrift.STRING
			p.Base64, l, err = x.ReadBinary(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30b: // p.Query ID:3 thrift.STRING
			p.Query, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		case 0x40b: // p.Header ID:4 thrift.STRING
			p.Header, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x508: // p.Q2 ID:5 thrift.I32
			p.Q2, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 3 // Query
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleError[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExampleError[fid]))
}

func (p *ExampleErrorResp) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Int64 ID:2 thrift.I64
	off += 3
	off += 8

	// p.Xjson ID:4 thrift.STRING
	off += 3
	off += 4 + len(p.Xjson)
	return off + 1
}

func (p *ExampleErrorResp) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleErrorResp) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Int64 ID:2 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Int64))
	off += 8

	// p.Xjson ID:4 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Xjson)

	b[off] = 0
	return off + 1
}

func (p *ExampleErrorResp) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x20a: // p.Int64 ID:2 thrift.I64
			p.Int64, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x40b: // p.Xjson ID:4 thrift.STRING
			p.Xjson, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleErrorResp[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleInt2Float) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Int32 ID:1 thrift.I32
	off += 3
	off += 4

	// p.Float64 ID:2 thrift.DOUBLE
	off += 3
	off += 8

	// p.String_ ID:3 thrift.STRING
	off += 3
	off += 4 + len(p.String_)

	// p.Int64 ID:4 thrift.I64
	off += 3
	off += 8

	// p.Subfix ID:32767 thrift.DOUBLE
	off += 3
	off += 8
	return off + 1
}

func (p *ExampleInt2Float) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleInt2Float) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Int32 ID:1 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Int32))
	off += 4

	// p.Float64 ID:2 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.Float64)))
	off += 8

	// p.String_ ID:3 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.String_)

	// p.Int64 ID:4 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Int64))
	off += 8

	// p.Subfix ID:32767 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 32767)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.Subfix)))
	off += 8

	b[off] = 0
	return off + 1
}

func (p *ExampleInt2Float) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x108: // p.Int32 ID:1 thrift.I32
			p.Int32, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x204: // p.Float64 ID:2 thrift.DOUBLE
			p.Float64, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30b: // p.String_ ID:3 thrift.STRING
			p.String_, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x40a: // p.Int64 ID:4 thrift.I64
			p.Int64, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x7fff04: // p.Subfix ID:32767 thrift.DOUBLE
			p.Subfix, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleInt2Float[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *JSONObject) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.A)

	// p.B ID:2 thrift.I08
	off += 3
	off += 1
	return off + 1
}

func (p *JSONObject) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *JSONObject) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.A)

	// p.B ID:2 thrift.I08
	b[off] = 3
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	b[off] = byte(p.B)
	off++

	b[off] = 0
	return off + 1
}

func (p *JSONObject) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.A ID:1 thrift.STRING
			p.A, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x203: // p.B ID:2 thrift.I08
			p.B, l, err = x.ReadByte(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_JSONObject[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleJSONString) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Query ID:1 thrift.STRUCT
	off += 3
	off += p.Query.BLength()

	// p.Query2 ID:2 thrift.LIST
	off += 3
	off += 5
	for _, v := range p.Query2 {
		off += 4 + len(v)
	}

	// p.Header ID:3 thrift.STRUCT
	off += 3
	off += p.Header.BLength()

	// p.Header2 ID:4 thrift.MAP
	off += 3
	off += 6
	off += len(p.Header2) * 4
	for _, v := range p.Header2 {
		off += 4 + len(v)
	}

	// p.Cookie ID:5 thrift.STRUCT
	off += 3
	off += p.Cookie.BLength()

	// p.Cookie2 ID:6 thrift.SET
	off += 3
	off += 5
	off += len(p.Cookie2) * 4
	return off + 1
}

func (p *ExampleJSONString) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleJSONString) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Query ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Query.FastWriteNocopy(b[off:], w)

	// p.Query2 ID:2 thrift.LIST
	b[off] = 15
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	b[off] = 11
	binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.Query2)))
	off += 5
	for _, v := range p.Query2 {
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.Header ID:3 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += p.Header.FastWriteNocopy(b[off:], w)

	// p.Header2 ID:4 thrift.MAP
	b[off] = 13
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	b[off] = 8
	b[off+1] = 11
	binary.BigEndian.PutUint32(b[off+2:], uint32(len(p.Header2)))
	off += 6
	for k, v := range p.Header2 {
		binary.BigEndian.PutUint32(b[off:], uint32(k))
		off += 4
		off += thrift.Binary.WriteStringNocopy(b[off:], w, v)
	}

	// p.Cookie ID:5 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 5)
	off += 3
	off += p.Cookie.FastWriteNocopy(b[off:], w)

	// p.Cookie2 ID:6 thrift.SET
	b[off] = 14
	binary.BigEndian.PutUint16(b[off+1:], 6)
	off += 3
	b[off] = 8
	binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.Cookie2)))
	off += 5
	for _, v := range p.Cookie2 {
		binary.BigEndian.PutUint32(b[off:], uint32(v))
		off += 4
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleJSONString) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Query ID:1 thrift.STRUCT
			p.Query = NewJSONObject()
			l, err = p.Query.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x20f: // p.Query2 ID:2 thrift.LIST
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.Query2 = make([]string, sz)
			for i := 0; i < sz; i++ {
				p.Query2[i], l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
			isset |= 0x1
		case 0x30c: // p.Header ID:3 thrift.STRUCT
			p.Header = NewJSONObject()
			l, err = p.Header.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x2
		case 0x40d: // p.Header2 ID:4 thrift.MAP
			var sz int
			_, _, sz, l, err = x.ReadMapBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.Header2 = make(map[int32]string, sz)
			for i := 0; i < sz; i++ {
				var k int32
				var v string
				k, l, err = x.ReadI32(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				v, l, err = x.ReadString(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
				p.Header2[k] = v
			}
			isset |= 0x4
		case 0x50c: // p.Cookie ID:5 thrift.STRUCT
			p.Cookie = NewJSONObject()
			l, err = p.Cookie.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x60e: // p.Cookie2 ID:6 thrift.SET
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.Cookie2 = make([]int32, sz)
			for i := 0; i < sz; i++ {
				p.Cookie2[i], l, err = x.ReadI32(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
			isset |= 0x8
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 2 // Query2
		goto RequiredFieldNotSetError
	}
	if isset&0x2 == 0 {
		fid = 3 // Header
		goto RequiredFieldNotSetError
	}
	if isset&0x4 == 0 {
		fid = 4 // Header2
		goto RequiredFieldNotSetError
	}
	if isset&0x8 == 0 {
		fid = 6 // Cookie2
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleJSONString[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExampleJSONString[fid]))
}

func (p *ExamplePartial) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Msg)
	return off + 1
}

func (p *ExamplePartial) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExamplePartial) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Msg)

	b[off] = 0
	return off + 1
}

func (p *ExamplePartial) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Msg ID:1 thrift.STRING
			p.Msg, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExamplePartial[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExamplePartial2) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Msg)

	// p.Cookie ID:2 thrift.DOUBLE
	if p.Cookie != nil {
		off += 3
		off += 8
	}

	// p.Status ID:3 thrift.I32
	off += 3
	off += 4

	// p.Header ID:4 thrift.BOOL
	if p.Header != nil {
		off += 3
		off += 1
	}

	// p.Code ID:6 thrift.I64
	off += 3
	off += 8

	// p.InnerBase ID:7 thrift.STRUCT
	off += 3
	off += p.InnerBase.BLength()

	// p.BaseResp ID:255 thrift.STRUCT
	off += 3
	off += p.BaseResp.BLength()

	// p.Subfix ID:32767 thrift.DOUBLE
	off += 3
	off += 8
	return off + 1
}

func (p *ExamplePartial2) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExamplePartial2) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Msg ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Msg)

	// p.Cookie ID:2 thrift.DOUBLE
	if p.Cookie != nil {
		b[off] = 4
		binary.BigEndian.PutUint16(b[off+1:], 2)
		off += 3
		binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(p.Cookie)))
		off += 8
	}

	// p.Status ID:3 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Status))
	off += 4

	// p.Header ID:4 thrift.BOOL
	if p.Header != nil {
		b[off] = 2
		binary.BigEndian.PutUint16(b[off+1:], 4)
		off += 3
		b[off] = *((*byte)(unsafe.Pointer(p.Header)))
		off++
	}

	// p.Code ID:6 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 6)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Code))
	off += 8

	// p.InnerBase ID:7 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 7)
	off += 3
	off += p.InnerBase.FastWriteNocopy(b[off:], w)

	// p.BaseResp ID:255 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 255)
	off += 3
	off += p.BaseResp.FastWriteNocopy(b[off:], w)

	// p.Subfix ID:32767 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 32767)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.Subfix)))
	off += 8

	b[off] = 0
	return off + 1
}

func (p *ExamplePartial2) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Msg ID:1 thrift.STRING
			p.Msg, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x204: // p.Cookie ID:2 thrift.DOUBLE
			if p.Cookie == nil {
				p.Cookie = new(float64)
			}
			*p.Cookie, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x308: // p.Status ID:3 thrift.I32
			p.Status, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		case 0x402: // p.Header ID:4 thrift.BOOL
			if p.Header == nil {
				p.Header = new(bool)
			}
			*p.Header, l, err = x.ReadBool(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x60a: // p.Code ID:6 thrift.I64
			p.Code, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x70c: // p.InnerBase ID:7 thrift.STRUCT
			p.InnerBase = NewInnerBasePartial()
			l, err = p.InnerBase.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xff0c: // p.BaseResp ID:255 thrift.STRUCT
			p.BaseResp = base.NewBaseResp()
			l, err = p.BaseResp.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x7fff04: // p.Subfix ID:32767 thrift.DOUBLE
			p.Subfix, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 3 // Status
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExamplePartial2[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExamplePartial2[fid]))
}

func (p *InnerBasePartial) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Bool ID:1 thrift.BOOL
	off += 3
	off += 1

	// p.Base ID:255 thrift.STRUCT
	off += 3
	off += p.Base.BLength()
	return off + 1
}

func (p *InnerBasePartial) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *InnerBasePartial) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Bool ID:1 thrift.BOOL
	b[off] = 2
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	b[off] = *((*byte)(unsafe.Pointer(&p.Bool)))
	off++

	// p.Base ID:255 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 255)
	off += 3
	off += p.Base.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *InnerBasePartial) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x102: // p.Bool ID:1 thrift.BOOL
			p.Bool, l, err = x.ReadBool(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xff0c: // p.Base ID:255 thrift.STRUCT
			p.Base = base.NewBase()
			l, err = p.Base.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_InnerBasePartial[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleFallback) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Msg ID:2 thrift.STRING
	off += 3
	off += 4 + len(p.Msg)

	// p.Heeader ID:3 thrift.STRING
	off += 3
	off += 4 + len(p.Heeader)
	return off + 1
}

func (p *ExampleFallback) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleFallback) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Msg ID:2 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Msg)

	// p.Heeader ID:3 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Heeader)

	b[off] = 0
	return off + 1
}

func (p *ExampleFallback) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x20b: // p.Msg ID:2 thrift.STRING
			p.Msg, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30b: // p.Heeader ID:3 thrift.STRING
			p.Heeader, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleFallback[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *InnerCode) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.C1 ID:1 thrift.I64
	off += 3
	off += 8

	// p.C2 ID:2 thrift.I16
	off += 3
	off += 2

	// p.C3 ID:3 thrift.LIST
	off += 3
	off += 5
	for _, v := range p.C3 {
		off += v.BLength()
	}
	return off + 1
}

func (p *InnerCode) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *InnerCode) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.C1 ID:1 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.C1))
	off += 8

	// p.C2 ID:2 thrift.I16
	b[off] = 6
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint16(b[off:], uint16(p.C2))
	off += 2

	// p.C3 ID:3 thrift.LIST
	b[off] = 15
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	b[off] = 12
	binary.BigEndian.PutUint32(b[off+1:], uint32(len(p.C3)))
	off += 5
	for _, v := range p.C3 {
		off += v.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *InnerCode) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10a: // p.C1 ID:1 thrift.I64
			p.C1, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x206: // p.C2 ID:2 thrift.I16
			p.C2, l, err = x.ReadI16(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30f: // p.C3 ID:3 thrift.LIST
			var sz int
			_, sz, l, err = x.ReadListBegin(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			p.C3 = make([]*InnerCode, sz)
			for i := 0; i < sz; i++ {
				p.C3[i] = NewInnerCode()
				l, err = p.C3[i].FastRead(b[off:])
				off += l
				if err != nil {
					goto ReadFieldError
				}
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_InnerCode[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleApiBody) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Code ID:1 thrift.I64
	off += 3
	off += 8

	// p.Code2 ID:2 thrift.I16
	off += 3
	off += 2

	// p.InnerCode ID:3 thrift.STRUCT
	off += 3
	off += p.InnerCode.BLength()
	return off + 1
}

func (p *ExampleApiBody) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleApiBody) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Code ID:1 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Code))
	off += 8

	// p.Code2 ID:2 thrift.I16
	b[off] = 6
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint16(b[off:], uint16(p.Code2))
	off += 2

	// p.InnerCode ID:3 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += p.InnerCode.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleApiBody) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10a: // p.Code ID:1 thrift.I64
			p.Code, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x206: // p.Code2 ID:2 thrift.I16
			p.Code2, l, err = x.ReadI16(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30c: // p.InnerCode ID:3 thrift.STRUCT
			p.InnerCode = NewInnerCode()
			l, err = p.InnerCode.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleApiBody[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *InnerJSON) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.A)

	// p.B ID:2 thrift.I64
	off += 3
	off += 8

	// p.InnerForm ID:3 thrift.DOUBLE
	off += 3
	off += 8
	return off + 1
}

func (p *InnerJSON) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *InnerJSON) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.A)

	// p.B ID:2 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.B))
	off += 8

	// p.InnerForm ID:3 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.InnerForm)))
	off += 8

	b[off] = 0
	return off + 1
}

func (p *InnerJSON) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.A ID:1 thrift.STRING
			p.A, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x20a: // p.B ID:2 thrift.I64
			p.B, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x304: // p.InnerForm ID:3 thrift.DOUBLE
			p.InnerForm, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_InnerJSON[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExamplePostForm) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Query ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Query)

	// p.Form ID:2 thrift.STRING
	off += 3
	off += 4 + len(p.Form)

	// p.JSON ID:3 thrift.STRUCT
	off += 3
	off += p.JSON.BLength()
	return off + 1
}

func (p *ExamplePostForm) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExamplePostForm) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Query ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Query)

	// p.Form ID:2 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Form)

	// p.JSON ID:3 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += p.JSON.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExamplePostForm) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Query ID:1 thrift.STRING
			p.Query, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x20b: // p.Form ID:2 thrift.STRING
			p.Form, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30c: // p.JSON ID:3 thrift.STRUCT
			p.JSON = NewInnerJSON()
			l, err = p.JSON.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExamplePostForm[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *InnerStruct) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.InnerJSON ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.InnerJSON)

	// p.Must ID:2 thrift.STRING
	off += 3
	off += 4 + len(p.Must)
	return off + 1
}

func (p *InnerStruct) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *InnerStruct) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.InnerJSON ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.InnerJSON)

	// p.Must ID:2 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Must)

	b[off] = 0
	return off + 1
}

func (p *InnerStruct) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.InnerJSON ID:1 thrift.STRING
			p.InnerJSON, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x20b: // p.Must ID:2 thrift.STRING
			p.Must, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 2 // Must
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_InnerStruct[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_InnerStruct[fid]))
}

func (p *ExampleDynamicStruct) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Query ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Query)

	// p.JSON ID:2 thrift.STRING
	off += 3
	off += 4 + len(p.JSON)

	// p.InnerStruct ID:3 thrift.STRUCT
	off += 3
	off += p.InnerStruct.BLength()
	return off + 1
}

func (p *ExampleDynamicStruct) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleDynamicStruct) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Query ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Query)

	// p.JSON ID:2 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.JSON)

	// p.InnerStruct ID:3 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	off += p.InnerStruct.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleDynamicStruct) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Query ID:1 thrift.STRING
			p.Query, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		case 0x20b: // p.JSON ID:2 thrift.STRING
			p.JSON, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x30c: // p.InnerStruct ID:3 thrift.STRUCT
			p.InnerStruct = NewInnerStruct()
			l, err = p.InnerStruct.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 1 // Query
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleDynamicStruct[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExampleDynamicStruct[fid]))
}

func (p *ExampleBase64Binary) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Binary ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Binary)

	// p.Binary2 ID:2 thrift.STRING
	off += 3
	off += 4 + len(p.Binary2)
	return off + 1
}

func (p *ExampleBase64Binary) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleBase64Binary) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Binary ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteBinaryNocopy(b[off:], w, p.Binary)

	// p.Binary2 ID:2 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	off += thrift.Binary.WriteBinaryNocopy(b[off:], w, p.Binary2)

	b[off] = 0
	return off + 1
}

func (p *ExampleBase64Binary) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Binary ID:1 thrift.STRING
			p.Binary, l, err = x.ReadBinary(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x20b: // p.Binary2 ID:2 thrift.STRING
			p.Binary2, l, err = x.ReadBinary(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleBase64Binary[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleDefaultValue) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.A)

	// p.B ID:2 thrift.I32
	off += 3
	off += 4

	// p.C ID:3 thrift.DOUBLE
	off += 3
	off += 8

	// p.D ID:4 thrift.STRING
	off += 3
	off += 4 + len(p.D)
	return off + 1
}

func (p *ExampleDefaultValue) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleDefaultValue) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.A)

	// p.B ID:2 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.B))
	off += 4

	// p.C ID:3 thrift.DOUBLE
	b[off] = 4
	binary.BigEndian.PutUint16(b[off+1:], 3)
	off += 3
	binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.C)))
	off += 8

	// p.D ID:4 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.D)

	b[off] = 0
	return off + 1
}

func (p *ExampleDefaultValue) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.A ID:1 thrift.STRING
			p.A, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x208: // p.B ID:2 thrift.I32
			p.B, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x304: // p.C ID:3 thrift.DOUBLE
			p.C, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x40b: // p.D ID:4 thrift.STRING
			p.D, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleDefaultValue[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleOptionalDefaultValue) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	if p.A != "hello" {
		off += 3
		off += 4 + len(p.A)
	}

	// p.B ID:2 thrift.I32
	off += 3
	off += 4

	// p.C ID:3 thrift.DOUBLE
	if p.C != 1.2 {
		off += 3
		off += 8
	}

	// p.D ID:4 thrift.STRING
	off += 3
	off += 4 + len(p.D)

	// p.E ID:5 thrift.STRING
	if p.E != nil {
		off += 3
		off += 4 + len(*p.E)
	}

	// p.F ID:6 thrift.STRING
	if p.F != nil {
		off += 3
		off += 4 + len(*p.F)
	}
	return off + 1
}

func (p *ExampleOptionalDefaultValue) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleOptionalDefaultValue) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.A ID:1 thrift.STRING
	if p.A != "hello" {
		b[off] = 11
		binary.BigEndian.PutUint16(b[off+1:], 1)
		off += 3
		off += thrift.Binary.WriteStringNocopy(b[off:], w, p.A)
	}

	// p.B ID:2 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 2)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.B))
	off += 4

	// p.C ID:3 thrift.DOUBLE
	if p.C != 1.2 {
		b[off] = 4
		binary.BigEndian.PutUint16(b[off+1:], 3)
		off += 3
		binary.BigEndian.PutUint64(b[off:], *(*uint64)(unsafe.Pointer(&p.C)))
		off += 8
	}

	// p.D ID:4 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 4)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.D)

	// p.E ID:5 thrift.STRING
	if p.E != nil {
		b[off] = 11
		binary.BigEndian.PutUint16(b[off+1:], 5)
		off += 3
		off += thrift.Binary.WriteStringNocopy(b[off:], w, *p.E)
	}

	// p.F ID:6 thrift.STRING
	if p.F != nil {
		b[off] = 11
		binary.BigEndian.PutUint16(b[off+1:], 6)
		off += 3
		off += thrift.Binary.WriteStringNocopy(b[off:], w, *p.F)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleOptionalDefaultValue) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	var isset uint8
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.A ID:1 thrift.STRING
			p.A, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x208: // p.B ID:2 thrift.I32
			p.B, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x1
		case 0x304: // p.C ID:3 thrift.DOUBLE
			p.C, l, err = x.ReadDouble(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x40b: // p.D ID:4 thrift.STRING
			p.D, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
			isset |= 0x2
		case 0x50b: // p.E ID:5 thrift.STRING
			if p.E == nil {
				p.E = new(string)
			}
			*p.E, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x60b: // p.F ID:6 thrift.STRING
			if p.F == nil {
				p.F = new(string)
			}
			*p.F, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	if isset&0x1 == 0 {
		fid = 2 // B
		goto RequiredFieldNotSetError
	}
	if isset&0x2 == 0 {
		fid = 4 // D
		goto RequiredFieldNotSetError
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleOptionalDefaultValue[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
RequiredFieldNotSetError:
	return off, thrift.NewProtocolException(thrift.INVALID_DATA, fmt.Sprintf("required field %s is not set", fieldIDToName_ExampleOptionalDefaultValue[fid]))
}

func (p *ExampleNoBodyStruct) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.NoBodyStruct ID:1 thrift.STRUCT
	off += 3
	off += p.NoBodyStruct.BLength()
	return off + 1
}

func (p *ExampleNoBodyStruct) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleNoBodyStruct) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.NoBodyStruct ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.NoBodyStruct.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleNoBodyStruct) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.NoBodyStruct ID:1 thrift.STRUCT
			p.NoBodyStruct = NewNoBodyStruct()
			l, err = p.NoBodyStruct.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleNoBodyStruct[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *NoBodyStruct) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.A ID:1 thrift.I32
	if p.A != nil {
		off += 3
		off += 4
	}

	// p.B ID:2 thrift.I32
	if p.B != nil {
		off += 3
		off += 4
	}

	// p.C ID:3 thrift.I32
	if p.C != 1 {
		off += 3
		off += 4
	}
	return off + 1
}

func (p *NoBodyStruct) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *NoBodyStruct) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.A ID:1 thrift.I32
	if p.A != nil {
		b[off] = 8
		binary.BigEndian.PutUint16(b[off+1:], 1)
		off += 3
		binary.BigEndian.PutUint32(b[off:], uint32(*p.A))
		off += 4
	}

	// p.B ID:2 thrift.I32
	if p.B != nil {
		b[off] = 8
		binary.BigEndian.PutUint16(b[off+1:], 2)
		off += 3
		binary.BigEndian.PutUint32(b[off:], uint32(*p.B))
		off += 4
	}

	// p.C ID:3 thrift.I32
	if p.C != 1 {
		b[off] = 8
		binary.BigEndian.PutUint16(b[off+1:], 3)
		off += 3
		binary.BigEndian.PutUint32(b[off:], uint32(p.C))
		off += 4
	}

	b[off] = 0
	return off + 1
}

func (p *NoBodyStruct) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x108: // p.A ID:1 thrift.I32
			if p.A == nil {
				p.A = new(int32)
			}
			*p.A, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x208: // p.B ID:2 thrift.I32
			if p.B == nil {
				p.B = new(int32)
			}
			*p.B, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x308: // p.C ID:3 thrift.I32
			p.C, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_NoBodyStruct[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *Exception) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Code ID:1 thrift.I32
	off += 3
	off += 4

	// p.Msg ID:255 thrift.STRING
	off += 3
	off += 4 + len(p.Msg)
	return off + 1
}

func (p *Exception) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *Exception) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Code ID:1 thrift.I32
	b[off] = 8
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	binary.BigEndian.PutUint32(b[off:], uint32(p.Code))
	off += 4

	// p.Msg ID:255 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 255)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Msg)

	b[off] = 0
	return off + 1
}

func (p *Exception) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x108: // p.Code ID:1 thrift.I32
			p.Code, l, err = x.ReadI32(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0xff0b: // p.Msg ID:255 thrift.STRING
			p.Msg, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_Exception[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceExampleMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceExampleMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceExampleMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceExampleMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleReq()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceExampleMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceExampleMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}

	// p.Err ID:1 thrift.STRUCT
	if p.Err != nil {
		off += 3
		off += p.Err.BLength()
	}
	return off + 1
}

func (p *ExampleServiceExampleMethodResult) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceExampleMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	// p.Err ID:1 thrift.STRUCT
	if p.Err != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 1)
		off += 3
		off += p.Err.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceExampleMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleResp()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		case 0x10c: // p.Err ID:1 thrift.STRUCT
			p.Err = NewException()
			l, err = p.Err.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceExampleMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceErrorMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceErrorMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceErrorMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceErrorMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleError()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceErrorMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceErrorMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceErrorMethodResult) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceErrorMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceErrorMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleErrorResp()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceErrorMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceInt2FloatMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceInt2FloatMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceInt2FloatMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceInt2FloatMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleInt2Float()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceInt2FloatMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceInt2FloatMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceInt2FloatMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceInt2FloatMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceInt2FloatMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleInt2Float()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceInt2FloatMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceJSONStringMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceJSONStringMethodArgs) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceJSONStringMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceJSONStringMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleJSONString()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceJSONStringMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceJSONStringMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceJSONStringMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceJSONStringMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceJSONStringMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleJSONString()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceJSONStringMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServicePartialMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServicePartialMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServicePartialMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServicePartialMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExamplePartial2()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServicePartialMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServicePartialMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServicePartialMethodResult) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServicePartialMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServicePartialMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExamplePartial()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServicePartialMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceFallbackMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceFallbackMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceFallbackMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceFallbackMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleFallback()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceFallbackMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceFallbackMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceFallbackMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceFallbackMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceFallbackMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleFallback()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceFallbackMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceApiBodyMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceApiBodyMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceApiBodyMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceApiBodyMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleApiBody()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceApiBodyMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceApiBodyMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceApiBodyMethodResult) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceApiBodyMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceApiBodyMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleApiBody()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceApiBodyMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServicePostFormMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServicePostFormMethodArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServicePostFormMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServicePostFormMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExamplePostForm()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServicePostFormMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServicePostFormMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServicePostFormMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServicePostFormMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServicePostFormMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExamplePostForm()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServicePostFormMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceDynamicStructMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceDynamicStructMethodArgs) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceDynamicStructMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceDynamicStructMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleDynamicStruct()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceDynamicStructMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceDynamicStructMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceDynamicStructMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceDynamicStructMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceDynamicStructMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleDynamicStruct()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceDynamicStructMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceBase64BinaryMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceBase64BinaryMethodArgs) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceBase64BinaryMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceBase64BinaryMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleBase64Binary()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceBase64BinaryMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceBase64BinaryMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceBase64BinaryMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceBase64BinaryMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceBase64BinaryMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleBase64Binary()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceBase64BinaryMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceDefaultValueMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceDefaultValueMethodArgs) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceDefaultValueMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceDefaultValueMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleDefaultValue()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceDefaultValueMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceDefaultValueMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceDefaultValueMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceDefaultValueMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceDefaultValueMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleDefaultValue()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceDefaultValueMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceOptionalDefaultValueMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceOptionalDefaultValueMethodArgs) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceOptionalDefaultValueMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceOptionalDefaultValueMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleOptionalDefaultValue()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceOptionalDefaultValueMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceOptionalDefaultValueMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceOptionalDefaultValueMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceOptionalDefaultValueMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceOptionalDefaultValueMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleOptionalDefaultValue()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceOptionalDefaultValueMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceNoBodyStructMethodArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	off += 3
	off += p.Req.BLength()
	return off + 1
}

func (p *ExampleServiceNoBodyStructMethodArgs) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceNoBodyStructMethodArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRUCT
	b[off] = 12
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += p.Req.FastWriteNocopy(b[off:], w)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceNoBodyStructMethodArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10c: // p.Req ID:1 thrift.STRUCT
			p.Req = NewExampleNoBodyStruct()
			l, err = p.Req.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceNoBodyStructMethodArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceNoBodyStructMethodResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		off += 3
		off += p.Success.BLength()
	}
	return off + 1
}

func (p *ExampleServiceNoBodyStructMethodResult) FastWrite(b []byte) int {
	return p.FastWriteNocopy(b, nil)
}

func (p *ExampleServiceNoBodyStructMethodResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRUCT
	if p.Success != nil {
		b[off] = 12
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += p.Success.FastWriteNocopy(b[off:], w)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceNoBodyStructMethodResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xc: // p.Success ID:0 thrift.STRUCT
			p.Success = NewExampleNoBodyStruct()
			l, err = p.Success.FastRead(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceNoBodyStructMethodResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceStringArgs) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRING
	off += 3
	off += 4 + len(p.Req)
	return off + 1
}

func (p *ExampleServiceStringArgs) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceStringArgs) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.STRING
	b[off] = 11
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	off += thrift.Binary.WriteStringNocopy(b[off:], w, p.Req)

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceStringArgs) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10b: // p.Req ID:1 thrift.STRING
			p.Req, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceStringArgs[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceStringResult) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRING
	if p.Success != nil {
		off += 3
		off += 4 + len(*p.Success)
	}
	return off + 1
}

func (p *ExampleServiceStringResult) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceStringResult) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.STRING
	if p.Success != nil {
		b[off] = 11
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		off += thrift.Binary.WriteStringNocopy(b[off:], w, *p.Success)
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceStringResult) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xb: // p.Success ID:0 thrift.STRING
			if p.Success == nil {
				p.Success = new(string)
			}
			*p.Success, l, err = x.ReadString(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceStringResult[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceI64Args) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.I64
	off += 3
	off += 8
	return off + 1
}

func (p *ExampleServiceI64Args) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceI64Args) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Req ID:1 thrift.I64
	b[off] = 10
	binary.BigEndian.PutUint16(b[off+1:], 1)
	off += 3
	binary.BigEndian.PutUint64(b[off:], uint64(p.Req))
	off += 8

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceI64Args) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0x10a: // p.Req ID:1 thrift.I64
			p.Req, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceI64Args[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}

func (p *ExampleServiceI64Result) BLength() int {
	if p == nil {
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.I64
	if p.Success != nil {
		off += 3
		off += 8
	}
	return off + 1
}

func (p *ExampleServiceI64Result) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) }

func (p *ExampleServiceI64Result) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int {
	if p == nil {
		b[0] = 0
		return 1
	}
	off := 0

	// p.Success ID:0 thrift.I64
	if p.Success != nil {
		b[off] = 10
		binary.BigEndian.PutUint16(b[off+1:], 0)
		off += 3
		binary.BigEndian.PutUint64(b[off:], uint64(*p.Success))
		off += 8
	}

	b[off] = 0
	return off + 1
}

func (p *ExampleServiceI64Result) FastRead(b []byte) (off int, err error) {
	var ftyp thrift.TType
	var fid int16
	var l int
	x := thrift.BinaryProtocol{}
	for {
		ftyp, fid, l, err = x.ReadFieldBegin(b[off:])
		off += l
		if err != nil {
			goto ReadFieldBeginError
		}
		if ftyp == thrift.STOP {
			break
		}
		switch uint32(fid)<<8 | uint32(ftyp) {
		case 0xa: // p.Success ID:0 thrift.I64
			if p.Success == nil {
				p.Success = new(int64)
			}
			*p.Success, l, err = x.ReadI64(b[off:])
			off += l
			if err != nil {
				goto ReadFieldError
			}
		default:
			l, err = x.Skip(b[off:], ftyp)
			off += l
			if err != nil {
				goto SkipFieldError
			}
		}
	}
	return
ReadFieldBeginError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err)
ReadFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleServiceI64Result[fid]), err)
SkipFieldError:
	return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err)
}
