// Autogenerated by Thrift for thrift/compiler/test/fixtures/adapter/src/module.thrift
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//  @generated

package module


import (
    "reflect"
    "sync"

    thrift "github.com/facebook/fbthrift/thrift/lib/go/thrift/types"
)

// (needed to ensure safety because of naive import list construction)
var _ = thrift.ZERO
var _ = reflect.Ptr

// Premade codec specs
var (
    premadeCodecTypeSpec_module_Color *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_ThriftAdaptedEnum *thrift.TypeSpec = nil
    premadeCodecTypeSpec_string *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_MyAnnotation *thrift.TypeSpec = nil
    premadeCodecTypeSpec_i32 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_i32_5137 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_set_string *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_SetWithAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_StringWithAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_list_module_StringWithAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_ListWithElemAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter_2312 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_map_string_module_ListWithElemAdapter_withAdapter_2312 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_map_string_ListWithElemAdapter_withAdapter_8454 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_binary *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_binary_5673 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_i64 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_MyI64 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_DoubleTypedefI64 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Foo *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Baz *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Foo_6868 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Foo_3943 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_FooWithAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_FooWithAdapter_9317 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_list_module_FooWithAdapter_9317 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Baz_7352 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_DirectlyAdapted *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Bar *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_IndependentDirectlyAdapted *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_StructWithFieldAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_set_i32 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_TerseAdaptedFields *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_A *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedA *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_B *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Config *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_MyStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_DurationMs *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_IOBuf *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_CustomProtocolType *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_IndirectionString *thrift.TypeSpec = nil
    premadeCodecTypeSpec_bool *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedBool *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedInteger *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptTestStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_byte *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedByte *thrift.TypeSpec = nil
    premadeCodecTypeSpec_i16 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedShort *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedLong *thrift.TypeSpec = nil
    premadeCodecTypeSpec_double *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedDouble *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedString *thrift.TypeSpec = nil
    premadeCodecTypeSpec_list_i64 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_set_i64 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_map_i64_i64 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedEnum *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_DoubleTypedefBool *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptTemplatedTestStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptTemplatedNestedTestStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptTestUnion *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_DirectlyAdaptedStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedTypedef *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_TypedefOfDirect *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_StructFieldAdaptedStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_CircularStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_CircularAdaptee *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AdaptedCircularAdaptee *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_DeclaredAfterStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_ReorderedStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_RenamedStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_SameNamespaceStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_HeapAllocated *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_MoveOnly *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_AlsoMoveOnly *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_ApplyAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_TransitiveAdapted *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_CountingInt *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_CountingStruct *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Person *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_Person2 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_RenamedStructWithStructAdapterAndFieldAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_MyI32 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_StructWithAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_UnionWithAdapter *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_MyI32_4873 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_module_StringWithAdapter_7208 *thrift.TypeSpec = nil
)

