#
# Autogenerated by Thrift
#
# DO NOT EDIT
#  @generated
#

from __future__ import annotations

import folly.iobuf as _fbthrift_iobuf
import thrift.python.types as _fbthrift_python_types
import thrift.python.exceptions as _fbthrift_python_exceptions


import apache.thrift.fixtures.types.included.thrift_types


class empty_struct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.empty_struct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/empty_struct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_empty_struct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.empty_struct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.empty_struct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.empty_struct, self)


class decorated_struct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_string,  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            8, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.decorated_struct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/decorated_struct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_decorated_struct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.decorated_struct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.decorated_struct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.decorated_struct, self)


class ContainerStruct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldB",  # name
            "fieldB",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            3,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldC",  # name
            "fieldC",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            4,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldD",  # name
            "fieldD",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            5,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldE",  # name
            "fieldE",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            6,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldF",  # name
            "fieldF",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            15, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            7,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldG",  # name
            "fieldG",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            8,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldH",  # name
            "fieldH",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            12,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldA",  # name
            "fieldA",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.ContainerStruct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/ContainerStruct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_ContainerStruct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.ContainerStruct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.ContainerStruct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.ContainerStruct, self)


class CppTypeStruct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "fieldA",  # name
            "fieldA",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.CppTypeStruct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/CppTypeStruct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_CppTypeStruct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.CppTypeStruct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.CppTypeStruct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.CppTypeStruct, self)


class VirtualStruct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "MyIntField",  # name
            "MyIntField",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i64,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            5, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.VirtualStruct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/VirtualStruct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_VirtualStruct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.VirtualStruct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.VirtualStruct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.VirtualStruct, self)


class MyStructWithForwardRefEnum(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "a",  # name
            "a",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.EnumTypeInfo(MyForwardRefEnum),  # typeinfo
            lambda: MyForwardRefEnum.NONZERO,  # default value
            None,  # adapter info
            False, # field type is primitive
            10, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "b",  # name
            "b",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.EnumTypeInfo(MyForwardRefEnum),  # typeinfo
            lambda: MyForwardRefEnum.NONZERO,  # default value
            None,  # adapter info
            False, # field type is primitive
            10, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.MyStructWithForwardRefEnum"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/MyStructWithForwardRefEnum"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_MyStructWithForwardRefEnum()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.MyStructWithForwardRefEnum, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructWithForwardRefEnum, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.MyStructWithForwardRefEnum, self)


class TrivialNumeric(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "a",  # name
            "a",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "b",  # name
            "b",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_bool,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            1, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.TrivialNumeric"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/TrivialNumeric"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_TrivialNumeric()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.TrivialNumeric, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.TrivialNumeric, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.TrivialNumeric, self)


class TrivialNestedWithDefault(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "z",  # name
            "z",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            4,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "n",  # name
            "n",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(TrivialNumeric),  # typeinfo
            lambda: TrivialNumeric(a=3, b=True),  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.TrivialNestedWithDefault"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/TrivialNestedWithDefault"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_TrivialNestedWithDefault()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.TrivialNestedWithDefault, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.TrivialNestedWithDefault, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.TrivialNestedWithDefault, self)


class ComplexString(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "a",  # name
            "a",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_string,  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            8, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "b",  # name
            "b",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.ComplexString"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/ComplexString"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_ComplexString()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.ComplexString, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.ComplexString, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.ComplexString, self)


class ComplexNestedWithDefault(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "z",  # name
            "z",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_string,  # typeinfo
            "4",  # default value
            None,  # adapter info
            False, # field type is primitive
            8, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "n",  # name
            "n",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(ComplexString),  # typeinfo
            lambda: ComplexString(a="3", b=_fbthrift_python_types.Map(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_i32, { "a": 3})),  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.ComplexNestedWithDefault"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/ComplexNestedWithDefault"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_ComplexNestedWithDefault()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.ComplexNestedWithDefault, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.ComplexNestedWithDefault, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.ComplexNestedWithDefault, self)


