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

#include "pybase.h"
#include "py.Windows.ApplicationModel.Calls.Background.h"


namespace py::cpp::Windows::ApplicationModel::Calls::Background
{
    struct module_state
    {
        PyObject* type_PhoneCallBlockedReason;
        PyObject* type_PhoneIncomingCallDismissedReason;
        PyObject* type_PhoneLineChangeKind;
        PyObject* type_PhoneLineProperties;
        PyObject* type_PhoneTriggerType;
        PyTypeObject* type_PhoneCallBlockedTriggerDetails;
        PyTypeObject* type_PhoneCallOriginDataRequestTriggerDetails;
        PyTypeObject* type_PhoneIncomingCallDismissedTriggerDetails;
        PyTypeObject* type_PhoneIncomingCallNotificationTriggerDetails;
        PyTypeObject* type_PhoneLineChangedTriggerDetails;
        PyTypeObject* type_PhoneNewVoicemailMessageTriggerDetails;
    };

    static PyObject* register_PhoneCallBlockedReason(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_PhoneCallBlockedReason)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_PhoneCallBlockedReason = type;
        Py_INCREF(state->type_PhoneCallBlockedReason);


        Py_RETURN_NONE;
    }

    static PyObject* register_PhoneIncomingCallDismissedReason(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_PhoneIncomingCallDismissedReason)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_PhoneIncomingCallDismissedReason = type;
        Py_INCREF(state->type_PhoneIncomingCallDismissedReason);


        Py_RETURN_NONE;
    }

    static PyObject* register_PhoneLineChangeKind(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_PhoneLineChangeKind)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_PhoneLineChangeKind = type;
        Py_INCREF(state->type_PhoneLineChangeKind);


        Py_RETURN_NONE;
    }

    static PyObject* register_PhoneLineProperties(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_PhoneLineProperties)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_PhoneLineProperties = type;
        Py_INCREF(state->type_PhoneLineProperties);


        Py_RETURN_NONE;
    }

    static PyObject* register_PhoneTriggerType(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_PhoneTriggerType)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_PhoneTriggerType = type;
        Py_INCREF(state->type_PhoneTriggerType);


        Py_RETURN_NONE;
    }

    // ----- PhoneCallBlockedTriggerDetails class --------------------
    static constexpr const char* const type_name_PhoneCallBlockedTriggerDetails = "PhoneCallBlockedTriggerDetails";

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

    static void _dealloc_PhoneCallBlockedTriggerDetails(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PhoneCallBlockedTriggerDetails_get_CallBlockedReason(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneCallBlockedTriggerDetails", L"CallBlockedReason"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneCallBlockedTriggerDetails_get_LineId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneCallBlockedTriggerDetails", L"LineId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneCallBlockedTriggerDetails_get_PhoneNumber(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneCallBlockedTriggerDetails", L"PhoneNumber"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PhoneCallBlockedTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

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

    static PyMethodDef _methods_PhoneCallBlockedTriggerDetails[] = {
        { "_assign_array_", _assign_array_PhoneCallBlockedTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhoneCallBlockedTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhoneCallBlockedTriggerDetails[] = {
        { "call_blocked_reason", reinterpret_cast<getter>(PhoneCallBlockedTriggerDetails_get_CallBlockedReason), nullptr, nullptr, nullptr },
        { "line_id", reinterpret_cast<getter>(PhoneCallBlockedTriggerDetails_get_LineId), nullptr, nullptr, nullptr },
        { "phone_number", reinterpret_cast<getter>(PhoneCallBlockedTriggerDetails_get_PhoneNumber), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhoneCallBlockedTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhoneCallBlockedTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhoneCallBlockedTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhoneCallBlockedTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhoneCallBlockedTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_PhoneCallBlockedTriggerDetails =
    {
        "_winsdk_Windows_ApplicationModel_Calls_Background.PhoneCallBlockedTriggerDetails",
        sizeof(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhoneCallBlockedTriggerDetails
    };

    // ----- PhoneCallOriginDataRequestTriggerDetails class --------------------
    static constexpr const char* const type_name_PhoneCallOriginDataRequestTriggerDetails = "PhoneCallOriginDataRequestTriggerDetails";

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

    static void _dealloc_PhoneCallOriginDataRequestTriggerDetails(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PhoneCallOriginDataRequestTriggerDetails_get_PhoneNumber(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneCallOriginDataRequestTriggerDetails", L"PhoneNumber"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneCallOriginDataRequestTriggerDetails_get_RequestId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneCallOriginDataRequestTriggerDetails", L"RequestId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PhoneCallOriginDataRequestTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

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

    static PyMethodDef _methods_PhoneCallOriginDataRequestTriggerDetails[] = {
        { "_assign_array_", _assign_array_PhoneCallOriginDataRequestTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhoneCallOriginDataRequestTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhoneCallOriginDataRequestTriggerDetails[] = {
        { "phone_number", reinterpret_cast<getter>(PhoneCallOriginDataRequestTriggerDetails_get_PhoneNumber), nullptr, nullptr, nullptr },
        { "request_id", reinterpret_cast<getter>(PhoneCallOriginDataRequestTriggerDetails_get_RequestId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhoneCallOriginDataRequestTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhoneCallOriginDataRequestTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhoneCallOriginDataRequestTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhoneCallOriginDataRequestTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhoneCallOriginDataRequestTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_PhoneCallOriginDataRequestTriggerDetails =
    {
        "_winsdk_Windows_ApplicationModel_Calls_Background.PhoneCallOriginDataRequestTriggerDetails",
        sizeof(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhoneCallOriginDataRequestTriggerDetails
    };

    // ----- PhoneIncomingCallDismissedTriggerDetails class --------------------
    static constexpr const char* const type_name_PhoneIncomingCallDismissedTriggerDetails = "PhoneIncomingCallDismissedTriggerDetails";

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

    static void _dealloc_PhoneIncomingCallDismissedTriggerDetails(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PhoneIncomingCallDismissedTriggerDetails_get_DismissalTime(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails", L"DismissalTime"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneIncomingCallDismissedTriggerDetails_get_DisplayName(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails", L"DisplayName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneIncomingCallDismissedTriggerDetails_get_LineId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails", L"LineId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneIncomingCallDismissedTriggerDetails_get_PhoneNumber(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails", L"PhoneNumber"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneIncomingCallDismissedTriggerDetails_get_Reason(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails", L"Reason"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneIncomingCallDismissedTriggerDetails_get_TextReplyMessage(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails", L"TextReplyMessage"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PhoneIncomingCallDismissedTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

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

    static PyMethodDef _methods_PhoneIncomingCallDismissedTriggerDetails[] = {
        { "_assign_array_", _assign_array_PhoneIncomingCallDismissedTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhoneIncomingCallDismissedTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhoneIncomingCallDismissedTriggerDetails[] = {
        { "dismissal_time", reinterpret_cast<getter>(PhoneIncomingCallDismissedTriggerDetails_get_DismissalTime), nullptr, nullptr, nullptr },
        { "display_name", reinterpret_cast<getter>(PhoneIncomingCallDismissedTriggerDetails_get_DisplayName), nullptr, nullptr, nullptr },
        { "line_id", reinterpret_cast<getter>(PhoneIncomingCallDismissedTriggerDetails_get_LineId), nullptr, nullptr, nullptr },
        { "phone_number", reinterpret_cast<getter>(PhoneIncomingCallDismissedTriggerDetails_get_PhoneNumber), nullptr, nullptr, nullptr },
        { "reason", reinterpret_cast<getter>(PhoneIncomingCallDismissedTriggerDetails_get_Reason), nullptr, nullptr, nullptr },
        { "text_reply_message", reinterpret_cast<getter>(PhoneIncomingCallDismissedTriggerDetails_get_TextReplyMessage), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhoneIncomingCallDismissedTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhoneIncomingCallDismissedTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhoneIncomingCallDismissedTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhoneIncomingCallDismissedTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhoneIncomingCallDismissedTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_PhoneIncomingCallDismissedTriggerDetails =
    {
        "_winsdk_Windows_ApplicationModel_Calls_Background.PhoneIncomingCallDismissedTriggerDetails",
        sizeof(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhoneIncomingCallDismissedTriggerDetails
    };

    // ----- PhoneIncomingCallNotificationTriggerDetails class --------------------
    static constexpr const char* const type_name_PhoneIncomingCallNotificationTriggerDetails = "PhoneIncomingCallNotificationTriggerDetails";

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

    static void _dealloc_PhoneIncomingCallNotificationTriggerDetails(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PhoneIncomingCallNotificationTriggerDetails_get_CallId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallNotificationTriggerDetails", L"CallId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneIncomingCallNotificationTriggerDetails_get_LineId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneIncomingCallNotificationTriggerDetails", L"LineId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PhoneIncomingCallNotificationTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

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

    static PyMethodDef _methods_PhoneIncomingCallNotificationTriggerDetails[] = {
        { "_assign_array_", _assign_array_PhoneIncomingCallNotificationTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhoneIncomingCallNotificationTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhoneIncomingCallNotificationTriggerDetails[] = {
        { "call_id", reinterpret_cast<getter>(PhoneIncomingCallNotificationTriggerDetails_get_CallId), nullptr, nullptr, nullptr },
        { "line_id", reinterpret_cast<getter>(PhoneIncomingCallNotificationTriggerDetails_get_LineId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhoneIncomingCallNotificationTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhoneIncomingCallNotificationTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhoneIncomingCallNotificationTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhoneIncomingCallNotificationTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhoneIncomingCallNotificationTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_PhoneIncomingCallNotificationTriggerDetails =
    {
        "_winsdk_Windows_ApplicationModel_Calls_Background.PhoneIncomingCallNotificationTriggerDetails",
        sizeof(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhoneIncomingCallNotificationTriggerDetails
    };

    // ----- PhoneLineChangedTriggerDetails class --------------------
    static constexpr const char* const type_name_PhoneLineChangedTriggerDetails = "PhoneLineChangedTriggerDetails";

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

    static void _dealloc_PhoneLineChangedTriggerDetails(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PhoneLineChangedTriggerDetails_HasLinePropertyChanged(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Calls.Background.PhoneLineChangedTriggerDetails", L"HasLinePropertyChanged", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Calls::Background::PhoneLineProperties>(args, 0);

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

    static PyObject* PhoneLineChangedTriggerDetails_get_ChangeType(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneLineChangedTriggerDetails", L"ChangeType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneLineChangedTriggerDetails_get_LineId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneLineChangedTriggerDetails", L"LineId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PhoneLineChangedTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

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

    static PyMethodDef _methods_PhoneLineChangedTriggerDetails[] = {
        { "has_line_property_changed", reinterpret_cast<PyCFunction>(PhoneLineChangedTriggerDetails_HasLinePropertyChanged), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PhoneLineChangedTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhoneLineChangedTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhoneLineChangedTriggerDetails[] = {
        { "change_type", reinterpret_cast<getter>(PhoneLineChangedTriggerDetails_get_ChangeType), nullptr, nullptr, nullptr },
        { "line_id", reinterpret_cast<getter>(PhoneLineChangedTriggerDetails_get_LineId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhoneLineChangedTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhoneLineChangedTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhoneLineChangedTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhoneLineChangedTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhoneLineChangedTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_PhoneLineChangedTriggerDetails =
    {
        "_winsdk_Windows_ApplicationModel_Calls_Background.PhoneLineChangedTriggerDetails",
        sizeof(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhoneLineChangedTriggerDetails
    };

    // ----- PhoneNewVoicemailMessageTriggerDetails class --------------------
    static constexpr const char* const type_name_PhoneNewVoicemailMessageTriggerDetails = "PhoneNewVoicemailMessageTriggerDetails";

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

    static void _dealloc_PhoneNewVoicemailMessageTriggerDetails(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PhoneNewVoicemailMessageTriggerDetails_get_LineId(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneNewVoicemailMessageTriggerDetails", L"LineId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneNewVoicemailMessageTriggerDetails_get_OperatorMessage(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneNewVoicemailMessageTriggerDetails", L"OperatorMessage"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PhoneNewVoicemailMessageTriggerDetails_get_VoicemailCount(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Calls.Background.PhoneNewVoicemailMessageTriggerDetails", L"VoicemailCount"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PhoneNewVoicemailMessageTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

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

    static PyMethodDef _methods_PhoneNewVoicemailMessageTriggerDetails[] = {
        { "_assign_array_", _assign_array_PhoneNewVoicemailMessageTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhoneNewVoicemailMessageTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhoneNewVoicemailMessageTriggerDetails[] = {
        { "line_id", reinterpret_cast<getter>(PhoneNewVoicemailMessageTriggerDetails_get_LineId), nullptr, nullptr, nullptr },
        { "operator_message", reinterpret_cast<getter>(PhoneNewVoicemailMessageTriggerDetails_get_OperatorMessage), nullptr, nullptr, nullptr },
        { "voicemail_count", reinterpret_cast<getter>(PhoneNewVoicemailMessageTriggerDetails_get_VoicemailCount), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhoneNewVoicemailMessageTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhoneNewVoicemailMessageTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhoneNewVoicemailMessageTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhoneNewVoicemailMessageTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhoneNewVoicemailMessageTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_PhoneNewVoicemailMessageTriggerDetails =
    {
        "_winsdk_Windows_ApplicationModel_Calls_Background.PhoneNewVoicemailMessageTriggerDetails",
        sizeof(py::wrapper::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhoneNewVoicemailMessageTriggerDetails
    };

    // ----- Windows.ApplicationModel.Calls.Background Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Calls::Background");

    static PyMethodDef module_methods[] = {
        {"_register_PhoneCallBlockedReason", register_PhoneCallBlockedReason, METH_O, "registers type"},
        {"_register_PhoneIncomingCallDismissedReason", register_PhoneIncomingCallDismissedReason, METH_O, "registers type"},
        {"_register_PhoneLineChangeKind", register_PhoneLineChangeKind, METH_O, "registers type"},
        {"_register_PhoneLineProperties", register_PhoneLineProperties, METH_O, "registers type"},
        {"_register_PhoneTriggerType", register_PhoneTriggerType, METH_O, "registers type"},
        {}};


    static int module_traverse(PyObject* module, visitproc visit, void* arg) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_PhoneCallBlockedReason);
        Py_VISIT(state->type_PhoneIncomingCallDismissedReason);
        Py_VISIT(state->type_PhoneLineChangeKind);
        Py_VISIT(state->type_PhoneLineProperties);
        Py_VISIT(state->type_PhoneTriggerType);
        Py_VISIT(state->type_PhoneCallBlockedTriggerDetails);
        Py_VISIT(state->type_PhoneCallOriginDataRequestTriggerDetails);
        Py_VISIT(state->type_PhoneIncomingCallDismissedTriggerDetails);
        Py_VISIT(state->type_PhoneIncomingCallNotificationTriggerDetails);
        Py_VISIT(state->type_PhoneLineChangedTriggerDetails);
        Py_VISIT(state->type_PhoneNewVoicemailMessageTriggerDetails);

        return 0;
    }

    static int module_clear(PyObject* module) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_PhoneCallBlockedReason);
        Py_CLEAR(state->type_PhoneIncomingCallDismissedReason);
        Py_CLEAR(state->type_PhoneLineChangeKind);
        Py_CLEAR(state->type_PhoneLineProperties);
        Py_CLEAR(state->type_PhoneTriggerType);
        Py_CLEAR(state->type_PhoneCallBlockedTriggerDetails);
        Py_CLEAR(state->type_PhoneCallOriginDataRequestTriggerDetails);
        Py_CLEAR(state->type_PhoneIncomingCallDismissedTriggerDetails);
        Py_CLEAR(state->type_PhoneIncomingCallNotificationTriggerDetails);
        Py_CLEAR(state->type_PhoneLineChangedTriggerDetails);
        Py_CLEAR(state->type_PhoneNewVoicemailMessageTriggerDetails);

        return 0;
    }


    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_ApplicationModel_Calls_Background",
           module_doc,
           sizeof(module_state),
           module_methods,
           nullptr,
           module_traverse,
           module_clear,
           nullptr};

} // py::cpp::Windows::ApplicationModel::Calls::Background

PyMODINIT_FUNC PyInit__winsdk_Windows_ApplicationModel_Calls_Background(void) noexcept
{
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    py::pyobj_handle module{PyModule_Create(&module_def)};

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_python_type<py::Object>();
    if (!object_type)
    {
        return nullptr;
    }

    py::pyobj_handle bases{PyTuple_Pack(1, object_type)};

    if (!bases)
    {
        return nullptr;
    }

    py::pyobj_handle collections_abc_module{PyImport_ImportModule("collections.abc")};

    if (!collections_abc_module)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "Sequence")};

    if (!sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_bases{PyTuple_Pack(2, object_type, sequence_type.get())};

    if (!sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableSequence")};

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_bases{PyTuple_Pack(2, object_type, mutable_sequence_type.get())};

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "Mapping")};

    if (!mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_bases{PyTuple_Pack(2, object_type, mapping_type.get())};

    if (!mapping_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableMapping")};

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_bases{PyTuple_Pack(2, object_type, mutable_mapping_type.get())};

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module.get()));
    assert(state);

    state->type_PhoneCallBlockedTriggerDetails = py::register_python_type(module.get(), type_name_PhoneCallBlockedTriggerDetails, &type_spec_PhoneCallBlockedTriggerDetails, bases.get(), nullptr);
    if (!state->type_PhoneCallBlockedTriggerDetails)
    {
        return nullptr;
    }

    state->type_PhoneCallOriginDataRequestTriggerDetails = py::register_python_type(module.get(), type_name_PhoneCallOriginDataRequestTriggerDetails, &type_spec_PhoneCallOriginDataRequestTriggerDetails, bases.get(), nullptr);
    if (!state->type_PhoneCallOriginDataRequestTriggerDetails)
    {
        return nullptr;
    }

    state->type_PhoneIncomingCallDismissedTriggerDetails = py::register_python_type(module.get(), type_name_PhoneIncomingCallDismissedTriggerDetails, &type_spec_PhoneIncomingCallDismissedTriggerDetails, bases.get(), nullptr);
    if (!state->type_PhoneIncomingCallDismissedTriggerDetails)
    {
        return nullptr;
    }

    state->type_PhoneIncomingCallNotificationTriggerDetails = py::register_python_type(module.get(), type_name_PhoneIncomingCallNotificationTriggerDetails, &type_spec_PhoneIncomingCallNotificationTriggerDetails, bases.get(), nullptr);
    if (!state->type_PhoneIncomingCallNotificationTriggerDetails)
    {
        return nullptr;
    }

    state->type_PhoneLineChangedTriggerDetails = py::register_python_type(module.get(), type_name_PhoneLineChangedTriggerDetails, &type_spec_PhoneLineChangedTriggerDetails, bases.get(), nullptr);
    if (!state->type_PhoneLineChangedTriggerDetails)
    {
        return nullptr;
    }

    state->type_PhoneNewVoicemailMessageTriggerDetails = py::register_python_type(module.get(), type_name_PhoneNewVoicemailMessageTriggerDetails, &type_spec_PhoneNewVoicemailMessageTriggerDetails, bases.get(), nullptr);
    if (!state->type_PhoneNewVoicemailMessageTriggerDetails)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedReason>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneCallBlockedReason;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedReason is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedReason>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneIncomingCallDismissedReason;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedReason is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneLineChangeKind>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneLineChangeKind;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneLineChangeKind is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneLineProperties>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneLineProperties;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneLineProperties is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneTriggerType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneTriggerType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneTriggerType is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneCallBlockedTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneCallOriginDataRequestTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneIncomingCallDismissedTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallDismissedTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneIncomingCallNotificationTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneIncomingCallNotificationTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneLineChangedTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Calls::Background;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Calls::Background");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_PhoneNewVoicemailMessageTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}