// Premade codec specs initializer
var premadeCodecSpecsInitOnce = sync.OnceFunc(func() {
    premadeCodecTypeSpec_module_Color = &thrift.TypeSpec{
        CodecEnumSpec: &thrift.CodecEnumSpec{},

    }
    premadeCodecTypeSpec_module_ThriftAdaptedEnum = &thrift.TypeSpec{
        CodecEnumSpec: &thrift.CodecEnumSpec{},

    }
    premadeCodecTypeSpec_string = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_STRING,
},

    }
    premadeCodecTypeSpec_module_MyAnnotation = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewMyAnnotation() },
},

    }
    premadeCodecTypeSpec_i32 = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_I32,
},

    }
    premadeCodecTypeSpec_module_i32_5137 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i32,
},

    }
    premadeCodecTypeSpec_set_string = &thrift.TypeSpec{
        CodecSetSpec: &thrift.CodecSetSpec{
    ElementWireType: thrift.STRING,
	ElementTypeSpec: premadeCodecTypeSpec_string,
},

    }
    premadeCodecTypeSpec_module_SetWithAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_set_string,
},

    }
    premadeCodecTypeSpec_module_StringWithAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_string,
},

    }
    premadeCodecTypeSpec_list_module_StringWithAdapter = &thrift.TypeSpec{
        CodecListSpec: &thrift.CodecListSpec{
    ElementWireType: thrift.STRING,
	ElementTypeSpec: premadeCodecTypeSpec_module_StringWithAdapter,
},

    }
    premadeCodecTypeSpec_module_ListWithElemAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_list_module_StringWithAdapter,
},

    }
    premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_ListWithElemAdapter,
},

    }
    premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter_2312 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter,
},

    }
    premadeCodecTypeSpec_map_string_module_ListWithElemAdapter_withAdapter_2312 = &thrift.TypeSpec{
        CodecMapSpec: &thrift.CodecMapSpec{
	KeyTypeSpec:   premadeCodecTypeSpec_string,
	ValueTypeSpec: premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter_2312,
    KeyWireType:   thrift.STRING,
	ValueWireType: thrift.LIST,
},

    }
    premadeCodecTypeSpec_module_map_string_ListWithElemAdapter_withAdapter_8454 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_map_string_module_ListWithElemAdapter_withAdapter_2312,
},

    }
    premadeCodecTypeSpec_binary = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_BINARY,
},

    }
    premadeCodecTypeSpec_module_binary_5673 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_binary,
},

    }
    premadeCodecTypeSpec_i64 = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_I64,
},

    }
    premadeCodecTypeSpec_module_MyI64 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i64,
},

    }
    premadeCodecTypeSpec_module_DoubleTypedefI64 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_MyI64,
},

    }
    premadeCodecTypeSpec_module_Foo = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewFoo() },
},

    }
    premadeCodecTypeSpec_module_Baz = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewBaz() },
},

    }
    premadeCodecTypeSpec_module_Foo_6868 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_Foo,
},

    }
    premadeCodecTypeSpec_module_Foo_3943 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_Foo,
},

    }
    premadeCodecTypeSpec_module_FooWithAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_Foo,
},

    }
    premadeCodecTypeSpec_module_FooWithAdapter_9317 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_FooWithAdapter,
},

    }
    premadeCodecTypeSpec_list_module_FooWithAdapter_9317 = &thrift.TypeSpec{
        CodecListSpec: &thrift.CodecListSpec{
    ElementWireType: thrift.STRUCT,
	ElementTypeSpec: premadeCodecTypeSpec_module_FooWithAdapter_9317,
},

    }
    premadeCodecTypeSpec_module_Baz_7352 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_Baz,
},

    }
    premadeCodecTypeSpec_module_DirectlyAdapted = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewDirectlyAdapted() },
},

    }
    premadeCodecTypeSpec_module_Bar = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewBar() },
},

    }
    premadeCodecTypeSpec_module_IndependentDirectlyAdapted = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewIndependentDirectlyAdapted() },
},

    }
    premadeCodecTypeSpec_module_StructWithFieldAdapter = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewStructWithFieldAdapter() },
},

    }
    premadeCodecTypeSpec_set_i32 = &thrift.TypeSpec{
        CodecSetSpec: &thrift.CodecSetSpec{
    ElementWireType: thrift.I32,
	ElementTypeSpec: premadeCodecTypeSpec_i32,
},

    }
    premadeCodecTypeSpec_module_TerseAdaptedFields = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewTerseAdaptedFields() },
},

    }
    premadeCodecTypeSpec_module_A = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewA() },
},

    }
    premadeCodecTypeSpec_module_AdaptedA = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_A,
},

    }
    premadeCodecTypeSpec_module_B = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewB() },
},

    }
    premadeCodecTypeSpec_module_Config = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewConfig() },
},

    }
    premadeCodecTypeSpec_module_MyStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewMyStruct() },
},

    }
    premadeCodecTypeSpec_module_DurationMs = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i64,
},

    }
    premadeCodecTypeSpec_module_IOBuf = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_binary,
},

    }
    premadeCodecTypeSpec_module_CustomProtocolType = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_IOBuf,
},

    }
    premadeCodecTypeSpec_module_IndirectionString = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_string,
},

    }
    premadeCodecTypeSpec_bool = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_BOOL,
},

    }
    premadeCodecTypeSpec_module_AdaptedBool = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_bool,
},

    }
    premadeCodecTypeSpec_module_AdaptedInteger = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i32,
},

    }
    premadeCodecTypeSpec_module_AdaptTestStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewAdaptTestStruct() },
},

    }
    premadeCodecTypeSpec_byte = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_BYTE,
},

    }
    premadeCodecTypeSpec_module_AdaptedByte = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_byte,
},

    }
    premadeCodecTypeSpec_i16 = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_I16,
},

    }
    premadeCodecTypeSpec_module_AdaptedShort = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i16,
},

    }
    premadeCodecTypeSpec_module_AdaptedLong = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i64,
},

    }
    premadeCodecTypeSpec_double = &thrift.TypeSpec{
        CodecPrimitiveSpec: &thrift.CodecPrimitiveSpec{
    PrimitiveType: thrift.CODEC_PRIMITIVE_TYPE_DOUBLE,
},

    }
    premadeCodecTypeSpec_module_AdaptedDouble = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_double,
},

    }
    premadeCodecTypeSpec_module_AdaptedString = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_string,
},

    }
    premadeCodecTypeSpec_list_i64 = &thrift.TypeSpec{
        CodecListSpec: &thrift.CodecListSpec{
    ElementWireType: thrift.I64,
	ElementTypeSpec: premadeCodecTypeSpec_i64,
},

    }
    premadeCodecTypeSpec_set_i64 = &thrift.TypeSpec{
        CodecSetSpec: &thrift.CodecSetSpec{
    ElementWireType: thrift.I64,
	ElementTypeSpec: premadeCodecTypeSpec_i64,
},

    }
    premadeCodecTypeSpec_map_i64_i64 = &thrift.TypeSpec{
        CodecMapSpec: &thrift.CodecMapSpec{
	KeyTypeSpec:   premadeCodecTypeSpec_i64,
	ValueTypeSpec: premadeCodecTypeSpec_i64,
    KeyWireType:   thrift.I64,
	ValueWireType: thrift.I64,
},

    }
    premadeCodecTypeSpec_module_AdaptedEnum = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_ThriftAdaptedEnum,
},

    }
    premadeCodecTypeSpec_module_DoubleTypedefBool = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_AdaptedBool,
},

    }
    premadeCodecTypeSpec_module_AdaptTemplatedTestStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewAdaptTemplatedTestStruct() },
},

    }
    premadeCodecTypeSpec_module_AdaptTemplatedNestedTestStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewAdaptTemplatedNestedTestStruct() },
},

    }
    premadeCodecTypeSpec_module_AdaptTestUnion = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewAdaptTestUnion() },
},

    }
    premadeCodecTypeSpec_module_AdaptedStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewAdaptedStruct() },
},

    }
    premadeCodecTypeSpec_module_DirectlyAdaptedStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewDirectlyAdaptedStruct() },
},

    }
    premadeCodecTypeSpec_module_AdaptedTypedef = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_AdaptedStruct,
},

    }
    premadeCodecTypeSpec_module_TypedefOfDirect = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_DirectlyAdaptedStruct,
},

    }
    premadeCodecTypeSpec_module_StructFieldAdaptedStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewStructFieldAdaptedStruct() },
},

    }
    premadeCodecTypeSpec_module_CircularStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewCircularStruct() },
},

    }
    premadeCodecTypeSpec_module_CircularAdaptee = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewCircularAdaptee() },
},

    }
    premadeCodecTypeSpec_module_AdaptedCircularAdaptee = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_CircularAdaptee,
},

    }
    premadeCodecTypeSpec_module_DeclaredAfterStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewDeclaredAfterStruct() },
},

    }
    premadeCodecTypeSpec_module_ReorderedStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewReorderedStruct() },
},

    }
    premadeCodecTypeSpec_module_RenamedStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewRenamedStruct() },
},

    }
    premadeCodecTypeSpec_module_SameNamespaceStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewSameNamespaceStruct() },
},

    }
    premadeCodecTypeSpec_module_HeapAllocated = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewHeapAllocated() },
},

    }
    premadeCodecTypeSpec_module_MoveOnly = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewMoveOnly() },
},

    }
    premadeCodecTypeSpec_module_AlsoMoveOnly = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewAlsoMoveOnly() },
},

    }
    premadeCodecTypeSpec_module_ApplyAdapter = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewApplyAdapter() },
},

    }
    premadeCodecTypeSpec_module_TransitiveAdapted = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewTransitiveAdapted() },
},

    }
    premadeCodecTypeSpec_module_CountingInt = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i64,
},

    }
    premadeCodecTypeSpec_module_CountingStruct = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewCountingStruct() },
},

    }
    premadeCodecTypeSpec_module_Person = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewPerson() },
},

    }
    premadeCodecTypeSpec_module_Person2 = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewPerson2() },
},

    }
    premadeCodecTypeSpec_module_RenamedStructWithStructAdapterAndFieldAdapter = &thrift.TypeSpec{
        CodecStructSpec: &thrift.CodecStructSpec{
    NewFunc: func() thrift.Struct { return NewRenamedStructWithStructAdapterAndFieldAdapter() },
},

    }
    premadeCodecTypeSpec_module_MyI32 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_i32,
},

    }
    premadeCodecTypeSpec_module_StructWithAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_Bar,
},

    }
    premadeCodecTypeSpec_module_UnionWithAdapter = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_Baz,
},

    }
    premadeCodecTypeSpec_module_MyI32_4873 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_MyI32,
},

    }
    premadeCodecTypeSpec_module_StringWithAdapter_7208 = &thrift.TypeSpec{
        CodecTypedefSpec: &thrift.CodecTypedefSpec{
	UnderlyingTypeSpec: premadeCodecTypeSpec_module_StringWithAdapter,
},

    }
})