class MinPadding(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "small",  # name
            "small",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_byte,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            2, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "big",  # name
            "big",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i64,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            5, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            3,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "medium",  # name
            "medium",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i16,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            3, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            4,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "biggish",  # name
            "biggish",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            5,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "tiny",  # name
            "tiny",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_byte,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            2, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.MinPadding"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/MinPadding"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_MinPadding()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.MinPadding, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.MinPadding, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.MinPadding, self)


class MinPaddingWithCustomType(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Terse, # qualifier
            "small",  # name
            "small",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_byte,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            2, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Terse, # qualifier
            "big",  # name
            "big",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i64,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            5, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            3,  # id
            _fbthrift_python_types.FieldQualifier.Terse, # qualifier
            "medium",  # name
            "medium",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i16,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            3, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            4,  # id
            _fbthrift_python_types.FieldQualifier.Terse, # qualifier
            "biggish",  # name
            "biggish",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            5,  # id
            _fbthrift_python_types.FieldQualifier.Terse, # qualifier
            "tiny",  # name
            "tiny",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_byte,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            2, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.MinPaddingWithCustomType"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/MinPaddingWithCustomType"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_MinPaddingWithCustomType()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.MinPaddingWithCustomType, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.MinPaddingWithCustomType, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.MinPaddingWithCustomType, self)


class MyStruct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "MyIntField",  # name
            "MyIntField",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i64,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            5, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "MyStringField",  # name
            "MyStringField",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_string,  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            8, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            3,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "majorVer",  # name
            "majorVer",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i64,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            5, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            4,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "data",  # name
            "data",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(MyDataItem),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.MyStruct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/MyStruct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_MyStruct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.MyStruct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.MyStruct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.MyStruct, self)


class MyDataItem(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.MyDataItem"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/MyDataItem"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_MyDataItem()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.MyDataItem, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.MyDataItem, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.MyDataItem, self)


class Renaming(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "foo",  # name
            "foo",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i64,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            5, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.Renaming"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/Renaming"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_Renaming()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.Renaming, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.Renaming, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.Renaming, self)


class AnnotatedTypes(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "binary_field",  # name
            "binary_field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_binary,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            9, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "list_field",  # name
            "list_field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.AnnotatedTypes"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/AnnotatedTypes"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_AnnotatedTypes()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.AnnotatedTypes, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.AnnotatedTypes, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.AnnotatedTypes, self)


class ForwardUsageRoot(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "ForwardUsageStruct",  # name
            "ForwardUsageStruct",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(ForwardUsageStruct),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "ForwardUsageByRef",  # name
            "ForwardUsageByRef",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(ForwardUsageByRef),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.ForwardUsageRoot"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/ForwardUsageRoot"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_ForwardUsageRoot()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.ForwardUsageRoot, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.ForwardUsageRoot, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.ForwardUsageRoot, self)


class ForwardUsageStruct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "foo",  # name
            "foo",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(ForwardUsageRoot),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.ForwardUsageStruct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/ForwardUsageStruct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_ForwardUsageStruct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.ForwardUsageStruct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.ForwardUsageStruct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.ForwardUsageStruct, self)


class ForwardUsageByRef(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "foo",  # name
            "foo",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(ForwardUsageRoot),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.ForwardUsageByRef"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/ForwardUsageByRef"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_ForwardUsageByRef()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.ForwardUsageByRef, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.ForwardUsageByRef, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.ForwardUsageByRef, self)


class IncompleteMap(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.StructTypeInfo(IncompleteMapDep)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.IncompleteMap"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/IncompleteMap"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_IncompleteMap()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.IncompleteMap, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.IncompleteMap, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.IncompleteMap, self)


class IncompleteMapDep(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.IncompleteMapDep"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/IncompleteMapDep"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_IncompleteMapDep()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.IncompleteMapDep, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.IncompleteMapDep, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.IncompleteMapDep, self)


class CompleteMap(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.StructTypeInfo(CompleteMapDep)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.CompleteMap"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/CompleteMap"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_CompleteMap()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.CompleteMap, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.CompleteMap, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.CompleteMap, self)


class CompleteMapDep(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.CompleteMapDep"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/CompleteMapDep"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_CompleteMapDep()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.CompleteMapDep, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.CompleteMapDep, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.CompleteMapDep, self)


