// Autogenerated by Thrift for thrift/annotation/thrift.thrift
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//  @generated

package thrift


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_thrift_RpcPriority *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_Experimental *thrift.TypeSpec = nil
    premadeCodecTypeSpec_i32 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_list_i32 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_map_i32_i32 *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_ReserveIds *thrift.TypeSpec = nil
    premadeCodecTypeSpec_bool *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_RequiresBackwardCompatibility *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_TerseWrite *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_Box *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_Mixin *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_SerializeInFieldIdOrder *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_BitmaskEnum *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_ExceptionMessage *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_InternBox *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_Serial *thrift.TypeSpec = nil
    premadeCodecTypeSpec_string *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_Uri *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_Priority *thrift.TypeSpec = nil
    premadeCodecTypeSpec_map_string_string *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_DeprecatedUnvalidatedAnnotations *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_AllowReservedIdentifier *thrift.TypeSpec = nil
    premadeCodecTypeSpec_thrift_AllowReservedFilename *thrift.TypeSpec = nil
)

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

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

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

    }
    premadeCodecTypeSpec_list_i32 = &thrift.TypeSpec{
        CodecListSpec: &thrift.CodecListSpec{
    ElementWireType: thrift.I32,
	ElementTypeSpec: premadeCodecTypeSpec_i32,
},

    }
    premadeCodecTypeSpec_map_i32_i32 = &thrift.TypeSpec{
        CodecMapSpec: &thrift.CodecMapSpec{
	KeyTypeSpec:   premadeCodecTypeSpec_i32,
	ValueTypeSpec: premadeCodecTypeSpec_i32,
    KeyWireType:   thrift.I32,
	ValueWireType: thrift.I32,
},

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    }
})

// Premade struct specs
var (
    premadeStructSpec_Experimental *thrift.StructSpec = nil
    premadeStructSpec_ReserveIds *thrift.StructSpec = nil
    premadeStructSpec_RequiresBackwardCompatibility *thrift.StructSpec = nil
    premadeStructSpec_TerseWrite *thrift.StructSpec = nil
    premadeStructSpec_Box *thrift.StructSpec = nil
    premadeStructSpec_Mixin *thrift.StructSpec = nil
    premadeStructSpec_SerializeInFieldIdOrder *thrift.StructSpec = nil
    premadeStructSpec_BitmaskEnum *thrift.StructSpec = nil
    premadeStructSpec_ExceptionMessage *thrift.StructSpec = nil
    premadeStructSpec_InternBox *thrift.StructSpec = nil
    premadeStructSpec_Serial *thrift.StructSpec = nil
    premadeStructSpec_Uri *thrift.StructSpec = nil
    premadeStructSpec_Priority *thrift.StructSpec = nil
    premadeStructSpec_DeprecatedUnvalidatedAnnotations *thrift.StructSpec = nil
    premadeStructSpec_AllowReservedIdentifier *thrift.StructSpec = nil
    premadeStructSpec_AllowReservedFilename *thrift.StructSpec = nil
)

// Premade struct specs initializer
var premadeStructSpecsInitOnce = sync.OnceFunc(func() {
    premadeStructSpec_Experimental = &thrift.StructSpec{
    Name:               "Experimental",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_ReserveIds = &thrift.StructSpec{
    Name:               "ReserveIds",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.LIST),
            Name:                 "ids",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_list_i32,
            MustBeSetToSerialize: false,
        },        {
            ID:                   2,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "id_ranges",
            ReflectIndex:         1,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_map_i32_i32,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
        2: 1,
    },
}
    premadeStructSpec_RequiresBackwardCompatibility = &thrift.StructSpec{
    Name:               "RequiresBackwardCompatibility",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.BOOL),
            Name:                 "field_name",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_bool,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_TerseWrite = &thrift.StructSpec{
    Name:               "TerseWrite",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_Box = &thrift.StructSpec{
    Name:               "Box",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_Mixin = &thrift.StructSpec{
    Name:               "Mixin",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_SerializeInFieldIdOrder = &thrift.StructSpec{
    Name:               "SerializeInFieldIdOrder",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_BitmaskEnum = &thrift.StructSpec{
    Name:               "BitmaskEnum",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_ExceptionMessage = &thrift.StructSpec{
    Name:               "ExceptionMessage",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_InternBox = &thrift.StructSpec{
    Name:               "InternBox",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_Serial = &thrift.StructSpec{
    Name:               "Serial",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_Uri = &thrift.StructSpec{
    Name:               "Uri",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.STRING),
            Name:                 "value",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_string,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_Priority = &thrift.StructSpec{
    Name:               "Priority",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.I32),
            Name:                 "level",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_thrift_RpcPriority,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_DeprecatedUnvalidatedAnnotations = &thrift.StructSpec{
    Name:               "DeprecatedUnvalidatedAnnotations",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
        {
            ID:                   1,
            WireType:             thrift.Type(thrift.MAP),
            Name:                 "items",
            ReflectIndex:         0,
            IsOptional:           false,
            ValueTypeSpec:        premadeCodecTypeSpec_map_string_string,
            MustBeSetToSerialize: false,
        },    },
    FieldSpecIDToIndex: map[int16]int{
        1: 0,
    },
}
    premadeStructSpec_AllowReservedIdentifier = &thrift.StructSpec{
    Name:               "AllowReservedIdentifier",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
    premadeStructSpec_AllowReservedFilename = &thrift.StructSpec{
    Name:               "AllowReservedFilename",
    IsUnion:            false,
    IsException:        false,
    FieldSpecs:         []thrift.FieldSpec{
    },
    FieldSpecIDToIndex: map[int16]int{
    },
}
})

// 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{ "thrift.RpcPriority", premadeCodecTypeSpec_thrift_RpcPriority })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.Experimental", premadeCodecTypeSpec_thrift_Experimental })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "i32", premadeCodecTypeSpec_i32 })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.ReserveIds", premadeCodecTypeSpec_thrift_ReserveIds })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "bool", premadeCodecTypeSpec_bool })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.RequiresBackwardCompatibility", premadeCodecTypeSpec_thrift_RequiresBackwardCompatibility })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.TerseWrite", premadeCodecTypeSpec_thrift_TerseWrite })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.Box", premadeCodecTypeSpec_thrift_Box })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.Mixin", premadeCodecTypeSpec_thrift_Mixin })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.SerializeInFieldIdOrder", premadeCodecTypeSpec_thrift_SerializeInFieldIdOrder })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.BitmaskEnum", premadeCodecTypeSpec_thrift_BitmaskEnum })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.ExceptionMessage", premadeCodecTypeSpec_thrift_ExceptionMessage })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.InternBox", premadeCodecTypeSpec_thrift_InternBox })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.Serial", premadeCodecTypeSpec_thrift_Serial })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "string", premadeCodecTypeSpec_string })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.Uri", premadeCodecTypeSpec_thrift_Uri })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.Priority", premadeCodecTypeSpec_thrift_Priority })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.DeprecatedUnvalidatedAnnotations", premadeCodecTypeSpec_thrift_DeprecatedUnvalidatedAnnotations })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.AllowReservedIdentifier", premadeCodecTypeSpec_thrift_AllowReservedIdentifier })
        codecSpecsWithFullName = append(codecSpecsWithFullName, codecSpecWithFullName{ "thrift.AllowReservedFilename", premadeCodecTypeSpec_thrift_AllowReservedFilename })

        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]
}
