#
# Autogenerated by Thrift for thrift/compiler/test/fixtures/types/src/module.thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#  @generated
#
cimport cython as __cython
from cpython.object cimport PyTypeObject
from libcpp.memory cimport shared_ptr, make_shared, unique_ptr
from libcpp.optional cimport optional as __optional
from libcpp.string cimport string
from libcpp cimport bool as cbool
from libcpp.iterator cimport inserter as cinserter
from libcpp.utility cimport move as cmove
from cpython cimport bool as pbool
from cython.operator cimport dereference as deref, preincrement as inc, address as ptr_address
import thrift.py3.types
from thrift.py3.types import _IsSet as _fbthrift_IsSet
from thrift.py3.types cimport make_unique
cimport thrift.py3.types
cimport thrift.py3.exceptions
cimport thrift.python.exceptions
from thrift.python.types import EnumMeta as __EnumMeta
from thrift.python.std_libcpp cimport sv_to_str as __sv_to_str, string_view as __cstring_view
from thrift.python.types cimport(
    BadEnum as __BadEnum,
)
from thrift.py3.types cimport (
    cSetOp as __cSetOp,
    richcmp as __richcmp,
    set_op as __set_op,
    setcmp as __setcmp,
    init_unicode_from_cpp as __init_unicode_from_cpp,
    set_iter as __set_iter,
    map_iter as __map_iter,
    map_contains as __map_contains,
    map_getitem as __map_getitem,
    reference_shared_ptr as __reference_shared_ptr,
    get_field_name_by_index as __get_field_name_by_index,
    reset_field as __reset_field,
    translate_cpp_enum_to_python,
    const_pointer_cast,
    make_const_shared,
    constant_shared_ptr,
)
cimport thrift.py3.serializer as serializer
from thrift.python.protocol cimport Protocol as __Protocol
import folly.iobuf as _fbthrift_iobuf
from folly.optional cimport cOptional
from folly.memory cimport to_shared_ptr as __to_shared_ptr
from folly.range cimport Range as __cRange

import sys
from collections.abc import Sequence, Set, Mapping, Iterable
import weakref as __weakref
import builtins as _builtins
import importlib
cimport apache.thrift.fixtures.types.included.types as _apache_thrift_fixtures_types_included_types
import apache.thrift.fixtures.types.included.types as _apache_thrift_fixtures_types_included_types

from apache.thrift.fixtures.types.module.types_impl_FBTHRIFT_ONLY_DO_NOT_USE import (
    has_bitwise_ops,
    is_unscoped,
    MyForwardRefEnum,
)

from apache.thrift.fixtures.types.module.containers_FBTHRIFT_ONLY_DO_NOT_USE import (
    List__i64,
    List__i32,
    std_list__List__i32,
    std_deque__List__i32,
    folly_fbvector__List__i32,
    folly_small_vector__List__i32,
    std_list_int32_t__List__i32,
    List__std_unordered_map__Map__i32_string,
    _std_list__List__IncompleteListDep,
    folly_small_vector__List__CompleteListDep,
    List__AdaptedListDep,
    List__DependentAdaptedListDep,
)


cdef object get_types_reflection():
    import importlib
    return importlib.import_module(
        "apache.thrift.fixtures.types.module.types_reflection"
    )