class IncompleteList(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.StructTypeInfo(IncompleteListDep)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.IncompleteList"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/IncompleteList"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_IncompleteList()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.IncompleteList, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.IncompleteList, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.IncompleteList, self)


class IncompleteListDep(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.IncompleteListDep"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/IncompleteListDep"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_IncompleteListDep()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.IncompleteListDep, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.IncompleteListDep, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.IncompleteListDep, self)


class CompleteList(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.StructTypeInfo(CompleteListDep)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.CompleteList"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/CompleteList"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_CompleteList()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.CompleteList, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.CompleteList, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.CompleteList, self)


class CompleteListDep(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.CompleteListDep"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/CompleteListDep"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_CompleteListDep()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.CompleteListDep, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.CompleteListDep, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.CompleteListDep, self)


class AdaptedList(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.StructTypeInfo(AdaptedListDep)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.AdaptedList"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/AdaptedList"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_AdaptedList()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.AdaptedList, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.AdaptedList, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.AdaptedList, self)


class AdaptedListDep(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.StructTypeInfo(AdaptedList),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            11, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.AdaptedListDep"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/AdaptedListDep"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_AdaptedListDep()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.AdaptedListDep, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.AdaptedListDep, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.AdaptedListDep, self)


class DependentAdaptedList(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.StructTypeInfo(DependentAdaptedListDep)),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.DependentAdaptedList"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/DependentAdaptedList"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_DependentAdaptedList()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.DependentAdaptedList, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.DependentAdaptedList, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.DependentAdaptedList, self)


class DependentAdaptedListDep(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "field",  # name
            "field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i16,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            3, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.DependentAdaptedListDep"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/DependentAdaptedListDep"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_DependentAdaptedListDep()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.DependentAdaptedListDep, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.DependentAdaptedListDep, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.DependentAdaptedListDep, self)


class AllocatorAware(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "aa_list",  # name
            "aa_list",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "aa_set",  # name
            "aa_set",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            15, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            3,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "aa_map",  # name
            "aa_map",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_i32),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            4,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "aa_string",  # name
            "aa_string",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_string,  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            8, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            5,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "not_a_container",  # name
            "not_a_container",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            6,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "aa_unique",  # name
            "aa_unique",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            7,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "aa_shared",  # name
            "aa_shared",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.AllocatorAware"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/AllocatorAware"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_AllocatorAware()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.AllocatorAware, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.AllocatorAware, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.AllocatorAware, self)


