// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-alpha.6

#include "pybase.h"
#include "py.Windows.Devices.Bluetooth.Advertisement.h"

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData>::python_type;

namespace py::cpp::Windows::Devices::Bluetooth::Advertisement
{
    // ----- BluetoothLEAdvertisement class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisement = "BluetoothLEAdvertisement";

    static PyObject* _new_BluetoothLEAdvertisement(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEAdvertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisement_GetManufacturerDataByCompanyId(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<uint16_t>(args, 0);

                return py::convert(self->obj.GetManufacturerDataByCompanyId(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisement_GetSectionsByType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<uint8_t>(args, 0);

                return py::convert(self->obj.GetSectionsByType(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisement_get_LocalName(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.LocalName());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisement_put_LocalName(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.LocalName(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisement_get_Flags(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Flags());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisement_put_Flags(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::IReference<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFlags>>(arg);

            self->obj.Flags(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisement_get_DataSections(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.DataSections());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisement_get_ManufacturerData(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.ManufacturerData());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisement_get_ServiceUuids(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.ServiceUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisement(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisement[] = {
        { "get_manufacturer_data_by_company_id", (PyCFunction)BluetoothLEAdvertisement_GetManufacturerDataByCompanyId, METH_VARARGS, nullptr },
        { "get_sections_by_type", (PyCFunction)BluetoothLEAdvertisement_GetSectionsByType, METH_VARARGS, nullptr },
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisement, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisement[] = {
        { const_cast<char*>("local_name"), (getter)BluetoothLEAdvertisement_get_LocalName, (setter)BluetoothLEAdvertisement_put_LocalName, nullptr, nullptr },
        { const_cast<char*>("flags"), (getter)BluetoothLEAdvertisement_get_Flags, (setter)BluetoothLEAdvertisement_put_Flags, nullptr, nullptr },
        { const_cast<char*>("data_sections"), (getter)BluetoothLEAdvertisement_get_DataSections, nullptr, nullptr, nullptr },
        { const_cast<char*>("manufacturer_data"), (getter)BluetoothLEAdvertisement_get_ManufacturerData, nullptr, nullptr, nullptr },
        { const_cast<char*>("service_uuids"), (getter)BluetoothLEAdvertisement_get_ServiceUuids, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisement[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisement },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisement },
        { Py_tp_methods, _methods_BluetoothLEAdvertisement },
        { Py_tp_getset, _getset_BluetoothLEAdvertisement },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisement =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisement",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisement
    };

    // ----- BluetoothLEAdvertisementBytePattern class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementBytePattern = "BluetoothLEAdvertisementBytePattern";

    static PyObject* _new_BluetoothLEAdvertisementBytePattern(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            try
            {
                auto param0 = py::convert_to<uint8_t>(args, 0);
                auto param1 = py::convert_to<int16_t>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 2);

                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern instance{ param0, param1, param2 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEAdvertisementBytePattern(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementBytePattern_get_Offset(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Offset());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementBytePattern_put_Offset(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<int16_t>(arg);

            self->obj.Offset(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementBytePattern_get_DataType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.DataType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementBytePattern_put_DataType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<uint8_t>(arg);

            self->obj.DataType(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementBytePattern_get_Data(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Data());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementBytePattern_put_Data(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(arg);

            self->obj.Data(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementBytePattern(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementBytePattern[] = {
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementBytePattern, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementBytePattern[] = {
        { const_cast<char*>("offset"), (getter)BluetoothLEAdvertisementBytePattern_get_Offset, (setter)BluetoothLEAdvertisementBytePattern_put_Offset, nullptr, nullptr },
        { const_cast<char*>("data_type"), (getter)BluetoothLEAdvertisementBytePattern_get_DataType, (setter)BluetoothLEAdvertisementBytePattern_put_DataType, nullptr, nullptr },
        { const_cast<char*>("data"), (getter)BluetoothLEAdvertisementBytePattern_get_Data, (setter)BluetoothLEAdvertisementBytePattern_put_Data, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementBytePattern[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementBytePattern },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementBytePattern },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementBytePattern },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementBytePattern },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementBytePattern =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementBytePattern",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementBytePattern
    };

    // ----- BluetoothLEAdvertisementDataSection class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementDataSection = "BluetoothLEAdvertisementDataSection";

    static PyObject* _new_BluetoothLEAdvertisementDataSection(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<uint8_t>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 1);

                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEAdvertisementDataSection(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementDataSection_get_DataType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.DataType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementDataSection_put_DataType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<uint8_t>(arg);

            self->obj.DataType(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataSection_get_Data(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Data());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementDataSection_put_Data(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(arg);

            self->obj.Data(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementDataSection(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementDataSection[] = {
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementDataSection, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementDataSection[] = {
        { const_cast<char*>("data_type"), (getter)BluetoothLEAdvertisementDataSection_get_DataType, (setter)BluetoothLEAdvertisementDataSection_put_DataType, nullptr, nullptr },
        { const_cast<char*>("data"), (getter)BluetoothLEAdvertisementDataSection_get_Data, (setter)BluetoothLEAdvertisementDataSection_put_Data, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementDataSection[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementDataSection },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementDataSection },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementDataSection },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementDataSection },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementDataSection =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementDataSection",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementDataSection
    };

    // ----- BluetoothLEAdvertisementDataTypes class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementDataTypes = "BluetoothLEAdvertisementDataTypes";

    static PyObject* _new_BluetoothLEAdvertisementDataTypes(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(_type_name_BluetoothLEAdvertisementDataTypes);
        return nullptr;
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_AdvertisingInterval(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::AdvertisingInterval());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_Appearance(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::Appearance());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_CompleteLocalName(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::CompleteLocalName());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_CompleteService128BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::CompleteService128BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_CompleteService16BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::CompleteService16BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_CompleteService32BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::CompleteService32BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_Flags(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::Flags());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_IncompleteService128BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::IncompleteService128BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_IncompleteService16BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::IncompleteService16BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_IncompleteService32BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::IncompleteService32BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ManufacturerSpecificData(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ManufacturerSpecificData());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_PublicTargetAddress(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::PublicTargetAddress());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_RandomTargetAddress(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::RandomTargetAddress());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ServiceData128BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ServiceData128BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ServiceData16BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ServiceData16BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ServiceData32BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ServiceData32BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ServiceSolicitation128BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ServiceSolicitation128BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ServiceSolicitation16BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ServiceSolicitation16BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ServiceSolicitation32BitUuids(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ServiceSolicitation32BitUuids());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_ShortenedLocalName(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::ShortenedLocalName());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_SlaveConnectionIntervalRange(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::SlaveConnectionIntervalRange());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementDataTypes_get_TxPowerLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes::TxPowerLevel());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementDataTypes[] = {
        { "get_advertising_interval", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_AdvertisingInterval, METH_NOARGS | METH_STATIC, nullptr },
        { "get_appearance", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_Appearance, METH_NOARGS | METH_STATIC, nullptr },
        { "get_complete_local_name", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_CompleteLocalName, METH_NOARGS | METH_STATIC, nullptr },
        { "get_complete_service128_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_CompleteService128BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_complete_service16_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_CompleteService16BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_complete_service32_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_CompleteService32BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_flags", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_Flags, METH_NOARGS | METH_STATIC, nullptr },
        { "get_incomplete_service128_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_IncompleteService128BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_incomplete_service16_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_IncompleteService16BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_incomplete_service32_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_IncompleteService32BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_manufacturer_specific_data", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ManufacturerSpecificData, METH_NOARGS | METH_STATIC, nullptr },
        { "get_public_target_address", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_PublicTargetAddress, METH_NOARGS | METH_STATIC, nullptr },
        { "get_random_target_address", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_RandomTargetAddress, METH_NOARGS | METH_STATIC, nullptr },
        { "get_service_data128_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ServiceData128BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_service_data16_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ServiceData16BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_service_data32_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ServiceData32BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_service_solicitation128_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ServiceSolicitation128BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_service_solicitation16_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ServiceSolicitation16BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_service_solicitation32_bit_uuids", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ServiceSolicitation32BitUuids, METH_NOARGS | METH_STATIC, nullptr },
        { "get_shortened_local_name", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_ShortenedLocalName, METH_NOARGS | METH_STATIC, nullptr },
        { "get_slave_connection_interval_range", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_SlaveConnectionIntervalRange, METH_NOARGS | METH_STATIC, nullptr },
        { "get_tx_power_level", (PyCFunction)BluetoothLEAdvertisementDataTypes_get_TxPowerLevel, METH_NOARGS | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementDataTypes[] = {
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementDataTypes[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementDataTypes },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementDataTypes },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementDataTypes },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementDataTypes =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementDataTypes",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementDataTypes
    };

    // ----- BluetoothLEAdvertisementFilter class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementFilter = "BluetoothLEAdvertisementFilter";

    static PyObject* _new_BluetoothLEAdvertisementFilter(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEAdvertisementFilter(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementFilter_get_Advertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Advertisement());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementFilter_put_Advertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement>(arg);

            self->obj.Advertisement(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementFilter_get_BytePatterns(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.BytePatterns());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementFilter(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementFilter[] = {
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementFilter, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementFilter[] = {
        { const_cast<char*>("advertisement"), (getter)BluetoothLEAdvertisementFilter_get_Advertisement, (setter)BluetoothLEAdvertisementFilter_put_Advertisement, nullptr, nullptr },
        { const_cast<char*>("byte_patterns"), (getter)BluetoothLEAdvertisementFilter_get_BytePatterns, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementFilter[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementFilter },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementFilter },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementFilter },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementFilter },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementFilter =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementFilter",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementFilter
    };

    // ----- BluetoothLEAdvertisementPublisher class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementPublisher = "BluetoothLEAdvertisementPublisher";

    static PyObject* _new_BluetoothLEAdvertisementPublisher(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement>(args, 0);

                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEAdvertisementPublisher(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementPublisher_Start(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_Stop(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_get_Advertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Advertisement());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_get_Status(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Status());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_get_UseExtendedAdvertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.UseExtendedAdvertisement());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementPublisher_put_UseExtendedAdvertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<bool>(arg);

            self->obj.UseExtendedAdvertisement(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_get_PreferredTransmitPowerLevelInDBm(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.PreferredTransmitPowerLevelInDBm());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementPublisher_put_PreferredTransmitPowerLevelInDBm(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::IReference<int16_t>>(arg);

            self->obj.PreferredTransmitPowerLevelInDBm(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_get_IsAnonymous(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsAnonymous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementPublisher_put_IsAnonymous(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<bool>(arg);

            self->obj.IsAnonymous(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_get_IncludeTransmitPowerLevel(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IncludeTransmitPowerLevel());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementPublisher_put_IncludeTransmitPowerLevel(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<bool>(arg);

            self->obj.IncludeTransmitPowerLevel(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_add_StatusChanged(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher, winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs>>(arg);

            return py::convert(self->obj.StatusChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisher_remove_StatusChanged(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.StatusChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementPublisher(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementPublisher[] = {
        { "start", (PyCFunction)BluetoothLEAdvertisementPublisher_Start, METH_VARARGS, nullptr },
        { "stop", (PyCFunction)BluetoothLEAdvertisementPublisher_Stop, METH_VARARGS, nullptr },
        { "add_status_changed", (PyCFunction)BluetoothLEAdvertisementPublisher_add_StatusChanged, METH_O, nullptr },
        { "remove_status_changed", (PyCFunction)BluetoothLEAdvertisementPublisher_remove_StatusChanged, METH_O, nullptr },
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementPublisher, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementPublisher[] = {
        { const_cast<char*>("advertisement"), (getter)BluetoothLEAdvertisementPublisher_get_Advertisement, nullptr, nullptr, nullptr },
        { const_cast<char*>("status"), (getter)BluetoothLEAdvertisementPublisher_get_Status, nullptr, nullptr, nullptr },
        { const_cast<char*>("use_extended_advertisement"), (getter)BluetoothLEAdvertisementPublisher_get_UseExtendedAdvertisement, (setter)BluetoothLEAdvertisementPublisher_put_UseExtendedAdvertisement, nullptr, nullptr },
        { const_cast<char*>("preferred_transmit_power_level_in_d_bm"), (getter)BluetoothLEAdvertisementPublisher_get_PreferredTransmitPowerLevelInDBm, (setter)BluetoothLEAdvertisementPublisher_put_PreferredTransmitPowerLevelInDBm, nullptr, nullptr },
        { const_cast<char*>("is_anonymous"), (getter)BluetoothLEAdvertisementPublisher_get_IsAnonymous, (setter)BluetoothLEAdvertisementPublisher_put_IsAnonymous, nullptr, nullptr },
        { const_cast<char*>("include_transmit_power_level"), (getter)BluetoothLEAdvertisementPublisher_get_IncludeTransmitPowerLevel, (setter)BluetoothLEAdvertisementPublisher_put_IncludeTransmitPowerLevel, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementPublisher[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementPublisher },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementPublisher },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementPublisher },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementPublisher },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementPublisher =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementPublisher",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementPublisher
    };

    // ----- BluetoothLEAdvertisementPublisherStatusChangedEventArgs class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementPublisherStatusChangedEventArgs = "BluetoothLEAdvertisementPublisherStatusChangedEventArgs";

    static PyObject* _new_BluetoothLEAdvertisementPublisherStatusChangedEventArgs(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(_type_name_BluetoothLEAdvertisementPublisherStatusChangedEventArgs);
        return nullptr;
    }

    static void _dealloc_BluetoothLEAdvertisementPublisherStatusChangedEventArgs(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementPublisherStatusChangedEventArgs_get_Error(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Error());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisherStatusChangedEventArgs_get_Status(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Status());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementPublisherStatusChangedEventArgs_get_SelectedTransmitPowerLevelInDBm(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.SelectedTransmitPowerLevelInDBm());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementPublisherStatusChangedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementPublisherStatusChangedEventArgs[] = {
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementPublisherStatusChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementPublisherStatusChangedEventArgs[] = {
        { const_cast<char*>("error"), (getter)BluetoothLEAdvertisementPublisherStatusChangedEventArgs_get_Error, nullptr, nullptr, nullptr },
        { const_cast<char*>("status"), (getter)BluetoothLEAdvertisementPublisherStatusChangedEventArgs_get_Status, nullptr, nullptr, nullptr },
        { const_cast<char*>("selected_transmit_power_level_in_d_bm"), (getter)BluetoothLEAdvertisementPublisherStatusChangedEventArgs_get_SelectedTransmitPowerLevelInDBm, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementPublisherStatusChangedEventArgs[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementPublisherStatusChangedEventArgs },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementPublisherStatusChangedEventArgs },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementPublisherStatusChangedEventArgs },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementPublisherStatusChangedEventArgs },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementPublisherStatusChangedEventArgs =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementPublisherStatusChangedEventArgs",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementPublisherStatusChangedEventArgs
    };

    // ----- BluetoothLEAdvertisementReceivedEventArgs class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementReceivedEventArgs = "BluetoothLEAdvertisementReceivedEventArgs";

    static PyObject* _new_BluetoothLEAdvertisementReceivedEventArgs(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(_type_name_BluetoothLEAdvertisementReceivedEventArgs);
        return nullptr;
    }

    static void _dealloc_BluetoothLEAdvertisementReceivedEventArgs(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_Advertisement(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Advertisement());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_AdvertisementType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.AdvertisementType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_BluetoothAddress(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.BluetoothAddress());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_RawSignalStrengthInDBm(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.RawSignalStrengthInDBm());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_Timestamp(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Timestamp());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_BluetoothAddressType(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.BluetoothAddressType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_IsAnonymous(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsAnonymous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_IsConnectable(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsConnectable());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_IsDirected(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsDirected());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_IsScanResponse(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsScanResponse());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_IsScannable(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsScannable());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementReceivedEventArgs_get_TransmitPowerLevelInDBm(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.TransmitPowerLevelInDBm());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementReceivedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementReceivedEventArgs[] = {
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementReceivedEventArgs, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementReceivedEventArgs[] = {
        { const_cast<char*>("advertisement"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_Advertisement, nullptr, nullptr, nullptr },
        { const_cast<char*>("advertisement_type"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_AdvertisementType, nullptr, nullptr, nullptr },
        { const_cast<char*>("bluetooth_address"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_BluetoothAddress, nullptr, nullptr, nullptr },
        { const_cast<char*>("raw_signal_strength_in_d_bm"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_RawSignalStrengthInDBm, nullptr, nullptr, nullptr },
        { const_cast<char*>("timestamp"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_Timestamp, nullptr, nullptr, nullptr },
        { const_cast<char*>("bluetooth_address_type"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_BluetoothAddressType, nullptr, nullptr, nullptr },
        { const_cast<char*>("is_anonymous"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_IsAnonymous, nullptr, nullptr, nullptr },
        { const_cast<char*>("is_connectable"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_IsConnectable, nullptr, nullptr, nullptr },
        { const_cast<char*>("is_directed"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_IsDirected, nullptr, nullptr, nullptr },
        { const_cast<char*>("is_scan_response"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_IsScanResponse, nullptr, nullptr, nullptr },
        { const_cast<char*>("is_scannable"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_IsScannable, nullptr, nullptr, nullptr },
        { const_cast<char*>("transmit_power_level_in_d_bm"), (getter)BluetoothLEAdvertisementReceivedEventArgs_get_TransmitPowerLevelInDBm, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementReceivedEventArgs[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementReceivedEventArgs },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementReceivedEventArgs },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementReceivedEventArgs },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementReceivedEventArgs },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementReceivedEventArgs =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementReceivedEventArgs",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementReceivedEventArgs
    };

    // ----- BluetoothLEAdvertisementWatcher class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementWatcher = "BluetoothLEAdvertisementWatcher";

    static PyObject* _new_BluetoothLEAdvertisementWatcher(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter>(args, 0);

                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEAdvertisementWatcher(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementWatcher_Start(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_Stop(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_SignalStrengthFilter(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.SignalStrengthFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementWatcher_put_SignalStrengthFilter(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter>(arg);

            self->obj.SignalStrengthFilter(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_ScanningMode(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.ScanningMode());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementWatcher_put_ScanningMode(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEScanningMode>(arg);

            self->obj.ScanningMode(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_AdvertisementFilter(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.AdvertisementFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementWatcher_put_AdvertisementFilter(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter>(arg);

            self->obj.AdvertisementFilter(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_MaxOutOfRangeTimeout(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.MaxOutOfRangeTimeout());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_MaxSamplingInterval(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.MaxSamplingInterval());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_MinOutOfRangeTimeout(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.MinOutOfRangeTimeout());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_MinSamplingInterval(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.MinSamplingInterval());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_Status(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Status());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_get_AllowExtendedAdvertisements(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.AllowExtendedAdvertisements());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEAdvertisementWatcher_put_AllowExtendedAdvertisements(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<bool>(arg);

            self->obj.AllowExtendedAdvertisements(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_add_Received(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher, winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>>(arg);

            return py::convert(self->obj.Received(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_remove_Received(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.Received(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_add_Stopped(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher, winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs>>(arg);

            return py::convert(self->obj.Stopped(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* BluetoothLEAdvertisementWatcher_remove_Stopped(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.Stopped(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementWatcher(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementWatcher[] = {
        { "start", (PyCFunction)BluetoothLEAdvertisementWatcher_Start, METH_VARARGS, nullptr },
        { "stop", (PyCFunction)BluetoothLEAdvertisementWatcher_Stop, METH_VARARGS, nullptr },
        { "add_received", (PyCFunction)BluetoothLEAdvertisementWatcher_add_Received, METH_O, nullptr },
        { "remove_received", (PyCFunction)BluetoothLEAdvertisementWatcher_remove_Received, METH_O, nullptr },
        { "add_stopped", (PyCFunction)BluetoothLEAdvertisementWatcher_add_Stopped, METH_O, nullptr },
        { "remove_stopped", (PyCFunction)BluetoothLEAdvertisementWatcher_remove_Stopped, METH_O, nullptr },
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementWatcher, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementWatcher[] = {
        { const_cast<char*>("signal_strength_filter"), (getter)BluetoothLEAdvertisementWatcher_get_SignalStrengthFilter, (setter)BluetoothLEAdvertisementWatcher_put_SignalStrengthFilter, nullptr, nullptr },
        { const_cast<char*>("scanning_mode"), (getter)BluetoothLEAdvertisementWatcher_get_ScanningMode, (setter)BluetoothLEAdvertisementWatcher_put_ScanningMode, nullptr, nullptr },
        { const_cast<char*>("advertisement_filter"), (getter)BluetoothLEAdvertisementWatcher_get_AdvertisementFilter, (setter)BluetoothLEAdvertisementWatcher_put_AdvertisementFilter, nullptr, nullptr },
        { const_cast<char*>("max_out_of_range_timeout"), (getter)BluetoothLEAdvertisementWatcher_get_MaxOutOfRangeTimeout, nullptr, nullptr, nullptr },
        { const_cast<char*>("max_sampling_interval"), (getter)BluetoothLEAdvertisementWatcher_get_MaxSamplingInterval, nullptr, nullptr, nullptr },
        { const_cast<char*>("min_out_of_range_timeout"), (getter)BluetoothLEAdvertisementWatcher_get_MinOutOfRangeTimeout, nullptr, nullptr, nullptr },
        { const_cast<char*>("min_sampling_interval"), (getter)BluetoothLEAdvertisementWatcher_get_MinSamplingInterval, nullptr, nullptr, nullptr },
        { const_cast<char*>("status"), (getter)BluetoothLEAdvertisementWatcher_get_Status, nullptr, nullptr, nullptr },
        { const_cast<char*>("allow_extended_advertisements"), (getter)BluetoothLEAdvertisementWatcher_get_AllowExtendedAdvertisements, (setter)BluetoothLEAdvertisementWatcher_put_AllowExtendedAdvertisements, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementWatcher[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementWatcher },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementWatcher },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementWatcher },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementWatcher },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementWatcher =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementWatcher",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementWatcher
    };

    // ----- BluetoothLEAdvertisementWatcherStoppedEventArgs class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementWatcherStoppedEventArgs = "BluetoothLEAdvertisementWatcherStoppedEventArgs";

    static PyObject* _new_BluetoothLEAdvertisementWatcherStoppedEventArgs(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(_type_name_BluetoothLEAdvertisementWatcherStoppedEventArgs);
        return nullptr;
    }

    static void _dealloc_BluetoothLEAdvertisementWatcherStoppedEventArgs(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEAdvertisementWatcherStoppedEventArgs_get_Error(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Error());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_BluetoothLEAdvertisementWatcherStoppedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementWatcherStoppedEventArgs[] = {
        { "_from", (PyCFunction)_from_BluetoothLEAdvertisementWatcherStoppedEventArgs, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementWatcherStoppedEventArgs[] = {
        { const_cast<char*>("error"), (getter)BluetoothLEAdvertisementWatcherStoppedEventArgs_get_Error, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementWatcherStoppedEventArgs[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementWatcherStoppedEventArgs },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementWatcherStoppedEventArgs },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementWatcherStoppedEventArgs },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementWatcherStoppedEventArgs },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementWatcherStoppedEventArgs =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEAdvertisementWatcherStoppedEventArgs",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementWatcherStoppedEventArgs
    };

    // ----- BluetoothLEManufacturerData class --------------------
    constexpr const char* const _type_name_BluetoothLEManufacturerData = "BluetoothLEManufacturerData";

    static PyObject* _new_BluetoothLEManufacturerData(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        Py_ssize_t arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<uint16_t>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 1);

                winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_BluetoothLEManufacturerData(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* BluetoothLEManufacturerData_get_Data(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Data());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEManufacturerData_put_Data(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(arg);

            self->obj.Data(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* BluetoothLEManufacturerData_get_CompanyId(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.CompanyId());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int BluetoothLEManufacturerData_put_CompanyId(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<uint16_t>(arg);

            self->obj.CompanyId(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _from_BluetoothLEManufacturerData(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEManufacturerData[] = {
        { "_from", (PyCFunction)_from_BluetoothLEManufacturerData, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_BluetoothLEManufacturerData[] = {
        { const_cast<char*>("data"), (getter)BluetoothLEManufacturerData_get_Data, (setter)BluetoothLEManufacturerData_put_Data, nullptr, nullptr },
        { const_cast<char*>("company_id"), (getter)BluetoothLEManufacturerData_get_CompanyId, (setter)BluetoothLEManufacturerData_put_CompanyId, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_BluetoothLEManufacturerData[] = 
    {
        { Py_tp_new, _new_BluetoothLEManufacturerData },
        { Py_tp_dealloc, _dealloc_BluetoothLEManufacturerData },
        { Py_tp_methods, _methods_BluetoothLEManufacturerData },
        { Py_tp_getset, _getset_BluetoothLEManufacturerData },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_BluetoothLEManufacturerData =
    {
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement.BluetoothLEManufacturerData",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEManufacturerData
    };

    // ----- Windows.Devices.Bluetooth.Advertisement Initialization --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::winrt_base>::python_type) };

            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisement, &_type_spec_BluetoothLEAdvertisement, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementBytePattern, &_type_spec_BluetoothLEAdvertisementBytePattern, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementDataSection, &_type_spec_BluetoothLEAdvertisementDataSection, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataTypes>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementDataTypes, &_type_spec_BluetoothLEAdvertisementDataTypes, nullptr);
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementFilter, &_type_spec_BluetoothLEAdvertisementFilter, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementPublisher, &_type_spec_BluetoothLEAdvertisementPublisher, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementPublisherStatusChangedEventArgs, &_type_spec_BluetoothLEAdvertisementPublisherStatusChangedEventArgs, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementReceivedEventArgs, &_type_spec_BluetoothLEAdvertisementReceivedEventArgs, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementWatcher, &_type_spec_BluetoothLEAdvertisementWatcher, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementWatcherStoppedEventArgs, &_type_spec_BluetoothLEAdvertisementWatcherStoppedEventArgs, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData>::python_type = py::register_python_type(module, _type_name_BluetoothLEManufacturerData, &_type_spec_BluetoothLEManufacturerData, bases.get());

            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyModuleDef_Slot module_slots[] = {
        {Py_mod_exec, module_exec},
        {0, nullptr}
    };

    PyDoc_STRVAR(module_doc, "Windows.Devices.Bluetooth.Advertisement");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_bleak_winrt_Windows_Devices_Bluetooth_Advertisement",
        module_doc,
        0,
        nullptr,
        module_slots,
        nullptr,
        nullptr,
        nullptr
    };
} // py::cpp::Windows::Devices::Bluetooth::Advertisement

PyMODINIT_FUNC
PyInit__bleak_winrt_Windows_Devices_Bluetooth_Advertisement (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::Devices::Bluetooth::Advertisement::module_def);
}