// Premade struct specs
var (
    premadeStructSpec_MyAnnotation *thrift.StructSpec = nil
    premadeStructSpec_Foo *thrift.StructSpec = nil
    premadeStructSpec_Baz *thrift.StructSpec = nil
    premadeStructSpec_Bar *thrift.StructSpec = nil
    premadeStructSpec_DirectlyAdapted *thrift.StructSpec = nil
    premadeStructSpec_IndependentDirectlyAdapted *thrift.StructSpec = nil
    premadeStructSpec_StructWithFieldAdapter *thrift.StructSpec = nil
    premadeStructSpec_TerseAdaptedFields *thrift.StructSpec = nil
    premadeStructSpec_B *thrift.StructSpec = nil
    premadeStructSpec_A *thrift.StructSpec = nil
    premadeStructSpec_Config *thrift.StructSpec = nil
    premadeStructSpec_MyStruct *thrift.StructSpec = nil
    premadeStructSpec_AdaptTestStruct *thrift.StructSpec = nil
    premadeStructSpec_AdaptTemplatedTestStruct *thrift.StructSpec = nil
    premadeStructSpec_AdaptTemplatedNestedTestStruct *thrift.StructSpec = nil
    premadeStructSpec_AdaptTestUnion *thrift.StructSpec = nil
    premadeStructSpec_AdaptedStruct *thrift.StructSpec = nil
    premadeStructSpec_DirectlyAdaptedStruct *thrift.StructSpec = nil
    premadeStructSpec_StructFieldAdaptedStruct *thrift.StructSpec = nil
    premadeStructSpec_CircularAdaptee *thrift.StructSpec = nil
    premadeStructSpec_CircularStruct *thrift.StructSpec = nil
    premadeStructSpec_ReorderedStruct *thrift.StructSpec = nil
    premadeStructSpec_DeclaredAfterStruct *thrift.StructSpec = nil
    premadeStructSpec_RenamedStruct *thrift.StructSpec = nil
    premadeStructSpec_SameNamespaceStruct *thrift.StructSpec = nil
    premadeStructSpec_HeapAllocated *thrift.StructSpec = nil
    premadeStructSpec_MoveOnly *thrift.StructSpec = nil
    premadeStructSpec_AlsoMoveOnly *thrift.StructSpec = nil
    premadeStructSpec_ApplyAdapter *thrift.StructSpec = nil
    premadeStructSpec_TransitiveAdapted *thrift.StructSpec = nil
    premadeStructSpec_CountingStruct *thrift.StructSpec = nil
    premadeStructSpec_Person *thrift.StructSpec = nil
    premadeStructSpec_Person2 *thrift.StructSpec = nil
    premadeStructSpec_RenamedStructWithStructAdapterAndFieldAdapter *thrift.StructSpec = nil
    premadeStructSpec_reqServiceFunc *thrift.StructSpec = nil
    premadeStructSpec_respServiceFunc *thrift.StructSpec = nil
    premadeStructSpec_reqAdapterServiceCount *thrift.StructSpec = nil
    premadeStructSpec_respAdapterServiceCount *thrift.StructSpec = nil
    premadeStructSpec_reqAdapterServiceAdaptedTypes *thrift.StructSpec = nil
    premadeStructSpec_respAdapterServiceAdaptedTypes *thrift.StructSpec = nil
)