class AllocatorAware2(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "not_a_container",  # name
            "not_a_container",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "box_field",  # name
            "box_field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.AllocatorAware2"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/AllocatorAware2"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_AllocatorAware2()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.AllocatorAware2, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.AllocatorAware2, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.AllocatorAware2, self)


class TypedefStruct(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "i32_field",  # name
            "i32_field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            2,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "IntTypedef_field",  # name
            "IntTypedef_field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
        _fbthrift_python_types.FieldInfo(
            3,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "UintTypedef_field",  # name
            "UintTypedef_field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.TypedefStruct"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/TypedefStruct"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_TypedefStruct()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.TypedefStruct, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.TypedefStruct, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.TypedefStruct, self)


class StructWithDoubleUnderscores(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "__field",  # name
            "_StructWithDoubleUnderscores__field",  # python name (from @python.Name annotation)
            _fbthrift_python_types.typeinfo_i32,  # typeinfo
            None,  # default value
            None,  # adapter info
            True, # field type is primitive
            4, # IDL type (see BaseTypeEnum)
        ),
    )

    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.StructWithDoubleUnderscores"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/StructWithDoubleUnderscores"

    @staticmethod
    def __get_metadata__():
        return _fbthrift_metadata__struct_StructWithDoubleUnderscores()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        import thrift.py3.converter
        return thrift.py3.converter.to_py3_struct(py3_types.StructWithDoubleUnderscores, self)

    def _to_py_deprecated(self):
        import importlib
        import thrift.util.converter
        try:
            py_deprecated_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_deprecated_types.StructWithDoubleUnderscores, self)
        except ModuleNotFoundError:
            py_asyncio_types = importlib.import_module("module.ttypes")
            return thrift.util.converter.to_py_struct(py_asyncio_types.StructWithDoubleUnderscores, self)

# This unfortunately has to be down here to prevent circular imports
import apache.thrift.fixtures.types.module.thrift_metadata


class has_bitwise_ops(_fbthrift_python_types.Enum, int):
    none = 0
    zero = 1
    one = 2
    two = 4
    three = 8
    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.has_bitwise_ops"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/has_bitwise_ops"

    @staticmethod
    def __get_metadata__():
        return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_enum_has_bitwise_ops()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        return py3_types.has_bitwise_ops(self.value)

    def _to_py_deprecated(self):
        return self.value


class is_unscoped(_fbthrift_python_types.Enum, int):
    hello = 0
    world = 1
    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.is_unscoped"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/is_unscoped"

    @staticmethod
    def __get_metadata__():
        return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_enum_is_unscoped()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        return py3_types.is_unscoped(self.value)

    def _to_py_deprecated(self):
        return self.value


class MyForwardRefEnum(_fbthrift_python_types.Enum, int):
    ZERO = 0
    NONZERO = 12
    @staticmethod
    def __get_thrift_name__() -> str:
        return "module.MyForwardRefEnum"

    @staticmethod
    def __get_thrift_uri__():
        return "apache.org/thrift/fixtures/types/MyForwardRefEnum"

    @staticmethod
    def __get_metadata__():
        return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_enum_MyForwardRefEnum()

    def _to_python(self):
        return self

    def _to_py3(self):
        import importlib
        py3_types = importlib.import_module("apache.thrift.fixtures.types.module.types")
        return py3_types.MyForwardRefEnum(self.value)

    def _to_py_deprecated(self):
        return self.value


_fbthrift_all_enums = [
    has_bitwise_ops,
    is_unscoped,
    MyForwardRefEnum,
]

def _fbthrift_metadata__struct_empty_struct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_empty_struct()


def _fbthrift_metadata__struct_decorated_struct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_decorated_struct()


def _fbthrift_metadata__struct_ContainerStruct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_ContainerStruct()


def _fbthrift_metadata__struct_CppTypeStruct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_CppTypeStruct()


def _fbthrift_metadata__struct_VirtualStruct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_VirtualStruct()


def _fbthrift_metadata__struct_MyStructWithForwardRefEnum():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_MyStructWithForwardRefEnum()


def _fbthrift_metadata__struct_TrivialNumeric():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_TrivialNumeric()


def _fbthrift_metadata__struct_TrivialNestedWithDefault():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_TrivialNestedWithDefault()


def _fbthrift_metadata__struct_ComplexString():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_ComplexString()


def _fbthrift_metadata__struct_ComplexNestedWithDefault():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_ComplexNestedWithDefault()


def _fbthrift_metadata__struct_MinPadding():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_MinPadding()


def _fbthrift_metadata__struct_MinPaddingWithCustomType():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_MinPaddingWithCustomType()


def _fbthrift_metadata__struct_MyStruct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_MyStruct()


def _fbthrift_metadata__struct_MyDataItem():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_MyDataItem()


def _fbthrift_metadata__struct_Renaming():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_Renaming()


def _fbthrift_metadata__struct_AnnotatedTypes():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_AnnotatedTypes()


def _fbthrift_metadata__struct_ForwardUsageRoot():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_ForwardUsageRoot()


def _fbthrift_metadata__struct_ForwardUsageStruct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_ForwardUsageStruct()


def _fbthrift_metadata__struct_ForwardUsageByRef():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_ForwardUsageByRef()


def _fbthrift_metadata__struct_IncompleteMap():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_IncompleteMap()


def _fbthrift_metadata__struct_IncompleteMapDep():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_IncompleteMapDep()


def _fbthrift_metadata__struct_CompleteMap():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_CompleteMap()


def _fbthrift_metadata__struct_CompleteMapDep():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_CompleteMapDep()


def _fbthrift_metadata__struct_IncompleteList():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_IncompleteList()


def _fbthrift_metadata__struct_IncompleteListDep():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_IncompleteListDep()


def _fbthrift_metadata__struct_CompleteList():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_CompleteList()


def _fbthrift_metadata__struct_CompleteListDep():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_CompleteListDep()


def _fbthrift_metadata__struct_AdaptedList():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_AdaptedList()


def _fbthrift_metadata__struct_AdaptedListDep():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_AdaptedListDep()


def _fbthrift_metadata__struct_DependentAdaptedList():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_DependentAdaptedList()


def _fbthrift_metadata__struct_DependentAdaptedListDep():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_DependentAdaptedListDep()


def _fbthrift_metadata__struct_AllocatorAware():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_AllocatorAware()


def _fbthrift_metadata__struct_AllocatorAware2():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_AllocatorAware2()


def _fbthrift_metadata__struct_TypedefStruct():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_TypedefStruct()


def _fbthrift_metadata__struct_StructWithDoubleUnderscores():
    return apache.thrift.fixtures.types.module.thrift_metadata.gen_metadata_struct_StructWithDoubleUnderscores()


_fbthrift_all_structs = [
    empty_struct,
    decorated_struct,
    ContainerStruct,
    CppTypeStruct,
    VirtualStruct,
    MyStructWithForwardRefEnum,
    TrivialNumeric,
    TrivialNestedWithDefault,
    ComplexString,
    ComplexNestedWithDefault,
    MinPadding,
    MinPaddingWithCustomType,
    MyStruct,
    MyDataItem,
    Renaming,
    AnnotatedTypes,
    ForwardUsageRoot,
    ForwardUsageStruct,
    ForwardUsageByRef,
    IncompleteMap,
    IncompleteMapDep,
    CompleteMap,
    CompleteMapDep,
    IncompleteList,
    IncompleteListDep,
    CompleteList,
    CompleteListDep,
    AdaptedList,
    AdaptedListDep,
    DependentAdaptedList,
    DependentAdaptedListDep,
    AllocatorAware,
    AllocatorAware2,
    TypedefStruct,
    StructWithDoubleUnderscores,
]
_fbthrift_python_types.fill_specs(*_fbthrift_all_structs)

TBinary = bytes
IntTypedef = int
UintTypedef = int
SomeListOfTypeMap_2468 = _fbthrift_python_types.ListTypeFactory(_fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string))
TBinary_8623 = bytes
i32_9314 = int
list_i32_9187 = _fbthrift_python_types.ListTypeFactory(_fbthrift_python_types.typeinfo_i32)
map_i32_i32_9565 = _fbthrift_python_types.MapTypeFactory(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_i32)
map_i32_string_1261 = _fbthrift_python_types.MapTypeFactory(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string)
set_i32_7070 = _fbthrift_python_types.SetTypeFactory(_fbthrift_python_types.typeinfo_i32)
set_i32_7194 = _fbthrift_python_types.SetTypeFactory(_fbthrift_python_types.typeinfo_i32)
string_5252 = str



