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

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

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementPublisherTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementWatcherTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::GattCharacteristicNotificationTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::RfcommConnectionTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation>::python_type;

namespace py::cpp::Windows::Devices::Bluetooth::Background
{
    // ----- BluetoothLEAdvertisementPublisherTriggerDetails class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementPublisherTriggerDetails = "BluetoothLEAdvertisementPublisherTriggerDetails";

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

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

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

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

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

    static PyObject* _from_BluetoothLEAdvertisementPublisherTriggerDetails(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::Background::BluetoothLEAdvertisementPublisherTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementPublisherTriggerDetails[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_BluetoothLEAdvertisementPublisherTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementPublisherTriggerDetails[] = {
        { "error", reinterpret_cast<getter>(BluetoothLEAdvertisementPublisherTriggerDetails_get_Error), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(BluetoothLEAdvertisementPublisherTriggerDetails_get_Status), nullptr, nullptr, nullptr },
        { "selected_transmit_power_level_in_d_bm", reinterpret_cast<getter>(BluetoothLEAdvertisementPublisherTriggerDetails_get_SelectedTransmitPowerLevelInDBm), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementPublisherTriggerDetails[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementPublisherTriggerDetails },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementPublisherTriggerDetails },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementPublisherTriggerDetails },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementPublisherTriggerDetails },
        { },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementPublisherTriggerDetails =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.BluetoothLEAdvertisementPublisherTriggerDetails",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementPublisherTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementPublisherTriggerDetails
    };

    // ----- BluetoothLEAdvertisementWatcherTriggerDetails class --------------------
    constexpr const char* const _type_name_BluetoothLEAdvertisementWatcherTriggerDetails = "BluetoothLEAdvertisementWatcherTriggerDetails";

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

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

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

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

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