// Premade struct specs initializer
var premadeStructSpecsInitOnce = sync.OnceFunc(func() {
    premadeStructSpec_MyAnnotation = &thrift.StructSpec{
    Name:               "MyAnnotation",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "signature",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "color",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_Color,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
    },
}
    premadeStructSpec_Foo = &thrift.StructSpec{
    Name:               "Foo",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "intField",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_i32_5137,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "optionalIntField",
            ReflectIndex:         1,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_i32_5137,
            MustBeSetToSerialize: true,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "intFieldWithDefault",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_i32_5137,
            MustBeSetToSerialize: false,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "setField",
            ReflectIndex:         3,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_SetWithAdapter,
            MustBeSetToSerialize: false,
        },        {
            ID:                   5,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "optionalSetField",
            ReflectIndex:         4,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_SetWithAdapter,
            MustBeSetToSerialize: true,
        },        {
            ID:                   6,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "mapField",
            ReflectIndex:         5,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_map_string_ListWithElemAdapter_withAdapter_8454,
            MustBeSetToSerialize: false,
        },        {
            ID:                   7,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "optionalMapField",
            ReflectIndex:         6,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_map_string_ListWithElemAdapter_withAdapter_8454,
            MustBeSetToSerialize: true,
        },        {
            ID:                   8,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "binaryField",
            ReflectIndex:         7,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_binary_5673,
            MustBeSetToSerialize: false,
        },        {
            ID:                   9,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "longField",
            ReflectIndex:         8,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_MyI64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   10,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "adaptedLongField",
            ReflectIndex:         9,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_MyI64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   11,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "doubleAdaptedField",
            ReflectIndex:         10,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DoubleTypedefI64,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
        4: 3,
        5: 4,
        6: 5,
        7: 6,
        8: 7,
        9: 8,
        10: 9,
        11: 10,
    },
}
    premadeStructSpec_Baz = &thrift.StructSpec{
    Name:               "Baz",
    IsUnion:            true,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "intField",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_i32_5137,
            MustBeSetToSerialize: true,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "setField",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_SetWithAdapter,
            MustBeSetToSerialize: true,
        },        {
            ID:                   6,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "mapField",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_map_string_ListWithElemAdapter_withAdapter_8454,
            MustBeSetToSerialize: true,
        },        {
            ID:                   8,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "binaryField",
            ReflectIndex:         3,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_binary_5673,
            MustBeSetToSerialize: true,
        },        {
            ID:                   9,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "longField",
            ReflectIndex:         4,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_MyI64,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        4: 1,
        6: 2,
        8: 3,
        9: 4,
    },
}
    premadeStructSpec_Bar = &thrift.StructSpec{
    Name:               "Bar",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "structField",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_Foo_6868,
            MustBeSetToSerialize: true,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "optionalStructField",
            ReflectIndex:         1,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_Foo_3943,
            MustBeSetToSerialize: true,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.LIST),
            Name:                 "structListField",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_list_module_FooWithAdapter_9317,
            MustBeSetToSerialize: false,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.LIST),
            Name:                 "optionalStructListField",
            ReflectIndex:         3,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_list_module_FooWithAdapter_9317,
            MustBeSetToSerialize: true,
        },        {
            ID:                   5,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "unionField",
            ReflectIndex:         4,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_Baz_7352,
            MustBeSetToSerialize: true,
        },        {
            ID:                   6,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "optionalUnionField",
            ReflectIndex:         5,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_Baz_7352,
            MustBeSetToSerialize: true,
        },        {
            ID:                   7,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "adaptedStructField",
            ReflectIndex:         6,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DirectlyAdapted,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
        4: 3,
        5: 4,
        6: 5,
        7: 6,
    },
}
    premadeStructSpec_DirectlyAdapted = &thrift.StructSpec{
    Name:               "DirectlyAdapted",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_IndependentDirectlyAdapted = &thrift.StructSpec{
    Name:               "IndependentDirectlyAdapted",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_StructWithFieldAdapter = &thrift.StructSpec{
    Name:               "StructWithFieldAdapter",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "shared_field",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "opt_shared_field",
            ReflectIndex:         2,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: true,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "opt_boxed_field",
            ReflectIndex:         3,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
        4: 3,
    },
}
    premadeStructSpec_TerseAdaptedFields = &thrift.StructSpec{
    Name:               "TerseAdaptedFields",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "int_field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "string_field",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "set_field",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_set_i32,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
    },
}
    premadeStructSpec_B = &thrift.StructSpec{
    Name:               "B",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "a",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedA,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_A = &thrift.StructSpec{
    Name:               "A",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_Config = &thrift.StructSpec{
    Name:               "Config",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "path",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_MyStruct = &thrift.StructSpec{
    Name:               "MyStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "set_string",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_SetWithAdapter,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
    },
}
    premadeStructSpec_AdaptTestStruct = &thrift.StructSpec{
    Name:               "AdaptTestStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "delay",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DurationMs,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "custom",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_CustomProtocolType,
            MustBeSetToSerialize: false,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "timeout",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "data",
            ReflectIndex:         3,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   5,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "meta",
            ReflectIndex:         4,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },        {
            ID:                   6,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "indirectionString",
            ReflectIndex:         5,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_IndirectionString,
            MustBeSetToSerialize: false,
        },        {
            ID:                   7,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "string_data",
            ReflectIndex:         6,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },        {
            ID:                   8,
            WireType:             thrift.Type(thrift.BOOL),
            Name:                 "double_wrapped_bool",
            ReflectIndex:         7,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedBool,
            MustBeSetToSerialize: false,
        },        {
            ID:                   9,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "double_wrapped_integer",
            ReflectIndex:         8,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedInteger,
            MustBeSetToSerialize: false,
        },        {
            ID:                   10,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "binary_data",
            ReflectIndex:         9,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_binary,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
        4: 3,
        5: 4,
        6: 5,
        7: 6,
        8: 7,
        9: 8,
        10: 9,
    },
}
    premadeStructSpec_AdaptTemplatedTestStruct = &thrift.StructSpec{
    Name:               "AdaptTemplatedTestStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.BOOL),
            Name:                 "adaptedBool",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedBool,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.BYTE),
            Name:                 "adaptedByte",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedByte,
            MustBeSetToSerialize: false,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.I16),
            Name:                 "adaptedShort",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedShort,
            MustBeSetToSerialize: false,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "adaptedInteger",
            ReflectIndex:         3,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedInteger,
            MustBeSetToSerialize: false,
        },        {
            ID:                   5,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "adaptedLong",
            ReflectIndex:         4,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedLong,
            MustBeSetToSerialize: false,
        },        {
            ID:                   6,
            WireType:             thrift.Type(thrift.DOUBLE),
            Name:                 "adaptedDouble",
            ReflectIndex:         5,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedDouble,
            MustBeSetToSerialize: false,
        },        {
            ID:                   7,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "adaptedString",
            ReflectIndex:         6,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedString,
            MustBeSetToSerialize: false,
        },        {
            ID:                   8,
            WireType:             thrift.Type(thrift.LIST),
            Name:                 "adaptedList",
            ReflectIndex:         7,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_list_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   9,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "adaptedSet",
            ReflectIndex:         8,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_set_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   10,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "adaptedMap",
            ReflectIndex:         9,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_map_i64_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   11,
            WireType:             thrift.Type(thrift.BOOL),
            Name:                 "adaptedBoolDefault",
            ReflectIndex:         10,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedBool,
            MustBeSetToSerialize: false,
        },        {
            ID:                   12,
            WireType:             thrift.Type(thrift.BYTE),
            Name:                 "adaptedByteDefault",
            ReflectIndex:         11,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedByte,
            MustBeSetToSerialize: false,
        },        {
            ID:                   13,
            WireType:             thrift.Type(thrift.I16),
            Name:                 "adaptedShortDefault",
            ReflectIndex:         12,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedShort,
            MustBeSetToSerialize: false,
        },        {
            ID:                   14,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "adaptedIntegerDefault",
            ReflectIndex:         13,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedInteger,
            MustBeSetToSerialize: false,
        },        {
            ID:                   15,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "adaptedLongDefault",
            ReflectIndex:         14,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedLong,
            MustBeSetToSerialize: false,
        },        {
            ID:                   16,
            WireType:             thrift.Type(thrift.DOUBLE),
            Name:                 "adaptedDoubleDefault",
            ReflectIndex:         15,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedDouble,
            MustBeSetToSerialize: false,
        },        {
            ID:                   17,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "adaptedStringDefault",
            ReflectIndex:         16,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedString,
            MustBeSetToSerialize: false,
        },        {
            ID:                   18,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "adaptedEnum",
            ReflectIndex:         17,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedEnum,
            MustBeSetToSerialize: false,
        },        {
            ID:                   19,
            WireType:             thrift.Type(thrift.LIST),
            Name:                 "adaptedListDefault",
            ReflectIndex:         18,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_list_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   20,
            WireType:             thrift.Type(thrift.SET),
            Name:                 "adaptedSetDefault",
            ReflectIndex:         19,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_set_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   21,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "adaptedMapDefault",
            ReflectIndex:         20,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_map_i64_i64,
            MustBeSetToSerialize: false,
        },        {
            ID:                   22,
            WireType:             thrift.Type(thrift.BOOL),
            Name:                 "doubleTypedefBool",
            ReflectIndex:         21,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DoubleTypedefBool,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
        4: 3,
        5: 4,
        6: 5,
        7: 6,
        8: 7,
        9: 8,
        10: 9,
        11: 10,
        12: 11,
        13: 12,
        14: 13,
        15: 14,
        16: 15,
        17: 16,
        18: 17,
        19: 18,
        20: 19,
        21: 20,
        22: 21,
    },
}
    premadeStructSpec_AdaptTemplatedNestedTestStruct = &thrift.StructSpec{
    Name:               "AdaptTemplatedNestedTestStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "adaptedStruct",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptTemplatedTestStruct,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_AdaptTestUnion = &thrift.StructSpec{
    Name:               "AdaptTestUnion",
    IsUnion:            true,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "delay",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DurationMs,
            MustBeSetToSerialize: true,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "custom",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_CustomProtocolType,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
    },
}
    premadeStructSpec_AdaptedStruct = &thrift.StructSpec{
    Name:               "AdaptedStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "data",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_DirectlyAdaptedStruct = &thrift.StructSpec{
    Name:               "DirectlyAdaptedStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "data",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_StructFieldAdaptedStruct = &thrift.StructSpec{
    Name:               "StructFieldAdaptedStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "adaptedStruct",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedStruct,
            MustBeSetToSerialize: true,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "adaptedTypedef",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedTypedef,
            MustBeSetToSerialize: true,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "directlyAdapted",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DirectlyAdaptedStruct,
            MustBeSetToSerialize: true,
        },        {
            ID:                   4,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "typedefOfAdapted",
            ReflectIndex:         3,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_TypedefOfDirect,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
        4: 3,
    },
}
    premadeStructSpec_CircularAdaptee = &thrift.StructSpec{
    Name:               "CircularAdaptee",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_CircularStruct,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_CircularStruct = &thrift.StructSpec{
    Name:               "CircularStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_AdaptedCircularAdaptee,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_ReorderedStruct = &thrift.StructSpec{
    Name:               "ReorderedStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "reordered_dependent_adapted",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_DeclaredAfterStruct,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_DeclaredAfterStruct = &thrift.StructSpec{
    Name:               "DeclaredAfterStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_RenamedStruct = &thrift.StructSpec{
    Name:               "RenamedStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "data",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_SameNamespaceStruct = &thrift.StructSpec{
    Name:               "SameNamespaceStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "data",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_HeapAllocated = &thrift.StructSpec{
    Name:               "HeapAllocated",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_MoveOnly = &thrift.StructSpec{
    Name:               "MoveOnly",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "ptr",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_HeapAllocated,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_AlsoMoveOnly = &thrift.StructSpec{
    Name:               "AlsoMoveOnly",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "ptr",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_ApplyAdapter = &thrift.StructSpec{
    Name:               "ApplyAdapter",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_TransitiveAdapted = &thrift.StructSpec{
    Name:               "TransitiveAdapted",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_CountingStruct = &thrift.StructSpec{
    Name:               "CountingStruct",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "regularInt",
            ReflectIndex:         0,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_i64,
            MustBeSetToSerialize: true,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.I64),
            Name:                 "countingInt",
            ReflectIndex:         1,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_CountingInt,
            MustBeSetToSerialize: true,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "regularString",
            ReflectIndex:         2,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
    },
}
    premadeStructSpec_Person = &thrift.StructSpec{
    Name:               "Person",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "name",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_Person2 = &thrift.StructSpec{
    Name:               "Person2",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "name",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_RenamedStructWithStructAdapterAndFieldAdapter = &thrift.StructSpec{
    Name:               "RenamedStructWithStructAdapterAndFieldAdapter",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "field",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_i32,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_reqServiceFunc = &thrift.StructSpec{
    Name:               "reqServiceFunc",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "arg1",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_StringWithAdapter_7208,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "arg2",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },        {
            ID:                   3,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "arg3",
            ReflectIndex:         2,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_Foo,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
        3: 2,
    },
}
    premadeStructSpec_respServiceFunc = &thrift.StructSpec{
    Name:               "respServiceFunc",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   0,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "success",
            ReflectIndex:         0,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_MyI32_4873,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        0: 0,
    },
}
    premadeStructSpec_reqAdapterServiceCount = &thrift.StructSpec{
    Name:               "reqAdapterServiceCount",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_respAdapterServiceCount = &thrift.StructSpec{
    Name:               "respAdapterServiceCount",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   0,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "success",
            ReflectIndex:         0,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_CountingStruct,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        0: 0,
    },
}
    premadeStructSpec_reqAdapterServiceAdaptedTypes = &thrift.StructSpec{
    Name:               "reqAdapterServiceAdaptedTypes",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "arg",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_module_HeapAllocated,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_respAdapterServiceAdaptedTypes = &thrift.StructSpec{
    Name:               "respAdapterServiceAdaptedTypes",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   0,
            WireType:             thrift.Type(thrift.STRUCT),
            Name:                 "success",
            ReflectIndex:         0,
            IsOptional:           true,
            ValueTypeSpec:        premadeCodecTypeSpec_module_HeapAllocated,
            MustBeSetToSerialize: true,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        0: 0,
    },
}
})

// Helper type to allow us to store codec specs in a slice at compile time,
// and put them in a map at runtime. See comment at the top of template
// about a compilation limitation that affects map literals.
type codecSpecWithFullName struct {
    fullName string
    typeSpec *thrift.TypeSpec
}

var premadeCodecSpecsMapOnce = sync.OnceValue(
    func() map[string]*thrift.TypeSpec {
        // Relies on premade codec specs initialization
        premadeCodecSpecsInitOnce()

        codecSpecsWithFullName := make([]codecSpecWithFullName, 0)
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Color", premadeCodecTypeSpec_module_Color })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.ThriftAdaptedEnum", premadeCodecTypeSpec_module_ThriftAdaptedEnum })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "string", premadeCodecTypeSpec_string })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.MyAnnotation", premadeCodecTypeSpec_module_MyAnnotation })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "i32", premadeCodecTypeSpec_i32 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.i32_5137", premadeCodecTypeSpec_module_i32_5137 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.SetWithAdapter", premadeCodecTypeSpec_module_SetWithAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.StringWithAdapter", premadeCodecTypeSpec_module_StringWithAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.ListWithElemAdapter", premadeCodecTypeSpec_module_ListWithElemAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.ListWithElemAdapter_withAdapter", premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.ListWithElemAdapter_withAdapter_2312", premadeCodecTypeSpec_module_ListWithElemAdapter_withAdapter_2312 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.map_string_ListWithElemAdapter_withAdapter_8454", premadeCodecTypeSpec_module_map_string_ListWithElemAdapter_withAdapter_8454 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "binary", premadeCodecTypeSpec_binary })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.binary_5673", premadeCodecTypeSpec_module_binary_5673 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "i64", premadeCodecTypeSpec_i64 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.MyI64", premadeCodecTypeSpec_module_MyI64 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.DoubleTypedefI64", premadeCodecTypeSpec_module_DoubleTypedefI64 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Foo", premadeCodecTypeSpec_module_Foo })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Baz", premadeCodecTypeSpec_module_Baz })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Foo_6868", premadeCodecTypeSpec_module_Foo_6868 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Foo_3943", premadeCodecTypeSpec_module_Foo_3943 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.FooWithAdapter", premadeCodecTypeSpec_module_FooWithAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.FooWithAdapter_9317", premadeCodecTypeSpec_module_FooWithAdapter_9317 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Baz_7352", premadeCodecTypeSpec_module_Baz_7352 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.DirectlyAdapted", premadeCodecTypeSpec_module_DirectlyAdapted })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Bar", premadeCodecTypeSpec_module_Bar })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.IndependentDirectlyAdapted", premadeCodecTypeSpec_module_IndependentDirectlyAdapted })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.StructWithFieldAdapter", premadeCodecTypeSpec_module_StructWithFieldAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.TerseAdaptedFields", premadeCodecTypeSpec_module_TerseAdaptedFields })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.A", premadeCodecTypeSpec_module_A })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedA", premadeCodecTypeSpec_module_AdaptedA })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.B", premadeCodecTypeSpec_module_B })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Config", premadeCodecTypeSpec_module_Config })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.MyStruct", premadeCodecTypeSpec_module_MyStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.DurationMs", premadeCodecTypeSpec_module_DurationMs })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.IOBuf", premadeCodecTypeSpec_module_IOBuf })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.CustomProtocolType", premadeCodecTypeSpec_module_CustomProtocolType })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.IndirectionString", premadeCodecTypeSpec_module_IndirectionString })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "bool", premadeCodecTypeSpec_bool })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedBool", premadeCodecTypeSpec_module_AdaptedBool })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedInteger", premadeCodecTypeSpec_module_AdaptedInteger })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptTestStruct", premadeCodecTypeSpec_module_AdaptTestStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "byte", premadeCodecTypeSpec_byte })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedByte", premadeCodecTypeSpec_module_AdaptedByte })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "i16", premadeCodecTypeSpec_i16 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedShort", premadeCodecTypeSpec_module_AdaptedShort })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedLong", premadeCodecTypeSpec_module_AdaptedLong })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "double", premadeCodecTypeSpec_double })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedDouble", premadeCodecTypeSpec_module_AdaptedDouble })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedString", premadeCodecTypeSpec_module_AdaptedString })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedEnum", premadeCodecTypeSpec_module_AdaptedEnum })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.DoubleTypedefBool", premadeCodecTypeSpec_module_DoubleTypedefBool })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptTemplatedTestStruct", premadeCodecTypeSpec_module_AdaptTemplatedTestStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptTemplatedNestedTestStruct", premadeCodecTypeSpec_module_AdaptTemplatedNestedTestStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptTestUnion", premadeCodecTypeSpec_module_AdaptTestUnion })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedStruct", premadeCodecTypeSpec_module_AdaptedStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.DirectlyAdaptedStruct", premadeCodecTypeSpec_module_DirectlyAdaptedStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedTypedef", premadeCodecTypeSpec_module_AdaptedTypedef })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.TypedefOfDirect", premadeCodecTypeSpec_module_TypedefOfDirect })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.StructFieldAdaptedStruct", premadeCodecTypeSpec_module_StructFieldAdaptedStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.CircularStruct", premadeCodecTypeSpec_module_CircularStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.CircularAdaptee", premadeCodecTypeSpec_module_CircularAdaptee })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AdaptedCircularAdaptee", premadeCodecTypeSpec_module_AdaptedCircularAdaptee })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.DeclaredAfterStruct", premadeCodecTypeSpec_module_DeclaredAfterStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.ReorderedStruct", premadeCodecTypeSpec_module_ReorderedStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.RenamedStruct", premadeCodecTypeSpec_module_RenamedStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.SameNamespaceStruct", premadeCodecTypeSpec_module_SameNamespaceStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.HeapAllocated", premadeCodecTypeSpec_module_HeapAllocated })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.MoveOnly", premadeCodecTypeSpec_module_MoveOnly })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.AlsoMoveOnly", premadeCodecTypeSpec_module_AlsoMoveOnly })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.ApplyAdapter", premadeCodecTypeSpec_module_ApplyAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.TransitiveAdapted", premadeCodecTypeSpec_module_TransitiveAdapted })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.CountingInt", premadeCodecTypeSpec_module_CountingInt })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.CountingStruct", premadeCodecTypeSpec_module_CountingStruct })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Person", premadeCodecTypeSpec_module_Person })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.Person2", premadeCodecTypeSpec_module_Person2 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.RenamedStructWithStructAdapterAndFieldAdapter", premadeCodecTypeSpec_module_RenamedStructWithStructAdapterAndFieldAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.MyI32", premadeCodecTypeSpec_module_MyI32 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.StructWithAdapter", premadeCodecTypeSpec_module_StructWithAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.UnionWithAdapter", premadeCodecTypeSpec_module_UnionWithAdapter })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.MyI32_4873", premadeCodecTypeSpec_module_MyI32_4873 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "module.StringWithAdapter_7208", premadeCodecTypeSpec_module_StringWithAdapter_7208 })

        fbthriftTypeSpecsMap := make(map[string]*thrift.TypeSpec, len(codecSpecsWithFullName))
        for _, value := range codecSpecsWithFullName {
            fbthriftTypeSpecsMap[value.fullName] = value.typeSpec
        }
        return fbthriftTypeSpecsMap
    },
)

func init() {
    premadeCodecSpecsInitOnce()
    premadeStructSpecsInitOnce()
}

// GetMetadataThriftType (INTERNAL USE ONLY).
// Returns metadata TypeSpec for a given full type name.
func GetCodecTypeSpec(fullName string) *thrift.TypeSpec {
    return premadeCodecSpecsMapOnce()[fullName]
}