class _fbthrift_SomeService_bounce_map_args(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "m",  # name
            "m",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            16, # IDL type (see BaseTypeEnum)
        ),
    )


class _fbthrift_SomeService_bounce_map_result(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            0,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "success",  # name
            "success", # name
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.typeinfo_string),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
        ),
    )


class _fbthrift_SomeService_binary_keyed_map_args(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            1,  # id
            _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier
            "r",  # name
            "r",  # python name (from @python.Name annotation)
            lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i64),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
            14, # IDL type (see BaseTypeEnum)
        ),
    )


class _fbthrift_SomeService_binary_keyed_map_result(metaclass=_fbthrift_python_types.StructMeta):
    _fbthrift_SPEC = (
        _fbthrift_python_types.FieldInfo(
            0,  # id
            _fbthrift_python_types.FieldQualifier.Optional, # qualifier
            "success",  # name
            "success", # name
            lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_binary, _fbthrift_python_types.typeinfo_i64),  # typeinfo
            None,  # default value
            None,  # adapter info
            False, # field type is primitive
        ),
    )



_fbthrift_python_types.fill_specs(
    _fbthrift_SomeService_bounce_map_args,
    _fbthrift_SomeService_bounce_map_result,
    _fbthrift_SomeService_binary_keyed_map_args,
    _fbthrift_SomeService_binary_keyed_map_result,
)