@__cython.auto_pickle(False)
cdef class empty_struct(thrift.py3.types.Struct):
    def __init__(empty_struct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cempty_struct]()
        self._fields_setter = _fbthrift_types_fields.__empty_struct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(empty_struct self, **kwargs):
        return self

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("empty_struct", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cempty_struct] cpp_obj):
        __fbthrift_inst = <empty_struct>empty_struct.__new__(empty_struct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst


    def __hash__(empty_struct self):
        return super().__hash__()

    def __repr__(empty_struct self):
        return super().__repr__()

    def __str__(empty_struct self):
        return super().__str__()


    def __copy__(empty_struct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cempty_struct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cempty_struct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return empty_struct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cempty_struct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<empty_struct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__empty_struct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cempty_struct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cempty_struct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 0

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(empty_struct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cempty_struct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(empty_struct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cempty_struct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cempty_struct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.empty_struct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class decorated_struct(thrift.py3.types.Struct):
    def __init__(decorated_struct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct]()
        self._fields_setter = _fbthrift_types_fields.__decorated_struct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(decorated_struct self, **kwargs):
        if not kwargs:
            return self
        cdef decorated_struct __fbthrift_inst = decorated_struct.__new__(decorated_struct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__decorated_struct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("decorated_struct", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct] cpp_obj):
        __fbthrift_inst = <decorated_struct>decorated_struct.__new__(decorated_struct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        return (<bytes>deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().value()).decode('UTF-8')

    @property
    def field(self):
        return self.field_impl()


    def __hash__(decorated_struct self):
        return super().__hash__()

    def __repr__(decorated_struct self):
        return super().__repr__()

    def __str__(decorated_struct self):
        return super().__str__()


    def __copy__(decorated_struct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return decorated_struct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<decorated_struct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__decorated_struct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(decorated_struct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(decorated_struct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cdecorated_struct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.decorated_struct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class ContainerStruct(thrift.py3.types.Struct):
    def __init__(ContainerStruct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct]()
        self._fields_setter = _fbthrift_types_fields.__ContainerStruct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(ContainerStruct self, **kwargs):
        if not kwargs:
            return self
        cdef ContainerStruct __fbthrift_inst = ContainerStruct.__new__(ContainerStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__ContainerStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("ContainerStruct", {
          "fieldA": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldA_ref().has_value(),
          "fieldB": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldB_ref().has_value(),
          "fieldC": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldC_ref().has_value(),
          "fieldD": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldD_ref().has_value(),
          "fieldE": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldE_ref().has_value(),
          "fieldF": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldF_ref().has_value(),
          "fieldG": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldG_ref().has_value(),
          "fieldH": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldH_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct] cpp_obj):
        __fbthrift_inst = <ContainerStruct>ContainerStruct.__new__(ContainerStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline fieldA_impl(self):
        if self.__fbthrift_cached_fieldA is None:
            self.__fbthrift_cached_fieldA = List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldA_ref().ref())
        return self.__fbthrift_cached_fieldA

    @property
    def fieldA(self):
        return self.fieldA_impl()

    cdef inline fieldB_impl(self):
        if self.__fbthrift_cached_fieldB is None:
            self.__fbthrift_cached_fieldB = std_list__List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldB_ref().ref())
        return self.__fbthrift_cached_fieldB

    @property
    def fieldB(self):
        return self.fieldB_impl()

    cdef inline fieldC_impl(self):
        if self.__fbthrift_cached_fieldC is None:
            self.__fbthrift_cached_fieldC = std_deque__List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldC_ref().ref())
        return self.__fbthrift_cached_fieldC

    @property
    def fieldC(self):
        return self.fieldC_impl()

    cdef inline fieldD_impl(self):
        if self.__fbthrift_cached_fieldD is None:
            self.__fbthrift_cached_fieldD = folly_fbvector__List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldD_ref().ref())
        return self.__fbthrift_cached_fieldD

    @property
    def fieldD(self):
        return self.fieldD_impl()

    cdef inline fieldE_impl(self):
        if self.__fbthrift_cached_fieldE is None:
            self.__fbthrift_cached_fieldE = folly_small_vector__List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldE_ref().ref())
        return self.__fbthrift_cached_fieldE

    @property
    def fieldE(self):
        return self.fieldE_impl()

    cdef inline fieldF_impl(self):
        if self.__fbthrift_cached_fieldF is None:
            self.__fbthrift_cached_fieldF = folly_sorted_vector_set__Set__i32._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldF_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_fieldF

    @property
    def fieldF(self):
        return self.fieldF_impl()

    cdef inline fieldG_impl(self):
        if self.__fbthrift_cached_fieldG is None:
            self.__fbthrift_cached_fieldG = Map__i32_string._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldG_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_fieldG

    @property
    def fieldG(self):
        return self.fieldG_impl()

    cdef inline fieldH_impl(self):
        if self.__fbthrift_cached_fieldH is None:
            self.__fbthrift_cached_fieldH = std_unordered_map__Map__i32_string._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldH_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_fieldH

    @property
    def fieldH(self):
        return self.fieldH_impl()


    def __hash__(ContainerStruct self):
        return super().__hash__()

    def __repr__(ContainerStruct self):
        return super().__repr__()

    def __str__(ContainerStruct self):
        return super().__str__()


    def __copy__(ContainerStruct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return ContainerStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<ContainerStruct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__ContainerStruct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 8

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(ContainerStruct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(ContainerStruct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cContainerStruct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.ContainerStruct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class CppTypeStruct(thrift.py3.types.Struct):
    def __init__(CppTypeStruct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct]()
        self._fields_setter = _fbthrift_types_fields.__CppTypeStruct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(CppTypeStruct self, **kwargs):
        if not kwargs:
            return self
        cdef CppTypeStruct __fbthrift_inst = CppTypeStruct.__new__(CppTypeStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__CppTypeStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("CppTypeStruct", {
          "fieldA": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldA_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct] cpp_obj):
        __fbthrift_inst = <CppTypeStruct>CppTypeStruct.__new__(CppTypeStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline fieldA_impl(self):
        if self.__fbthrift_cached_fieldA is None:
            self.__fbthrift_cached_fieldA = std_list_int32_t__List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).fieldA_ref().ref())
        return self.__fbthrift_cached_fieldA

    @property
    def fieldA(self):
        return self.fieldA_impl()


    def __hash__(CppTypeStruct self):
        return super().__hash__()

    def __repr__(CppTypeStruct self):
        return super().__repr__()

    def __str__(CppTypeStruct self):
        return super().__str__()


    def __copy__(CppTypeStruct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return CppTypeStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<CppTypeStruct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__CppTypeStruct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(CppTypeStruct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(CppTypeStruct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cCppTypeStruct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.CppTypeStruct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class VirtualStruct(thrift.py3.types.Struct):
    def __init__(VirtualStruct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct]()
        self._fields_setter = _fbthrift_types_fields.__VirtualStruct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(VirtualStruct self, **kwargs):
        if not kwargs:
            return self
        cdef VirtualStruct __fbthrift_inst = VirtualStruct.__new__(VirtualStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__VirtualStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("VirtualStruct", {
          "MyIntField": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).MyIntField_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct] cpp_obj):
        __fbthrift_inst = <VirtualStruct>VirtualStruct.__new__(VirtualStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline MyIntField_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).MyIntField_ref().value()

    @property
    def MyIntField(self):
        return self.MyIntField_impl()


    def __hash__(VirtualStruct self):
        return super().__hash__()

    def __repr__(VirtualStruct self):
        return super().__repr__()

    def __str__(VirtualStruct self):
        return super().__str__()


    def __copy__(VirtualStruct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return VirtualStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<VirtualStruct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__VirtualStruct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(VirtualStruct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(VirtualStruct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cVirtualStruct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.VirtualStruct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class MyStructWithForwardRefEnum(thrift.py3.types.Struct):
    def __init__(MyStructWithForwardRefEnum self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum]()
        self._fields_setter = _fbthrift_types_fields.__MyStructWithForwardRefEnum_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(MyStructWithForwardRefEnum self, **kwargs):
        if not kwargs:
            return self
        cdef MyStructWithForwardRefEnum __fbthrift_inst = MyStructWithForwardRefEnum.__new__(MyStructWithForwardRefEnum)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStructWithForwardRefEnum_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("MyStructWithForwardRefEnum", {
          "a": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).a_ref().has_value(),
          "b": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).b_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum] cpp_obj):
        __fbthrift_inst = <MyStructWithForwardRefEnum>MyStructWithForwardRefEnum.__new__(MyStructWithForwardRefEnum)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline a_impl(self):
        if self.__fbthrift_cached_a is None:
            self.__fbthrift_cached_a = translate_cpp_enum_to_python(MyForwardRefEnum, <int>(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).a_ref().value()))
        return self.__fbthrift_cached_a

    @property
    def a(self):
        return self.a_impl()

    cdef inline b_impl(self):
        if self.__fbthrift_cached_b is None:
            self.__fbthrift_cached_b = translate_cpp_enum_to_python(MyForwardRefEnum, <int>(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).b_ref().value()))
        return self.__fbthrift_cached_b

    @property
    def b(self):
        return self.b_impl()


    def __hash__(MyStructWithForwardRefEnum self):
        return super().__hash__()

    def __repr__(MyStructWithForwardRefEnum self):
        return super().__repr__()

    def __str__(MyStructWithForwardRefEnum self):
        return super().__str__()


    def __copy__(MyStructWithForwardRefEnum self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return MyStructWithForwardRefEnum._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<MyStructWithForwardRefEnum>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__MyStructWithForwardRefEnum()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(MyStructWithForwardRefEnum self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(MyStructWithForwardRefEnum self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cMyStructWithForwardRefEnum](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.MyStructWithForwardRefEnum, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class TrivialNumeric(thrift.py3.types.Struct):
    def __init__(TrivialNumeric self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric]()
        self._fields_setter = _fbthrift_types_fields.__TrivialNumeric_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(TrivialNumeric self, **kwargs):
        if not kwargs:
            return self
        cdef TrivialNumeric __fbthrift_inst = TrivialNumeric.__new__(TrivialNumeric)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__TrivialNumeric_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("TrivialNumeric", {
          "a": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).a_ref().has_value(),
          "b": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).b_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric] cpp_obj):
        __fbthrift_inst = <TrivialNumeric>TrivialNumeric.__new__(TrivialNumeric)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline a_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).a_ref().value()

    @property
    def a(self):
        return self.a_impl()

    cdef inline b_impl(self):
        return <pbool> deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).b_ref().value()

    @property
    def b(self):
        return self.b_impl()


    def __hash__(TrivialNumeric self):
        return super().__hash__()

    def __repr__(TrivialNumeric self):
        return super().__repr__()

    def __str__(TrivialNumeric self):
        return super().__str__()


    def __copy__(TrivialNumeric self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return TrivialNumeric._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<TrivialNumeric>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__TrivialNumeric()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(TrivialNumeric self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(TrivialNumeric self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cTrivialNumeric](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.TrivialNumeric, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class TrivialNestedWithDefault(thrift.py3.types.Struct):
    def __init__(TrivialNestedWithDefault self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault]()
        self._fields_setter = _fbthrift_types_fields.__TrivialNestedWithDefault_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(TrivialNestedWithDefault self, **kwargs):
        if not kwargs:
            return self
        cdef TrivialNestedWithDefault __fbthrift_inst = TrivialNestedWithDefault.__new__(TrivialNestedWithDefault)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__TrivialNestedWithDefault_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("TrivialNestedWithDefault", {
          "z": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).z_ref().has_value(),
          "n": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).n_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault] cpp_obj):
        __fbthrift_inst = <TrivialNestedWithDefault>TrivialNestedWithDefault.__new__(TrivialNestedWithDefault)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline z_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).z_ref().value()

    @property
    def z(self):
        return self.z_impl()

    cdef inline n_impl(self):
        if self.__fbthrift_cached_n is None:
            self.__fbthrift_cached_n = TrivialNumeric._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).n_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_n

    @property
    def n(self):
        return self.n_impl()


    def __hash__(TrivialNestedWithDefault self):
        return super().__hash__()

    def __repr__(TrivialNestedWithDefault self):
        return super().__repr__()

    def __str__(TrivialNestedWithDefault self):
        return super().__str__()


    def __copy__(TrivialNestedWithDefault self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return TrivialNestedWithDefault._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<TrivialNestedWithDefault>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__TrivialNestedWithDefault()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(TrivialNestedWithDefault self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(TrivialNestedWithDefault self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cTrivialNestedWithDefault](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.TrivialNestedWithDefault, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class ComplexString(thrift.py3.types.Struct):
    def __init__(ComplexString self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexString]()
        self._fields_setter = _fbthrift_types_fields.__ComplexString_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(ComplexString self, **kwargs):
        if not kwargs:
            return self
        cdef ComplexString __fbthrift_inst = ComplexString.__new__(ComplexString)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexString](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__ComplexString_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("ComplexString", {
          "a": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).a_ref().has_value(),
          "b": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).b_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cComplexString] cpp_obj):
        __fbthrift_inst = <ComplexString>ComplexString.__new__(ComplexString)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline a_impl(self):
        return (<bytes>deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).a_ref().value()).decode('UTF-8')

    @property
    def a(self):
        return self.a_impl()

    cdef inline b_impl(self):
        if self.__fbthrift_cached_b is None:
            self.__fbthrift_cached_b = Map__string_i32._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).b_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_b

    @property
    def b(self):
        return self.b_impl()


    def __hash__(ComplexString self):
        return super().__hash__()

    def __repr__(ComplexString self):
        return super().__repr__()

    def __str__(ComplexString self):
        return super().__str__()


    def __copy__(ComplexString self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cComplexString] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexString](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return ComplexString._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cComplexString](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<ComplexString>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__ComplexString()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cComplexString].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cComplexString](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(ComplexString self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cComplexString](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(ComplexString self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexString]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cComplexString](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.ComplexString, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class ComplexNestedWithDefault(thrift.py3.types.Struct):
    def __init__(ComplexNestedWithDefault self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault]()
        self._fields_setter = _fbthrift_types_fields.__ComplexNestedWithDefault_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(ComplexNestedWithDefault self, **kwargs):
        if not kwargs:
            return self
        cdef ComplexNestedWithDefault __fbthrift_inst = ComplexNestedWithDefault.__new__(ComplexNestedWithDefault)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__ComplexNestedWithDefault_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("ComplexNestedWithDefault", {
          "z": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).z_ref().has_value(),
          "n": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).n_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault] cpp_obj):
        __fbthrift_inst = <ComplexNestedWithDefault>ComplexNestedWithDefault.__new__(ComplexNestedWithDefault)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline z_impl(self):
        return (<bytes>deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).z_ref().value()).decode('UTF-8')

    @property
    def z(self):
        return self.z_impl()

    cdef inline n_impl(self):
        if self.__fbthrift_cached_n is None:
            self.__fbthrift_cached_n = ComplexString._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).n_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_n

    @property
    def n(self):
        return self.n_impl()


    def __hash__(ComplexNestedWithDefault self):
        return super().__hash__()

    def __repr__(ComplexNestedWithDefault self):
        return super().__repr__()

    def __str__(ComplexNestedWithDefault self):
        return super().__str__()


    def __copy__(ComplexNestedWithDefault self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return ComplexNestedWithDefault._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<ComplexNestedWithDefault>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__ComplexNestedWithDefault()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(ComplexNestedWithDefault self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(ComplexNestedWithDefault self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cComplexNestedWithDefault](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.ComplexNestedWithDefault, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class MinPadding(thrift.py3.types.Struct):
    def __init__(MinPadding self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPadding]()
        self._fields_setter = _fbthrift_types_fields.__MinPadding_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(MinPadding self, **kwargs):
        if not kwargs:
            return self
        cdef MinPadding __fbthrift_inst = MinPadding.__new__(MinPadding)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPadding](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__MinPadding_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("MinPadding", {
          "small": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).small_ref().has_value(),
          "big": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).big_ref().has_value(),
          "medium": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).medium_ref().has_value(),
          "biggish": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).biggish_ref().has_value(),
          "tiny": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).tiny_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMinPadding] cpp_obj):
        __fbthrift_inst = <MinPadding>MinPadding.__new__(MinPadding)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline small_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).small_ref().value()

    @property
    def small(self):
        return self.small_impl()

    cdef inline big_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).big_ref().value()

    @property
    def big(self):
        return self.big_impl()

    cdef inline medium_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).medium_ref().value()

    @property
    def medium(self):
        return self.medium_impl()

    cdef inline biggish_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).biggish_ref().value()

    @property
    def biggish(self):
        return self.biggish_impl()

    cdef inline tiny_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).tiny_ref().value()

    @property
    def tiny(self):
        return self.tiny_impl()


    def __hash__(MinPadding self):
        return super().__hash__()

    def __repr__(MinPadding self):
        return super().__repr__()

    def __str__(MinPadding self):
        return super().__str__()


    def __copy__(MinPadding self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMinPadding] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPadding](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return MinPadding._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cMinPadding](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<MinPadding>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__MinPadding()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cMinPadding].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cMinPadding](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 5

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(MinPadding self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cMinPadding](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(MinPadding self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPadding]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cMinPadding](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.MinPadding, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class MinPaddingWithCustomType(thrift.py3.types.Struct):
    def __init__(MinPaddingWithCustomType self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType]()
        self._fields_setter = _fbthrift_types_fields.__MinPaddingWithCustomType_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(MinPaddingWithCustomType self, **kwargs):
        if not kwargs:
            return self
        cdef MinPaddingWithCustomType __fbthrift_inst = MinPaddingWithCustomType.__new__(MinPaddingWithCustomType)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__MinPaddingWithCustomType_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("MinPaddingWithCustomType", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType] cpp_obj):
        __fbthrift_inst = <MinPaddingWithCustomType>MinPaddingWithCustomType.__new__(MinPaddingWithCustomType)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline small_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).small_ref().value()

    @property
    def small(self):
        return self.small_impl()

    cdef inline big_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).big_ref().value()

    @property
    def big(self):
        return self.big_impl()

    cdef inline medium_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).medium_ref().value()

    @property
    def medium(self):
        return self.medium_impl()

    cdef inline biggish_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).biggish_ref().value()

    @property
    def biggish(self):
        return self.biggish_impl()

    cdef inline tiny_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).tiny_ref().value()

    @property
    def tiny(self):
        return self.tiny_impl()


    def __hash__(MinPaddingWithCustomType self):
        return super().__hash__()

    def __repr__(MinPaddingWithCustomType self):
        return super().__repr__()

    def __str__(MinPaddingWithCustomType self):
        return super().__str__()


    def __copy__(MinPaddingWithCustomType self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return MinPaddingWithCustomType._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<MinPaddingWithCustomType>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__MinPaddingWithCustomType()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 5

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(MinPaddingWithCustomType self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(MinPaddingWithCustomType self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cMinPaddingWithCustomType](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.MinPaddingWithCustomType, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class MyStruct(thrift.py3.types.Struct):
    def __init__(MyStruct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStruct]()
        self._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(MyStruct self, **kwargs):
        if not kwargs:
            return self
        cdef MyStruct __fbthrift_inst = MyStruct.__new__(MyStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("MyStruct", {
          "MyIntField": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).MyIntField_ref().has_value(),
          "MyStringField": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).MyStringField_ref().has_value(),
          "majorVer": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).majorVer_ref().has_value(),
          "data": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).data_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMyStruct] cpp_obj):
        __fbthrift_inst = <MyStruct>MyStruct.__new__(MyStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline MyIntField_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).MyIntField_ref().value()

    @property
    def MyIntField(self):
        return self.MyIntField_impl()

    cdef inline MyStringField_impl(self):
        return (<bytes>deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).MyStringField_ref().value()).decode('UTF-8')

    @property
    def MyStringField(self):
        return self.MyStringField_impl()

    cdef inline majorVer_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).majorVer_ref().value()

    @property
    def majorVer(self):
        return self.majorVer_impl()

    cdef inline data_impl(self):
        if self.__fbthrift_cached_data is None:
            self.__fbthrift_cached_data = MyDataItem._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).data_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_data

    @property
    def data(self):
        return self.data_impl()


    def __hash__(MyStruct self):
        return super().__hash__()

    def __repr__(MyStruct self):
        return super().__repr__()

    def __str__(MyStruct self):
        return super().__str__()


    def __copy__(MyStruct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMyStruct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStruct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return MyStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __eq__(MyStruct self, other):
        return isinstance(other, MyStruct) and self._fbthrift_noncomparable_eq(other)

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__MyStruct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cMyStruct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cMyStruct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 4

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(MyStruct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cMyStruct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(MyStruct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyStruct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cMyStruct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.MyStruct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class MyDataItem(thrift.py3.types.Struct):
    def __init__(MyDataItem self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem]()
        self._fields_setter = _fbthrift_types_fields.__MyDataItem_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(MyDataItem self, **kwargs):
        return self

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("MyDataItem", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem] cpp_obj):
        __fbthrift_inst = <MyDataItem>MyDataItem.__new__(MyDataItem)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst


    def __hash__(MyDataItem self):
        return super().__hash__()

    def __repr__(MyDataItem self):
        return super().__repr__()

    def __str__(MyDataItem self):
        return super().__str__()


    def __copy__(MyDataItem self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return MyDataItem._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __eq__(MyDataItem self, other):
        return isinstance(other, MyDataItem) and self._fbthrift_noncomparable_eq(other)

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__MyDataItem()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 0

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(MyDataItem self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(MyDataItem self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cMyDataItem](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.MyDataItem, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class Renaming(thrift.py3.types.Struct):
    def __init__(Renaming self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cRenaming]()
        self._fields_setter = _fbthrift_types_fields.__Renaming_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(Renaming self, **kwargs):
        if not kwargs:
            return self
        cdef Renaming __fbthrift_inst = Renaming.__new__(Renaming)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cRenaming](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__Renaming_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("Renaming", {
          "foo": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).foo_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cRenaming] cpp_obj):
        __fbthrift_inst = <Renaming>Renaming.__new__(Renaming)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline foo_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).foo_ref().value()

    @property
    def foo(self):
        return self.foo_impl()


    def __hash__(Renaming self):
        return super().__hash__()

    def __repr__(Renaming self):
        return super().__repr__()

    def __str__(Renaming self):
        return super().__str__()


    def __copy__(Renaming self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cRenaming] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cRenaming](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Renaming._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cRenaming](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<Renaming>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Renaming()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cRenaming].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cRenaming](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(Renaming self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cRenaming](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(Renaming self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cRenaming]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cRenaming](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.Renaming, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class AnnotatedTypes(thrift.py3.types.Struct):
    def __init__(AnnotatedTypes self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes]()
        self._fields_setter = _fbthrift_types_fields.__AnnotatedTypes_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(AnnotatedTypes self, **kwargs):
        if not kwargs:
            return self
        cdef AnnotatedTypes __fbthrift_inst = AnnotatedTypes.__new__(AnnotatedTypes)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__AnnotatedTypes_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("AnnotatedTypes", {
          "binary_field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).binary_field_ref().has_value(),
          "list_field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).list_field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes] cpp_obj):
        __fbthrift_inst = <AnnotatedTypes>AnnotatedTypes.__new__(AnnotatedTypes)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline binary_field_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).binary_field_ref().value()

    @property
    def binary_field(self):
        return self.binary_field_impl()

    cdef inline list_field_impl(self):
        if self.__fbthrift_cached_list_field is None:
            self.__fbthrift_cached_list_field = List__std_unordered_map__Map__i32_string__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).list_field_ref().ref())
        return self.__fbthrift_cached_list_field

    @property
    def list_field(self):
        return self.list_field_impl()


    def __hash__(AnnotatedTypes self):
        return super().__hash__()

    def __repr__(AnnotatedTypes self):
        return super().__repr__()

    def __str__(AnnotatedTypes self):
        return super().__str__()


    def __copy__(AnnotatedTypes self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return AnnotatedTypes._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<AnnotatedTypes>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__AnnotatedTypes()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(AnnotatedTypes self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(AnnotatedTypes self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cAnnotatedTypes](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.AnnotatedTypes, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class ForwardUsageRoot(thrift.py3.types.Struct):
    def __init__(ForwardUsageRoot self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot]()
        self._fields_setter = _fbthrift_types_fields.__ForwardUsageRoot_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(ForwardUsageRoot self, **kwargs):
        if not kwargs:
            return self
        cdef ForwardUsageRoot __fbthrift_inst = ForwardUsageRoot.__new__(ForwardUsageRoot)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__ForwardUsageRoot_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("ForwardUsageRoot", {
          "ForwardUsageStruct": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).ForwardUsageStruct_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot] cpp_obj):
        __fbthrift_inst = <ForwardUsageRoot>ForwardUsageRoot.__new__(ForwardUsageRoot)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline ForwardUsageStruct_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).ForwardUsageStruct_ref().has_value():
            return None
        if self.__fbthrift_cached_ForwardUsageStruct is None:
            self.__fbthrift_cached_ForwardUsageStruct = ForwardUsageStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).ForwardUsageStruct_ref().ref_unchecked(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_ForwardUsageStruct

    @property
    def ForwardUsageStruct(self):
        return self.ForwardUsageStruct_impl()

    cdef inline ForwardUsageByRef_impl(self):
        if self.__fbthrift_cached_ForwardUsageByRef is None:
            if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).ForwardUsageByRef_ref():
                return None
            self.__fbthrift_cached_ForwardUsageByRef = ForwardUsageByRef._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).ForwardUsageByRef_ref()), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_ForwardUsageByRef

    @property
    def ForwardUsageByRef(self):
        return self.ForwardUsageByRef_impl()


    def __hash__(ForwardUsageRoot self):
        return super().__hash__()

    def __repr__(ForwardUsageRoot self):
        return super().__repr__()

    def __str__(ForwardUsageRoot self):
        return super().__str__()


    def __copy__(ForwardUsageRoot self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return ForwardUsageRoot._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<ForwardUsageRoot>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__ForwardUsageRoot()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(ForwardUsageRoot self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(ForwardUsageRoot self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageRoot](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.ForwardUsageRoot, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class ForwardUsageStruct(thrift.py3.types.Struct):
    def __init__(ForwardUsageStruct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct]()
        self._fields_setter = _fbthrift_types_fields.__ForwardUsageStruct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(ForwardUsageStruct self, **kwargs):
        if not kwargs:
            return self
        cdef ForwardUsageStruct __fbthrift_inst = ForwardUsageStruct.__new__(ForwardUsageStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__ForwardUsageStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("ForwardUsageStruct", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct] cpp_obj):
        __fbthrift_inst = <ForwardUsageStruct>ForwardUsageStruct.__new__(ForwardUsageStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline foo_impl(self):
        if self.__fbthrift_cached_foo is None:
            if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).foo_ref():
                return None
            self.__fbthrift_cached_foo = ForwardUsageRoot._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).foo_ref()), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_foo

    @property
    def foo(self):
        return self.foo_impl()


    def __hash__(ForwardUsageStruct self):
        return super().__hash__()

    def __repr__(ForwardUsageStruct self):
        return super().__repr__()

    def __str__(ForwardUsageStruct self):
        return super().__str__()


    def __copy__(ForwardUsageStruct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return ForwardUsageStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<ForwardUsageStruct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__ForwardUsageStruct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(ForwardUsageStruct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(ForwardUsageStruct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageStruct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.ForwardUsageStruct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class ForwardUsageByRef(thrift.py3.types.Struct):
    def __init__(ForwardUsageByRef self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef]()
        self._fields_setter = _fbthrift_types_fields.__ForwardUsageByRef_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(ForwardUsageByRef self, **kwargs):
        if not kwargs:
            return self
        cdef ForwardUsageByRef __fbthrift_inst = ForwardUsageByRef.__new__(ForwardUsageByRef)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__ForwardUsageByRef_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("ForwardUsageByRef", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef] cpp_obj):
        __fbthrift_inst = <ForwardUsageByRef>ForwardUsageByRef.__new__(ForwardUsageByRef)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline foo_impl(self):
        if self.__fbthrift_cached_foo is None:
            if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).foo_ref():
                return None
            self.__fbthrift_cached_foo = ForwardUsageRoot._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).foo_ref()), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_foo

    @property
    def foo(self):
        return self.foo_impl()


    def __hash__(ForwardUsageByRef self):
        return super().__hash__()

    def __repr__(ForwardUsageByRef self):
        return super().__repr__()

    def __str__(ForwardUsageByRef self):
        return super().__str__()


    def __copy__(ForwardUsageByRef self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return ForwardUsageByRef._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<ForwardUsageByRef>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__ForwardUsageByRef()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(ForwardUsageByRef self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(ForwardUsageByRef self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cForwardUsageByRef](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.ForwardUsageByRef, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class IncompleteMap(thrift.py3.types.Struct):
    def __init__(IncompleteMap self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap]()
        self._fields_setter = _fbthrift_types_fields.__IncompleteMap_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(IncompleteMap self, **kwargs):
        if not kwargs:
            return self
        cdef IncompleteMap __fbthrift_inst = IncompleteMap.__new__(IncompleteMap)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__IncompleteMap_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("IncompleteMap", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap] cpp_obj):
        __fbthrift_inst = <IncompleteMap>IncompleteMap.__new__(IncompleteMap)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value():
            return None
        if self.__fbthrift_cached_field is None:
            self.__fbthrift_cached_field = Map__i32_IncompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().ref_unchecked(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_field

    @property
    def field(self):
        return self.field_impl()


    def __hash__(IncompleteMap self):
        return super().__hash__()

    def __repr__(IncompleteMap self):
        return super().__repr__()

    def __str__(IncompleteMap self):
        return super().__str__()


    def __copy__(IncompleteMap self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return IncompleteMap._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<IncompleteMap>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__IncompleteMap()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(IncompleteMap self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(IncompleteMap self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMap](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.IncompleteMap, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class IncompleteMapDep(thrift.py3.types.Struct):
    def __init__(IncompleteMapDep self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]()
        self._fields_setter = _fbthrift_types_fields.__IncompleteMapDep_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(IncompleteMapDep self, **kwargs):
        return self

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("IncompleteMapDep", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep] cpp_obj):
        __fbthrift_inst = <IncompleteMapDep>IncompleteMapDep.__new__(IncompleteMapDep)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst


    def __hash__(IncompleteMapDep self):
        return super().__hash__()

    def __repr__(IncompleteMapDep self):
        return super().__repr__()

    def __str__(IncompleteMapDep self):
        return super().__str__()


    def __copy__(IncompleteMapDep self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return IncompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<IncompleteMapDep>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__IncompleteMapDep()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 0

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(IncompleteMapDep self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(IncompleteMapDep self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.IncompleteMapDep, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class CompleteMap(thrift.py3.types.Struct):
    def __init__(CompleteMap self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap]()
        self._fields_setter = _fbthrift_types_fields.__CompleteMap_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(CompleteMap self, **kwargs):
        if not kwargs:
            return self
        cdef CompleteMap __fbthrift_inst = CompleteMap.__new__(CompleteMap)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__CompleteMap_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("CompleteMap", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap] cpp_obj):
        __fbthrift_inst = <CompleteMap>CompleteMap.__new__(CompleteMap)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value():
            return None
        if self.__fbthrift_cached_field is None:
            self.__fbthrift_cached_field = std_unordered_map__Map__i32_CompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().ref_unchecked(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_field

    @property
    def field(self):
        return self.field_impl()


    def __hash__(CompleteMap self):
        return super().__hash__()

    def __repr__(CompleteMap self):
        return super().__repr__()

    def __str__(CompleteMap self):
        return super().__str__()


    def __copy__(CompleteMap self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return CompleteMap._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<CompleteMap>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__CompleteMap()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(CompleteMap self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(CompleteMap self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteMap](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.CompleteMap, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class CompleteMapDep(thrift.py3.types.Struct):
    def __init__(CompleteMapDep self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]()
        self._fields_setter = _fbthrift_types_fields.__CompleteMapDep_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(CompleteMapDep self, **kwargs):
        return self

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("CompleteMapDep", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep] cpp_obj):
        __fbthrift_inst = <CompleteMapDep>CompleteMapDep.__new__(CompleteMapDep)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst


    def __hash__(CompleteMapDep self):
        return super().__hash__()

    def __repr__(CompleteMapDep self):
        return super().__repr__()

    def __str__(CompleteMapDep self):
        return super().__str__()


    def __copy__(CompleteMapDep self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return CompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<CompleteMapDep>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__CompleteMapDep()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 0

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(CompleteMapDep self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(CompleteMapDep self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.CompleteMapDep, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class IncompleteList(thrift.py3.types.Struct):
    def __init__(IncompleteList self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList]()
        self._fields_setter = _fbthrift_types_fields.__IncompleteList_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(IncompleteList self, **kwargs):
        if not kwargs:
            return self
        cdef IncompleteList __fbthrift_inst = IncompleteList.__new__(IncompleteList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__IncompleteList_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("IncompleteList", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList] cpp_obj):
        __fbthrift_inst = <IncompleteList>IncompleteList.__new__(IncompleteList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value():
            return None
        if self.__fbthrift_cached_field is None:
            self.__fbthrift_cached_field = _std_list__List__IncompleteListDep__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().ref_unchecked())
        return self.__fbthrift_cached_field

    @property
    def field(self):
        return self.field_impl()


    def __hash__(IncompleteList self):
        return super().__hash__()

    def __repr__(IncompleteList self):
        return super().__repr__()

    def __str__(IncompleteList self):
        return super().__str__()


    def __copy__(IncompleteList self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return IncompleteList._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<IncompleteList>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__IncompleteList()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(IncompleteList self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(IncompleteList self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteList](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.IncompleteList, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class IncompleteListDep(thrift.py3.types.Struct):
    def __init__(IncompleteListDep self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep]()
        self._fields_setter = _fbthrift_types_fields.__IncompleteListDep_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(IncompleteListDep self, **kwargs):
        return self

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("IncompleteListDep", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep] cpp_obj):
        __fbthrift_inst = <IncompleteListDep>IncompleteListDep.__new__(IncompleteListDep)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst


    def __hash__(IncompleteListDep self):
        return super().__hash__()

    def __repr__(IncompleteListDep self):
        return super().__repr__()

    def __str__(IncompleteListDep self):
        return super().__str__()


    def __copy__(IncompleteListDep self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return IncompleteListDep._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<IncompleteListDep>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__IncompleteListDep()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 0

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(IncompleteListDep self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(IncompleteListDep self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.IncompleteListDep, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class CompleteList(thrift.py3.types.Struct):
    def __init__(CompleteList self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteList]()
        self._fields_setter = _fbthrift_types_fields.__CompleteList_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(CompleteList self, **kwargs):
        if not kwargs:
            return self
        cdef CompleteList __fbthrift_inst = CompleteList.__new__(CompleteList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteList](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__CompleteList_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("CompleteList", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteList] cpp_obj):
        __fbthrift_inst = <CompleteList>CompleteList.__new__(CompleteList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value():
            return None
        if self.__fbthrift_cached_field is None:
            self.__fbthrift_cached_field = folly_small_vector__List__CompleteListDep__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().ref_unchecked())
        return self.__fbthrift_cached_field

    @property
    def field(self):
        return self.field_impl()


    def __hash__(CompleteList self):
        return super().__hash__()

    def __repr__(CompleteList self):
        return super().__repr__()

    def __str__(CompleteList self):
        return super().__str__()


    def __copy__(CompleteList self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteList] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteList](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return CompleteList._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cCompleteList](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<CompleteList>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__CompleteList()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cCompleteList].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cCompleteList](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(CompleteList self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteList](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(CompleteList self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteList]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteList](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.CompleteList, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class CompleteListDep(thrift.py3.types.Struct):
    def __init__(CompleteListDep self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep]()
        self._fields_setter = _fbthrift_types_fields.__CompleteListDep_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(CompleteListDep self, **kwargs):
        return self

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("CompleteListDep", {
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep] cpp_obj):
        __fbthrift_inst = <CompleteListDep>CompleteListDep.__new__(CompleteListDep)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst


    def __hash__(CompleteListDep self):
        return super().__hash__()

    def __repr__(CompleteListDep self):
        return super().__repr__()

    def __str__(CompleteListDep self):
        return super().__str__()


    def __copy__(CompleteListDep self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return CompleteListDep._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<CompleteListDep>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__CompleteListDep()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 0

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(CompleteListDep self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(CompleteListDep self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.CompleteListDep, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class AdaptedList(thrift.py3.types.Struct):
    def __init__(AdaptedList self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList]()
        self._fields_setter = _fbthrift_types_fields.__AdaptedList_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(AdaptedList self, **kwargs):
        if not kwargs:
            return self
        cdef AdaptedList __fbthrift_inst = AdaptedList.__new__(AdaptedList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__AdaptedList_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("AdaptedList", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList] cpp_obj):
        __fbthrift_inst = <AdaptedList>AdaptedList.__new__(AdaptedList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value():
            return None
        if self.__fbthrift_cached_field is None:
            self.__fbthrift_cached_field = List__AdaptedListDep__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().ref_unchecked())
        return self.__fbthrift_cached_field

    @property
    def field(self):
        return self.field_impl()


    def __hash__(AdaptedList self):
        return super().__hash__()

    def __repr__(AdaptedList self):
        return super().__repr__()

    def __str__(AdaptedList self):
        return super().__str__()


    def __copy__(AdaptedList self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return AdaptedList._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<AdaptedList>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__AdaptedList()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(AdaptedList self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(AdaptedList self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cAdaptedList](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.AdaptedList, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class DependentAdaptedList(thrift.py3.types.Struct):
    def __init__(DependentAdaptedList self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList]()
        self._fields_setter = _fbthrift_types_fields.__DependentAdaptedList_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(DependentAdaptedList self, **kwargs):
        if not kwargs:
            return self
        cdef DependentAdaptedList __fbthrift_inst = DependentAdaptedList.__new__(DependentAdaptedList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__DependentAdaptedList_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("DependentAdaptedList", {
          "field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList] cpp_obj):
        __fbthrift_inst = <DependentAdaptedList>DependentAdaptedList.__new__(DependentAdaptedList)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().has_value():
            return None
        if self.__fbthrift_cached_field is None:
            self.__fbthrift_cached_field = List__DependentAdaptedListDep__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).field_ref().ref_unchecked())
        return self.__fbthrift_cached_field

    @property
    def field(self):
        return self.field_impl()


    def __hash__(DependentAdaptedList self):
        return super().__hash__()

    def __repr__(DependentAdaptedList self):
        return super().__repr__()

    def __str__(DependentAdaptedList self):
        return super().__str__()


    def __copy__(DependentAdaptedList self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return DependentAdaptedList._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<DependentAdaptedList>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__DependentAdaptedList()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(DependentAdaptedList self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(DependentAdaptedList self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedList](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.DependentAdaptedList, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class AllocatorAware(thrift.py3.types.Struct):
    def __init__(AllocatorAware self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware]()
        self._fields_setter = _fbthrift_types_fields.__AllocatorAware_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(AllocatorAware self, **kwargs):
        if not kwargs:
            return self
        cdef AllocatorAware __fbthrift_inst = AllocatorAware.__new__(AllocatorAware)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__AllocatorAware_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("AllocatorAware", {
          "aa_list": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_list_ref().has_value(),
          "aa_set": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_set_ref().has_value(),
          "aa_map": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_map_ref().has_value(),
          "aa_string": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_string_ref().has_value(),
          "not_a_container": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).not_a_container_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware] cpp_obj):
        __fbthrift_inst = <AllocatorAware>AllocatorAware.__new__(AllocatorAware)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline aa_list_impl(self):
        if self.__fbthrift_cached_aa_list is None:
            self.__fbthrift_cached_aa_list = List__i32__from_cpp(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_list_ref().ref())
        return self.__fbthrift_cached_aa_list

    @property
    def aa_list(self):
        return self.aa_list_impl()

    cdef inline aa_set_impl(self):
        if self.__fbthrift_cached_aa_set is None:
            self.__fbthrift_cached_aa_set = Set__i32._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_set_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_aa_set

    @property
    def aa_set(self):
        return self.aa_set_impl()

    cdef inline aa_map_impl(self):
        if self.__fbthrift_cached_aa_map is None:
            self.__fbthrift_cached_aa_map = Map__i32_i32._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_map_ref().ref(), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_aa_map

    @property
    def aa_map(self):
        return self.aa_map_impl()

    cdef inline aa_string_impl(self):
        return (<bytes>deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_string_ref().value()).decode('UTF-8')

    @property
    def aa_string(self):
        return self.aa_string_impl()

    cdef inline not_a_container_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).not_a_container_ref().value()

    @property
    def not_a_container(self):
        return self.not_a_container_impl()

    cdef inline aa_unique_impl(self):
        if self.__fbthrift_cached_aa_unique is None:
            if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_unique_ref():
                return None
            self.__fbthrift_cached_aa_unique = cint32_t._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_unique_ref()), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_aa_unique

    @property
    def aa_unique(self):
        return self.aa_unique_impl()

    cdef inline aa_shared_impl(self):
        if self.__fbthrift_cached_aa_shared is None:
            if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_shared_ref():
                return None
            self.__fbthrift_cached_aa_shared = cint32_t._create_FBTHRIFT_ONLY_DO_NOT_USE(__reference_shared_ptr(deref(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).aa_shared_ref()), self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        return self.__fbthrift_cached_aa_shared

    @property
    def aa_shared(self):
        return self.aa_shared_impl()


    def __hash__(AllocatorAware self):
        return super().__hash__()

    def __repr__(AllocatorAware self):
        return super().__repr__()

    def __str__(AllocatorAware self):
        return super().__str__()


    def __copy__(AllocatorAware self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return AllocatorAware._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<AllocatorAware>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__AllocatorAware()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 7

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(AllocatorAware self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(AllocatorAware self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.AllocatorAware, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class AllocatorAware2(thrift.py3.types.Struct):
    def __init__(AllocatorAware2 self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2]()
        self._fields_setter = _fbthrift_types_fields.__AllocatorAware2_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(AllocatorAware2 self, **kwargs):
        if not kwargs:
            return self
        cdef AllocatorAware2 __fbthrift_inst = AllocatorAware2.__new__(AllocatorAware2)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__AllocatorAware2_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("AllocatorAware2", {
          "not_a_container": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).not_a_container_ref().has_value(),
          "box_field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).box_field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2] cpp_obj):
        __fbthrift_inst = <AllocatorAware2>AllocatorAware2.__new__(AllocatorAware2)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline not_a_container_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).not_a_container_ref().value()

    @property
    def not_a_container(self):
        return self.not_a_container_impl()

    cdef inline box_field_impl(self):
        if not deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).box_field_ref().has_value():
            return None
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).box_field_ref().value()

    @property
    def box_field(self):
        return self.box_field_impl()


    def __hash__(AllocatorAware2 self):
        return super().__hash__()

    def __repr__(AllocatorAware2 self):
        return super().__repr__()

    def __str__(AllocatorAware2 self):
        return super().__str__()


    def __copy__(AllocatorAware2 self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return AllocatorAware2._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<AllocatorAware2>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__AllocatorAware2()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 2

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(AllocatorAware2 self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(AllocatorAware2 self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cAllocatorAware2](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.AllocatorAware2, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class TypedefStruct(thrift.py3.types.Struct):
    def __init__(TypedefStruct self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct]()
        self._fields_setter = _fbthrift_types_fields.__TypedefStruct_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(TypedefStruct self, **kwargs):
        if not kwargs:
            return self
        cdef TypedefStruct __fbthrift_inst = TypedefStruct.__new__(TypedefStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__TypedefStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("TypedefStruct", {
          "i32_field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).i32_field_ref().has_value(),
          "IntTypedef_field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).IntTypedef_field_ref().has_value(),
          "UintTypedef_field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).UintTypedef_field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct] cpp_obj):
        __fbthrift_inst = <TypedefStruct>TypedefStruct.__new__(TypedefStruct)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline i32_field_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).i32_field_ref().value()

    @property
    def i32_field(self):
        return self.i32_field_impl()

    cdef inline IntTypedef_field_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).IntTypedef_field_ref().value()

    @property
    def IntTypedef_field(self):
        return self.IntTypedef_field_impl()

    cdef inline UintTypedef_field_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).UintTypedef_field_ref().value()

    @property
    def UintTypedef_field(self):
        return self.UintTypedef_field_impl()


    def __hash__(TypedefStruct self):
        return super().__hash__()

    def __repr__(TypedefStruct self):
        return super().__repr__()

    def __str__(TypedefStruct self):
        return super().__str__()


    def __copy__(TypedefStruct self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return TypedefStruct._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<TypedefStruct>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__TypedefStruct()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 3

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(TypedefStruct self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(TypedefStruct self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cTypedefStruct](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.TypedefStruct, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
cdef class StructWithDoubleUnderscores(thrift.py3.types.Struct):
    def __init__(StructWithDoubleUnderscores self, **kwargs):
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores]()
        self._fields_setter = _fbthrift_types_fields.__StructWithDoubleUnderscores_FieldsSetter._fbthrift_create(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        super().__init__(**kwargs)

    def __call__(StructWithDoubleUnderscores self, **kwargs):
        if not kwargs:
            return self
        cdef StructWithDoubleUnderscores __fbthrift_inst = StructWithDoubleUnderscores.__new__(StructWithDoubleUnderscores)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
        __fbthrift_inst._fields_setter = _fbthrift_types_fields.__StructWithDoubleUnderscores_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
        for __fbthrift_name, _fbthrift_value in kwargs.items():
            __fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
        return __fbthrift_inst

    cdef void _fbthrift_set_field(self, str name, object value) except *:
        self._fields_setter.set_field(name.encode("utf-8"), value)

    cdef object _fbthrift_isset(self):
        return _fbthrift_IsSet("StructWithDoubleUnderscores", {
          "__field": deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).__field_ref().has_value(),
        })

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores] cpp_obj):
        __fbthrift_inst = <StructWithDoubleUnderscores>StructWithDoubleUnderscores.__new__(StructWithDoubleUnderscores)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(cpp_obj)
        return __fbthrift_inst

    cdef inline __field_impl(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).__field_ref().value()

    @property
    def __field(self):
        return self.__field_impl()


    def __hash__(StructWithDoubleUnderscores self):
        return super().__hash__()

    def __repr__(StructWithDoubleUnderscores self):
        return super().__repr__()

    def __str__(StructWithDoubleUnderscores self):
        return super().__str__()


    def __copy__(StructWithDoubleUnderscores self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return StructWithDoubleUnderscores._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __richcmp__(self, other, int op):
        r = self._fbthrift_cmp_sametype(other, op)
        return __richcmp[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<StructWithDoubleUnderscores>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ) if r is None else r

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__StructWithDoubleUnderscores()

    @staticmethod
    def __get_metadata__():
        cdef __fbthrift_cThriftMetadata meta
        _apache_thrift_fixtures_types_module_cbindings.StructMetadata[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores].gen(meta)
        return __MetadataBox.box(cmove(meta))

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

    @classmethod
    def _fbthrift_get_field_name_by_index(cls, idx):
        return __sv_to_str(__get_field_name_by_index[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores](idx))

    @classmethod
    def _fbthrift_get_struct_size(cls):
        return 1

    cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize(StructWithDoubleUnderscores self, __Protocol proto):
        cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data
        with nogil:
            data = cmove(serializer.cserialize[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto))
        return _fbthrift_iobuf.from_unique_ptr(cmove(data))

    cdef cuint32_t _fbthrift_deserialize(StructWithDoubleUnderscores self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0:
        cdef cuint32_t needed
        self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores]()
        with nogil:
            needed = serializer.cdeserialize[_apache_thrift_fixtures_types_module_cbindings.cStructWithDoubleUnderscores](buf, self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get(), proto)
        return needed


    def _to_python(self):
        import importlib
        import thrift.python.converter
        python_types = importlib.import_module(
            "apache.thrift.fixtures.types.module.thrift_types"
        )
        return thrift.python.converter.to_python_struct(python_types.StructWithDoubleUnderscores, self)

    def _to_py3(self):
        return self

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

@__cython.auto_pickle(False)
@__cython.final
cdef class std_unordered_map__Map__i32_string(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, std_unordered_map__Map__i32_string):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<std_unordered_map__Map__i32_string> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = std_unordered_map__Map__i32_string__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] c_items):
        __fbthrift_inst = <std_unordered_map__Map__i32_string>std_unordered_map__Map__i32_string.__new__(std_unordered_map__Map__i32_string)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(std_unordered_map__Map__i32_string self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return std_unordered_map__Map__i32_string._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, int):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef cint32_t ckey = key
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef string citem
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return bytes(citem).decode('UTF-8')

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] itr = __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef cint32_t ckey = key
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] itr = __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef string citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield bytes(citem).decode('UTF-8')

    def items(self):
        if not self:
            return
        cdef __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] itr = __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t ckey = 0
        cdef string citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey, bytes(citem).decode('UTF-8'))

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__std_unordered_map__Map__i32_string()

Mapping.register(std_unordered_map__Map__i32_string)

cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] std_unordered_map__Map__i32_string__make_instance(object items) except *:
    cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] c_inst = make_shared[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, int):
                raise TypeError(f"{key!r} is not of type int")
            key = <cint32_t> key
            if not isinstance(item, str):
                raise TypeError(f"{item!r} is not of type str")

            deref(c_inst)[key] = item.encode('UTF-8')
    return cmove(c_inst)



cdef vector[cint64_t] List__i64__make_instance(object items) except *:
    cdef vector[cint64_t] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint64_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object List__i64__from_cpp(const vector[cint64_t]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return List__i64(py_list, thrift.py3.types._fbthrift_list_private_ctor)

@__cython.auto_pickle(False)
@__cython.final
cdef class Map__binary_i64(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, Map__binary_i64):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<Map__binary_i64> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = Map__binary_i64__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[cmap[string,cint64_t]] c_items):
        __fbthrift_inst = <Map__binary_i64>Map__binary_i64.__new__(Map__binary_i64)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(Map__binary_i64 self):
        cdef shared_ptr[cmap[string,cint64_t]] cpp_obj = make_shared[cmap[string,cint64_t]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Map__binary_i64._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, bytes):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef string ckey = key
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef cint64_t citem = 0
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return citem

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[cmap[string,cint64_t]] itr = __map_iter[cmap[string,cint64_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef string citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield bytes(citem)

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef string ckey = key
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[cmap[string,cint64_t]] itr = __map_iter[cmap[string,cint64_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint64_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def items(self):
        if not self:
            return
        cdef __map_iter[cmap[string,cint64_t]] itr = __map_iter[cmap[string,cint64_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef string ckey
        cdef cint64_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey, citem)

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Map__binary_i64()

Mapping.register(Map__binary_i64)

cdef shared_ptr[cmap[string,cint64_t]] Map__binary_i64__make_instance(object items) except *:
    cdef shared_ptr[cmap[string,cint64_t]] c_inst = make_shared[cmap[string,cint64_t]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, bytes):
                raise TypeError(f"{key!r} is not of type bytes")
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint64_t> item

            deref(c_inst)[key] = item
    return cmove(c_inst)



cdef vector[cint32_t] List__i32__make_instance(object items) except *:
    cdef vector[cint32_t] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object List__i32__from_cpp(const vector[cint32_t]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return List__i32(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef _apache_thrift_fixtures_types_module_cbindings.std_list[cint32_t] std_list__List__i32__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings.std_list[cint32_t] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object std_list__List__i32__from_cpp(const _apache_thrift_fixtures_types_module_cbindings.std_list[cint32_t]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return std_list__List__i32(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef _apache_thrift_fixtures_types_module_cbindings.std_deque[cint32_t] std_deque__List__i32__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings.std_deque[cint32_t] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object std_deque__List__i32__from_cpp(const _apache_thrift_fixtures_types_module_cbindings.std_deque[cint32_t]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return std_deque__List__i32(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef _apache_thrift_fixtures_types_module_cbindings.folly_fbvector[cint32_t] folly_fbvector__List__i32__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings.folly_fbvector[cint32_t] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object folly_fbvector__List__i32__from_cpp(const _apache_thrift_fixtures_types_module_cbindings.folly_fbvector[cint32_t]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return folly_fbvector__List__i32(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef _apache_thrift_fixtures_types_module_cbindings.folly_small_vector[cint32_t] folly_small_vector__List__i32__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings.folly_small_vector[cint32_t] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object folly_small_vector__List__i32__from_cpp(const _apache_thrift_fixtures_types_module_cbindings.folly_small_vector[cint32_t]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return folly_small_vector__List__i32(py_list, thrift.py3.types._fbthrift_list_private_ctor)

@__cython.auto_pickle(False)
@__cython.final
cdef class folly_sorted_vector_set__Set__i32(thrift.py3.types.Set):
    def __init__(self, items=None):
        if isinstance(items, folly_sorted_vector_set__Set__i32):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<folly_sorted_vector_set__Set__i32> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = folly_sorted_vector_set__Set__i32__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]] c_items):
        __fbthrift_inst = <folly_sorted_vector_set__Set__i32>folly_sorted_vector_set__Set__i32.__new__(folly_sorted_vector_set__Set__i32)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(folly_sorted_vector_set__Set__i32 self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return folly_sorted_vector_set__Set__i32._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    def __contains__(self, item):
        if not self or item is None:
            return False
        if not isinstance(item, int):
            return False
        return pbool(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).count(item))


    def __iter__(self):
        if not self:
            return
        cdef __set_iter[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]] itr = __set_iter[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNext(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __hash__(self):
        return super().__hash__()

    def __richcmp__(self, other, int op):
        if isinstance(other, folly_sorted_vector_set__Set__i32):
            # C level comparisons
            return __setcmp(
                self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
                (<folly_sorted_vector_set__Set__i32> other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
                op,
            )
        return self._fbthrift_py_richcmp(other, op)

    cdef _fbthrift_do_set_op(self, other, __cSetOp op):
        if not isinstance(other, folly_sorted_vector_set__Set__i32):
            other = folly_sorted_vector_set__Set__i32(other)
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]] result
        return folly_sorted_vector_set__Set__i32._create_FBTHRIFT_ONLY_DO_NOT_USE(__set_op[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<folly_sorted_vector_set__Set__i32>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ))

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__folly_sorted_vector_set__Set__i32()


Set.register(folly_sorted_vector_set__Set__i32)

cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]] folly_sorted_vector_set__Set__i32__make_instance(object items) except *:
    cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]] c_inst = make_shared[_apache_thrift_fixtures_types_module_cbindings.folly_sorted_vector_set[cint32_t]]()
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            deref(c_inst).insert(item)
    return cmove(c_inst)


@__cython.auto_pickle(False)
@__cython.final
cdef class Map__i32_string(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, Map__i32_string):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<Map__i32_string> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = Map__i32_string__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[cmap[cint32_t,string]] c_items):
        __fbthrift_inst = <Map__i32_string>Map__i32_string.__new__(Map__i32_string)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(Map__i32_string self):
        cdef shared_ptr[cmap[cint32_t,string]] cpp_obj = make_shared[cmap[cint32_t,string]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Map__i32_string._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, int):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef cint32_t ckey = key
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef string citem
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return bytes(citem).decode('UTF-8')

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,string]] itr = __map_iter[cmap[cint32_t,string]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef cint32_t ckey = key
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,string]] itr = __map_iter[cmap[cint32_t,string]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef string citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield bytes(citem).decode('UTF-8')

    def items(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,string]] itr = __map_iter[cmap[cint32_t,string]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t ckey = 0
        cdef string citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey, bytes(citem).decode('UTF-8'))

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Map__i32_string()

Mapping.register(Map__i32_string)

cdef shared_ptr[cmap[cint32_t,string]] Map__i32_string__make_instance(object items) except *:
    cdef shared_ptr[cmap[cint32_t,string]] c_inst = make_shared[cmap[cint32_t,string]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, int):
                raise TypeError(f"{key!r} is not of type int")
            key = <cint32_t> key
            if not isinstance(item, str):
                raise TypeError(f"{item!r} is not of type str")

            deref(c_inst)[key] = item.encode('UTF-8')
    return cmove(c_inst)



cdef _apache_thrift_fixtures_types_module_cbindings.std_list_int32_t std_list_int32_t__List__i32__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings.std_list_int32_t c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            c_inst.push_back(item)
    return cmove(c_inst)

cdef object std_list_int32_t__List__i32__from_cpp(const _apache_thrift_fixtures_types_module_cbindings.std_list_int32_t& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(c_vec[idx])
    return std_list_int32_t__List__i32(py_list, thrift.py3.types._fbthrift_list_private_ctor)

@__cython.auto_pickle(False)
@__cython.final
cdef class Map__string_i32(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, Map__string_i32):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<Map__string_i32> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = Map__string_i32__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[cmap[string,cint32_t]] c_items):
        __fbthrift_inst = <Map__string_i32>Map__string_i32.__new__(Map__string_i32)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(Map__string_i32 self):
        cdef shared_ptr[cmap[string,cint32_t]] cpp_obj = make_shared[cmap[string,cint32_t]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Map__string_i32._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, str):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef string ckey = key.encode('UTF-8')
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef cint32_t citem = 0
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return citem

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[cmap[string,cint32_t]] itr = __map_iter[cmap[string,cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef string citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield bytes(citem).decode('UTF-8')

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef string ckey = key.encode('UTF-8')
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[cmap[string,cint32_t]] itr = __map_iter[cmap[string,cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def items(self):
        if not self:
            return
        cdef __map_iter[cmap[string,cint32_t]] itr = __map_iter[cmap[string,cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef string ckey
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey.data().decode('UTF-8'), citem)

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Map__string_i32()

Mapping.register(Map__string_i32)

cdef shared_ptr[cmap[string,cint32_t]] Map__string_i32__make_instance(object items) except *:
    cdef shared_ptr[cmap[string,cint32_t]] c_inst = make_shared[cmap[string,cint32_t]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, str):
                raise TypeError(f"{key!r} is not of type str")
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item

            deref(c_inst)[key.encode('UTF-8')] = item
    return cmove(c_inst)



cdef vector[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] List__std_unordered_map__Map__i32_string__make_instance(object items) except *:
    cdef vector[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]] c_inst
    if items is not None:
        for item in items:
            if item is None:
                raise TypeError("None is not of the type _typing.Mapping[int, str]")
            if not isinstance(item, std_unordered_map__Map__i32_string):
                item = std_unordered_map__Map__i32_string(item)
            c_inst.push_back(deref((<std_unordered_map__Map__i32_string>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
    return cmove(c_inst)

cdef object List__std_unordered_map__Map__i32_string__from_cpp(const vector[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(std_unordered_map__Map__i32_string._create_FBTHRIFT_ONLY_DO_NOT_USE(make_shared[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,string]](c_vec[idx])))
    return List__std_unordered_map__Map__i32_string(py_list, thrift.py3.types._fbthrift_list_private_ctor)

@__cython.auto_pickle(False)
@__cython.final
cdef class Map__i32_IncompleteMapDep(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, Map__i32_IncompleteMapDep):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<Map__i32_IncompleteMapDep> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = Map__i32_IncompleteMapDep__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] c_items):
        __fbthrift_inst = <Map__i32_IncompleteMapDep>Map__i32_IncompleteMapDep.__new__(Map__i32_IncompleteMapDep)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(Map__i32_IncompleteMapDep self):
        cdef shared_ptr[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] cpp_obj = make_shared[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Map__i32_IncompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, int):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef cint32_t ckey = key
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep] citem
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return IncompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(citem)

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] itr = __map_iter[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef cint32_t ckey = key
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] itr = __map_iter[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep] citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield IncompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(citem)

    def items(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] itr = __map_iter[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t ckey = 0
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep] citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey, IncompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(citem))

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Map__i32_IncompleteMapDep()

Mapping.register(Map__i32_IncompleteMapDep)

cdef shared_ptr[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] Map__i32_IncompleteMapDep__make_instance(object items) except *:
    cdef shared_ptr[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]] c_inst = make_shared[cmap[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cIncompleteMapDep]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, int):
                raise TypeError(f"{key!r} is not of type int")
            key = <cint32_t> key
            if not isinstance(item, IncompleteMapDep):
                raise TypeError(f"{item!r} is not of type IncompleteMapDep")

            deref(c_inst)[key] = deref((<IncompleteMapDep>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
    return cmove(c_inst)


@__cython.auto_pickle(False)
@__cython.final
cdef class std_unordered_map__Map__i32_CompleteMapDep(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, std_unordered_map__Map__i32_CompleteMapDep):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<std_unordered_map__Map__i32_CompleteMapDep> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = std_unordered_map__Map__i32_CompleteMapDep__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] c_items):
        __fbthrift_inst = <std_unordered_map__Map__i32_CompleteMapDep>std_unordered_map__Map__i32_CompleteMapDep.__new__(std_unordered_map__Map__i32_CompleteMapDep)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(std_unordered_map__Map__i32_CompleteMapDep self):
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] cpp_obj = make_shared[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return std_unordered_map__Map__i32_CompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, int):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef cint32_t ckey = key
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep] citem
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return CompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(citem)

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] itr = __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef cint32_t ckey = key
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] itr = __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep] citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield CompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(citem)

    def items(self):
        if not self:
            return
        cdef __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] itr = __map_iter[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t ckey = 0
        cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep] citem
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey, CompleteMapDep._create_FBTHRIFT_ONLY_DO_NOT_USE(citem))

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__std_unordered_map__Map__i32_CompleteMapDep()

Mapping.register(std_unordered_map__Map__i32_CompleteMapDep)

cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] std_unordered_map__Map__i32_CompleteMapDep__make_instance(object items) except *:
    cdef shared_ptr[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]] c_inst = make_shared[_apache_thrift_fixtures_types_module_cbindings.std_unordered_map[cint32_t,_apache_thrift_fixtures_types_module_cbindings.cCompleteMapDep]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, int):
                raise TypeError(f"{key!r} is not of type int")
            key = <cint32_t> key
            if not isinstance(item, CompleteMapDep):
                raise TypeError(f"{item!r} is not of type CompleteMapDep")

            deref(c_inst)[key] = deref((<CompleteMapDep>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
    return cmove(c_inst)



cdef _apache_thrift_fixtures_types_module_cbindings._std_list[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep] _std_list__List__IncompleteListDep__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings._std_list[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, IncompleteListDep):
                raise TypeError(f"{item!r} is not of type IncompleteListDep")
            c_inst.push_back(deref((<IncompleteListDep>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
    return cmove(c_inst)

cdef object _std_list__List__IncompleteListDep__from_cpp(const _apache_thrift_fixtures_types_module_cbindings._std_list[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(IncompleteListDep._create_FBTHRIFT_ONLY_DO_NOT_USE(make_shared[_apache_thrift_fixtures_types_module_cbindings.cIncompleteListDep](c_vec[idx])))
    return _std_list__List__IncompleteListDep(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef _apache_thrift_fixtures_types_module_cbindings.folly_small_vector[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep] folly_small_vector__List__CompleteListDep__make_instance(object items) except *:
    cdef _apache_thrift_fixtures_types_module_cbindings.folly_small_vector[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, CompleteListDep):
                raise TypeError(f"{item!r} is not of type CompleteListDep")
            c_inst.push_back(deref((<CompleteListDep>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
    return cmove(c_inst)

cdef object folly_small_vector__List__CompleteListDep__from_cpp(const _apache_thrift_fixtures_types_module_cbindings.folly_small_vector[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(CompleteListDep._create_FBTHRIFT_ONLY_DO_NOT_USE(make_shared[_apache_thrift_fixtures_types_module_cbindings.cCompleteListDep](c_vec[idx])))
    return folly_small_vector__List__CompleteListDep(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef vector[_apache_thrift_fixtures_types_module_cbindings.cAdaptedListDep] List__AdaptedListDep__make_instance(object items) except *:
    cdef vector[_apache_thrift_fixtures_types_module_cbindings.cAdaptedListDep] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, AdaptedListDep):
                raise TypeError(f"{item!r} is not of type AdaptedListDep")
            c_inst.push_back(deref((<AdaptedListDep>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
    return cmove(c_inst)

cdef object List__AdaptedListDep__from_cpp(const vector[_apache_thrift_fixtures_types_module_cbindings.cAdaptedListDep]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(AdaptedListDep._create_FBTHRIFT_ONLY_DO_NOT_USE(make_shared[_apache_thrift_fixtures_types_module_cbindings.cAdaptedListDep](c_vec[idx])))
    return List__AdaptedListDep(py_list, thrift.py3.types._fbthrift_list_private_ctor)


cdef vector[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedListDep] List__DependentAdaptedListDep__make_instance(object items) except *:
    cdef vector[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedListDep] c_inst
    if items is not None:
        for item in items:
            if not isinstance(item, DependentAdaptedListDep):
                raise TypeError(f"{item!r} is not of type DependentAdaptedListDep")
            c_inst.push_back(deref((<DependentAdaptedListDep>item)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
    return cmove(c_inst)

cdef object List__DependentAdaptedListDep__from_cpp(const vector[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedListDep]& c_vec) except *:
    cdef list py_list = []
    cdef int idx = 0
    for idx in range(c_vec.size()):
        py_list.append(DependentAdaptedListDep._create_FBTHRIFT_ONLY_DO_NOT_USE(make_shared[_apache_thrift_fixtures_types_module_cbindings.cDependentAdaptedListDep](c_vec[idx])))
    return List__DependentAdaptedListDep(py_list, thrift.py3.types._fbthrift_list_private_ctor)

@__cython.auto_pickle(False)
@__cython.final
cdef class Set__i32(thrift.py3.types.Set):
    def __init__(self, items=None):
        if isinstance(items, Set__i32):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<Set__i32> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = Set__i32__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[cset[cint32_t]] c_items):
        __fbthrift_inst = <Set__i32>Set__i32.__new__(Set__i32)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(Set__i32 self):
        cdef shared_ptr[cset[cint32_t]] cpp_obj = make_shared[cset[cint32_t]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Set__i32._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    def __contains__(self, item):
        if not self or item is None:
            return False
        if not isinstance(item, int):
            return False
        return pbool(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).count(item))


    def __iter__(self):
        if not self:
            return
        cdef __set_iter[cset[cint32_t]] itr = __set_iter[cset[cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNext(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __hash__(self):
        return super().__hash__()

    def __richcmp__(self, other, int op):
        if isinstance(other, Set__i32):
            # C level comparisons
            return __setcmp(
                self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
                (<Set__i32> other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
                op,
            )
        return self._fbthrift_py_richcmp(other, op)

    cdef _fbthrift_do_set_op(self, other, __cSetOp op):
        if not isinstance(other, Set__i32):
            other = Set__i32(other)
        cdef shared_ptr[cset[cint32_t]] result
        return Set__i32._create_FBTHRIFT_ONLY_DO_NOT_USE(__set_op[cset[cint32_t]](
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            (<Set__i32>other)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE,
            op,
        ))

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Set__i32()


Set.register(Set__i32)

cdef shared_ptr[cset[cint32_t]] Set__i32__make_instance(object items) except *:
    cdef shared_ptr[cset[cint32_t]] c_inst = make_shared[cset[cint32_t]]()
    if items is not None:
        for item in items:
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item
            deref(c_inst).insert(item)
    return cmove(c_inst)


@__cython.auto_pickle(False)
@__cython.final
cdef class Map__i32_i32(thrift.py3.types.Map):
    def __init__(self, items=None):
        if isinstance(items, Map__i32_i32):
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = (<Map__i32_i32> items)._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE
        else:
            self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = Map__i32_i32__make_instance(items)

    @staticmethod
    cdef _create_FBTHRIFT_ONLY_DO_NOT_USE(shared_ptr[cmap[cint32_t,cint32_t]] c_items):
        __fbthrift_inst = <Map__i32_i32>Map__i32_i32.__new__(Map__i32_i32)
        __fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = cmove(c_items)
        return __fbthrift_inst

    def __copy__(Map__i32_i32 self):
        cdef shared_ptr[cmap[cint32_t,cint32_t]] cpp_obj = make_shared[cmap[cint32_t,cint32_t]](
            deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        )
        return Map__i32_i32._create_FBTHRIFT_ONLY_DO_NOT_USE(cmove(cpp_obj))

    def __len__(self):
        return deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()

    cdef _check_key_type(self, key):
        if not self or key is None:
            return
        if isinstance(key, int):
            return key

    def __getitem__(self, key):
        err = KeyError(f'{key}')
        key = self._check_key_type(key)
        if key is None:
            raise err
        cdef cint32_t ckey = key
        if not __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey):
            raise err
        cdef cint32_t citem = 0
        __map_getitem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
        return citem

    def __iter__(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,cint32_t]] itr = __map_iter[cmap[cint32_t,cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextKey(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def __contains__(self, key):
        key = self._check_key_type(key)
        if key is None:
            return False
        cdef cint32_t ckey = key
        return __map_contains(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey)

    def values(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,cint32_t]] itr = __map_iter[cmap[cint32_t,cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextValue(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, citem)
            yield citem

    def items(self):
        if not self:
            return
        cdef __map_iter[cmap[cint32_t,cint32_t]] itr = __map_iter[cmap[cint32_t,cint32_t]](self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE)
        cdef cint32_t ckey = 0
        cdef cint32_t citem = 0
        for i in range(deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE).size()):
            itr.genNextItem(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE, ckey, citem)
            yield (ckey, citem)

    @staticmethod
    def __get_reflection__():
        return get_types_reflection().get_reflection__Map__i32_i32()

Mapping.register(Map__i32_i32)

cdef shared_ptr[cmap[cint32_t,cint32_t]] Map__i32_i32__make_instance(object items) except *:
    cdef shared_ptr[cmap[cint32_t,cint32_t]] c_inst = make_shared[cmap[cint32_t,cint32_t]]()
    if items is not None:
        for key, item in items.items():
            if not isinstance(key, int):
                raise TypeError(f"{key!r} is not of type int")
            key = <cint32_t> key
            if not isinstance(item, int):
                raise TypeError(f"{item!r} is not of type int")
            item = <cint32_t> item

            deref(c_inst)[key] = item
    return cmove(c_inst)



TBinary = bytes
IntTypedef = int
UintTypedef = int
SomeListOfTypeMap_2468 = List__std_unordered_map__Map__i32_string
TBinary_8623 = bytes
i32_9314 = int
list_i32_9187 = List__i32
map_i32_i32_9565 = Map__i32_i32
map_i32_string_1261 = Map__i32_string
set_i32_7070 = Set__i32
set_i32_7194 = folly_sorted_vector_set__Set__i32
string_5252 = str