    static PyObject* _from_BluetoothLEAdvertisementWatcherTriggerDetails(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::Background::BluetoothLEAdvertisementWatcherTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BluetoothLEAdvertisementWatcherTriggerDetails[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_BluetoothLEAdvertisementWatcherTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_BluetoothLEAdvertisementWatcherTriggerDetails[] = {
        { "advertisements", reinterpret_cast<getter>(BluetoothLEAdvertisementWatcherTriggerDetails_get_Advertisements), nullptr, nullptr, nullptr },
        { "error", reinterpret_cast<getter>(BluetoothLEAdvertisementWatcherTriggerDetails_get_Error), nullptr, nullptr, nullptr },
        { "signal_strength_filter", reinterpret_cast<getter>(BluetoothLEAdvertisementWatcherTriggerDetails_get_SignalStrengthFilter), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_BluetoothLEAdvertisementWatcherTriggerDetails[] = 
    {
        { Py_tp_new, _new_BluetoothLEAdvertisementWatcherTriggerDetails },
        { Py_tp_dealloc, _dealloc_BluetoothLEAdvertisementWatcherTriggerDetails },
        { Py_tp_methods, _methods_BluetoothLEAdvertisementWatcherTriggerDetails },
        { Py_tp_getset, _getset_BluetoothLEAdvertisementWatcherTriggerDetails },
        { },
    };

    static PyType_Spec _type_spec_BluetoothLEAdvertisementWatcherTriggerDetails =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.BluetoothLEAdvertisementWatcherTriggerDetails",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementWatcherTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BluetoothLEAdvertisementWatcherTriggerDetails
    };

    // ----- GattCharacteristicNotificationTriggerDetails class --------------------
    constexpr const char* const _type_name_GattCharacteristicNotificationTriggerDetails = "GattCharacteristicNotificationTriggerDetails";

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

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

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

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

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

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

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

    static PyObject* _from_GattCharacteristicNotificationTriggerDetails(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::Background::GattCharacteristicNotificationTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_GattCharacteristicNotificationTriggerDetails[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_GattCharacteristicNotificationTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_GattCharacteristicNotificationTriggerDetails[] = {
        { "characteristic", reinterpret_cast<getter>(GattCharacteristicNotificationTriggerDetails_get_Characteristic), nullptr, nullptr, nullptr },
        { "value", reinterpret_cast<getter>(GattCharacteristicNotificationTriggerDetails_get_Value), nullptr, nullptr, nullptr },
        { "error", reinterpret_cast<getter>(GattCharacteristicNotificationTriggerDetails_get_Error), nullptr, nullptr, nullptr },
        { "event_triggering_mode", reinterpret_cast<getter>(GattCharacteristicNotificationTriggerDetails_get_EventTriggeringMode), nullptr, nullptr, nullptr },
        { "value_changed_events", reinterpret_cast<getter>(GattCharacteristicNotificationTriggerDetails_get_ValueChangedEvents), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_GattCharacteristicNotificationTriggerDetails[] = 
    {
        { Py_tp_new, _new_GattCharacteristicNotificationTriggerDetails },
        { Py_tp_dealloc, _dealloc_GattCharacteristicNotificationTriggerDetails },
        { Py_tp_methods, _methods_GattCharacteristicNotificationTriggerDetails },
        { Py_tp_getset, _getset_GattCharacteristicNotificationTriggerDetails },
        { },
    };

    static PyType_Spec _type_spec_GattCharacteristicNotificationTriggerDetails =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.GattCharacteristicNotificationTriggerDetails",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::GattCharacteristicNotificationTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_GattCharacteristicNotificationTriggerDetails
    };

    // ----- GattServiceProviderConnection class --------------------
    constexpr const char* const _type_name_GattServiceProviderConnection = "GattServiceProviderConnection";

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

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

    static PyObject* GattServiceProviderConnection_Start(py::wrapper::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection* 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* GattServiceProviderConnection_get_Service(py::wrapper::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Service());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* GattServiceProviderConnection_get_AllServices(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection::AllServices());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_GattServiceProviderConnection(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::Background::GattServiceProviderConnection>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_GattServiceProviderConnection[] = {
        { "start", reinterpret_cast<PyCFunction>(GattServiceProviderConnection_Start), METH_VARARGS, nullptr },
        { "get_all_services", reinterpret_cast<PyCFunction>(GattServiceProviderConnection_get_AllServices), METH_NOARGS | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_GattServiceProviderConnection), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_GattServiceProviderConnection[] = {
        { "service", reinterpret_cast<getter>(GattServiceProviderConnection_get_Service), nullptr, nullptr, nullptr },
        { "trigger_id", reinterpret_cast<getter>(GattServiceProviderConnection_get_TriggerId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_GattServiceProviderConnection[] = 
    {
        { Py_tp_new, _new_GattServiceProviderConnection },
        { Py_tp_dealloc, _dealloc_GattServiceProviderConnection },
        { Py_tp_methods, _methods_GattServiceProviderConnection },
        { Py_tp_getset, _getset_GattServiceProviderConnection },
        { },
    };

    static PyType_Spec _type_spec_GattServiceProviderConnection =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.GattServiceProviderConnection",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_GattServiceProviderConnection
    };

    // ----- GattServiceProviderTriggerDetails class --------------------
    constexpr const char* const _type_name_GattServiceProviderTriggerDetails = "GattServiceProviderTriggerDetails";

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

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

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

    static PyObject* _from_GattServiceProviderTriggerDetails(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::Background::GattServiceProviderTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_GattServiceProviderTriggerDetails[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_GattServiceProviderTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_GattServiceProviderTriggerDetails[] = {
        { "connection", reinterpret_cast<getter>(GattServiceProviderTriggerDetails_get_Connection), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_GattServiceProviderTriggerDetails[] = 
    {
        { Py_tp_new, _new_GattServiceProviderTriggerDetails },
        { Py_tp_dealloc, _dealloc_GattServiceProviderTriggerDetails },
        { Py_tp_methods, _methods_GattServiceProviderTriggerDetails },
        { Py_tp_getset, _getset_GattServiceProviderTriggerDetails },
        { },
    };

    static PyType_Spec _type_spec_GattServiceProviderTriggerDetails =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.GattServiceProviderTriggerDetails",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::GattServiceProviderTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_GattServiceProviderTriggerDetails
    };

    // ----- RfcommConnectionTriggerDetails class --------------------
    constexpr const char* const _type_name_RfcommConnectionTriggerDetails = "RfcommConnectionTriggerDetails";

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

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

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

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

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

    static PyObject* _from_RfcommConnectionTriggerDetails(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::Background::RfcommConnectionTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_RfcommConnectionTriggerDetails[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_RfcommConnectionTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_RfcommConnectionTriggerDetails[] = {
        { "incoming", reinterpret_cast<getter>(RfcommConnectionTriggerDetails_get_Incoming), nullptr, nullptr, nullptr },
        { "remote_device", reinterpret_cast<getter>(RfcommConnectionTriggerDetails_get_RemoteDevice), nullptr, nullptr, nullptr },
        { "socket", reinterpret_cast<getter>(RfcommConnectionTriggerDetails_get_Socket), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_RfcommConnectionTriggerDetails[] = 
    {
        { Py_tp_new, _new_RfcommConnectionTriggerDetails },
        { Py_tp_dealloc, _dealloc_RfcommConnectionTriggerDetails },
        { Py_tp_methods, _methods_RfcommConnectionTriggerDetails },
        { Py_tp_getset, _getset_RfcommConnectionTriggerDetails },
        { },
    };

    static PyType_Spec _type_spec_RfcommConnectionTriggerDetails =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.RfcommConnectionTriggerDetails",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommConnectionTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_RfcommConnectionTriggerDetails
    };

    // ----- RfcommInboundConnectionInformation class --------------------
    constexpr const char* const _type_name_RfcommInboundConnectionInformation = "RfcommInboundConnectionInformation";

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

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

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

    static int RfcommInboundConnectionInformation_put_ServiceCapabilities(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation* 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::BluetoothServiceCapabilities>(arg);

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

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

    static int RfcommInboundConnectionInformation_put_SdpRecord(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation* 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.SdpRecord(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

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

    static int RfcommInboundConnectionInformation_put_LocalServiceId(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation* 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::Rfcomm::RfcommServiceId>(arg);

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

    static PyObject* _from_RfcommInboundConnectionInformation(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::Background::RfcommInboundConnectionInformation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_RfcommInboundConnectionInformation[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_RfcommInboundConnectionInformation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_RfcommInboundConnectionInformation[] = {
        { "service_capabilities", reinterpret_cast<getter>(RfcommInboundConnectionInformation_get_ServiceCapabilities), reinterpret_cast<setter>(RfcommInboundConnectionInformation_put_ServiceCapabilities), nullptr, nullptr },
        { "sdp_record", reinterpret_cast<getter>(RfcommInboundConnectionInformation_get_SdpRecord), reinterpret_cast<setter>(RfcommInboundConnectionInformation_put_SdpRecord), nullptr, nullptr },
        { "local_service_id", reinterpret_cast<getter>(RfcommInboundConnectionInformation_get_LocalServiceId), reinterpret_cast<setter>(RfcommInboundConnectionInformation_put_LocalServiceId), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_RfcommInboundConnectionInformation[] = 
    {
        { Py_tp_new, _new_RfcommInboundConnectionInformation },
        { Py_tp_dealloc, _dealloc_RfcommInboundConnectionInformation },
        { Py_tp_methods, _methods_RfcommInboundConnectionInformation },
        { Py_tp_getset, _getset_RfcommInboundConnectionInformation },
        { },
    };

    static PyType_Spec _type_spec_RfcommInboundConnectionInformation =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.RfcommInboundConnectionInformation",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_RfcommInboundConnectionInformation
    };

    // ----- RfcommOutboundConnectionInformation class --------------------
    constexpr const char* const _type_name_RfcommOutboundConnectionInformation = "RfcommOutboundConnectionInformation";

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

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

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

    static int RfcommOutboundConnectionInformation_put_RemoteServiceId(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation* 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::Rfcomm::RfcommServiceId>(arg);

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

    static PyObject* _from_RfcommOutboundConnectionInformation(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::Background::RfcommOutboundConnectionInformation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_RfcommOutboundConnectionInformation[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_RfcommOutboundConnectionInformation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_RfcommOutboundConnectionInformation[] = {
        { "remote_service_id", reinterpret_cast<getter>(RfcommOutboundConnectionInformation_get_RemoteServiceId), reinterpret_cast<setter>(RfcommOutboundConnectionInformation_put_RemoteServiceId), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_RfcommOutboundConnectionInformation[] = 
    {
        { Py_tp_new, _new_RfcommOutboundConnectionInformation },
        { Py_tp_dealloc, _dealloc_RfcommOutboundConnectionInformation },
        { Py_tp_methods, _methods_RfcommOutboundConnectionInformation },
        { Py_tp_getset, _getset_RfcommOutboundConnectionInformation },
        { },
    };

    static PyType_Spec _type_spec_RfcommOutboundConnectionInformation =
    {
        "_winsdk_Windows_Devices_Bluetooth_Background.RfcommOutboundConnectionInformation",
        sizeof(py::wrapper::Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_RfcommOutboundConnectionInformation
    };

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

            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementPublisherTriggerDetails>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementPublisherTriggerDetails, &_type_spec_BluetoothLEAdvertisementPublisherTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementWatcherTriggerDetails>::python_type = py::register_python_type(module, _type_name_BluetoothLEAdvertisementWatcherTriggerDetails, &_type_spec_BluetoothLEAdvertisementWatcherTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::GattCharacteristicNotificationTriggerDetails>::python_type = py::register_python_type(module, _type_name_GattCharacteristicNotificationTriggerDetails, &_type_spec_GattCharacteristicNotificationTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection>::python_type = py::register_python_type(module, _type_name_GattServiceProviderConnection, &_type_spec_GattServiceProviderConnection, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderTriggerDetails>::python_type = py::register_python_type(module, _type_name_GattServiceProviderTriggerDetails, &_type_spec_GattServiceProviderTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::RfcommConnectionTriggerDetails>::python_type = py::register_python_type(module, _type_name_RfcommConnectionTriggerDetails, &_type_spec_RfcommConnectionTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation>::python_type = py::register_python_type(module, _type_name_RfcommInboundConnectionInformation, &_type_spec_RfcommInboundConnectionInformation, bases.get());
            py::winrt_type<winrt::Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation>::python_type = py::register_python_type(module, _type_name_RfcommOutboundConnectionInformation, &_type_spec_RfcommOutboundConnectionInformation, bases.get());

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

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

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

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

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