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

#include "pybase.h"
#include "py.Windows.Phone.StartScreen.h"


namespace py::cpp::Windows::Phone::StartScreen
{
    struct module_state
    {
        PyTypeObject* type_DualSimTile;
        PyTypeObject* type_IToastNotificationManagerStatics3;
    };

    // ----- DualSimTile class --------------------
    static constexpr const char* const type_name_DualSimTile = "DualSimTile";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Phone::StartScreen::DualSimTile instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_DualSimTile(py::wrapper::Windows::Phone::StartScreen::DualSimTile* 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* DualSimTile_CreateAsync(py::wrapper::Windows::Phone::StartScreen::DualSimTile* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* DualSimTile_CreateBadgeUpdaterForSim1(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateBadgeUpdaterForSim1", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::CreateBadgeUpdaterForSim1());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_CreateBadgeUpdaterForSim2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateBadgeUpdaterForSim2", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::CreateBadgeUpdaterForSim2());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_CreateTileUpdaterForSim1(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateTileUpdaterForSim1", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::CreateTileUpdaterForSim1());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_CreateTileUpdaterForSim2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateTileUpdaterForSim2", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::CreateTileUpdaterForSim2());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_CreateToastNotifierForSim1(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateToastNotifierForSim1", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::CreateToastNotifierForSim1());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_CreateToastNotifierForSim2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"CreateToastNotifierForSim2", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::CreateToastNotifierForSim2());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_DeleteAsync(py::wrapper::Windows::Phone::StartScreen::DualSimTile* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"DeleteAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* DualSimTile_GetTileForSim2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"GetTileForSim2", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::GetTileForSim2());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_UpdateAsync(py::wrapper::Windows::Phone::StartScreen::DualSimTile* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"UpdateAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* DualSimTile_UpdateDisplayNameForSim1Async(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.DualSimTile", L"UpdateDisplayNameForSim1Async", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                return py::convert(winrt::Windows::Phone::StartScreen::DualSimTile::UpdateDisplayNameForSim1Async(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* DualSimTile_get_DisplayName(py::wrapper::Windows::Phone::StartScreen::DualSimTile* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Phone.StartScreen.DualSimTile", 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 int DualSimTile_put_DisplayName(py::wrapper::Windows::Phone::StartScreen::DualSimTile* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Phone.StartScreen.DualSimTile", L"DisplayName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

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

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

    static PyObject* DualSimTile_get_IsPinnedToStart(py::wrapper::Windows::Phone::StartScreen::DualSimTile* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Phone.StartScreen.DualSimTile", L"IsPinnedToStart"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_DualSimTile(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Phone::StartScreen::DualSimTile>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_DualSimTile(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::Phone::StartScreen::DualSimTile>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_DualSimTile[] = {
        { "create_async", reinterpret_cast<PyCFunction>(DualSimTile_CreateAsync), METH_VARARGS, nullptr },
        { "create_badge_updater_for_sim1", reinterpret_cast<PyCFunction>(DualSimTile_CreateBadgeUpdaterForSim1), METH_VARARGS | METH_STATIC, nullptr },
        { "create_badge_updater_for_sim2", reinterpret_cast<PyCFunction>(DualSimTile_CreateBadgeUpdaterForSim2), METH_VARARGS | METH_STATIC, nullptr },
        { "create_tile_updater_for_sim1", reinterpret_cast<PyCFunction>(DualSimTile_CreateTileUpdaterForSim1), METH_VARARGS | METH_STATIC, nullptr },
        { "create_tile_updater_for_sim2", reinterpret_cast<PyCFunction>(DualSimTile_CreateTileUpdaterForSim2), METH_VARARGS | METH_STATIC, nullptr },
        { "create_toast_notifier_for_sim1", reinterpret_cast<PyCFunction>(DualSimTile_CreateToastNotifierForSim1), METH_VARARGS | METH_STATIC, nullptr },
        { "create_toast_notifier_for_sim2", reinterpret_cast<PyCFunction>(DualSimTile_CreateToastNotifierForSim2), METH_VARARGS | METH_STATIC, nullptr },
        { "delete_async", reinterpret_cast<PyCFunction>(DualSimTile_DeleteAsync), METH_VARARGS, nullptr },
        { "get_tile_for_sim2", reinterpret_cast<PyCFunction>(DualSimTile_GetTileForSim2), METH_VARARGS | METH_STATIC, nullptr },
        { "update_async", reinterpret_cast<PyCFunction>(DualSimTile_UpdateAsync), METH_VARARGS, nullptr },
        { "update_display_name_for_sim1_async", reinterpret_cast<PyCFunction>(DualSimTile_UpdateDisplayNameForSim1Async), METH_VARARGS | METH_STATIC, nullptr },
        { "_assign_array_", _assign_array_DualSimTile, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_DualSimTile), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_DualSimTile[] = {
        { "display_name", reinterpret_cast<getter>(DualSimTile_get_DisplayName), reinterpret_cast<setter>(DualSimTile_put_DisplayName), nullptr, nullptr },
        { "is_pinned_to_start", reinterpret_cast<getter>(DualSimTile_get_IsPinnedToStart), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_DualSimTile[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_DualSimTile) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DualSimTile) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_DualSimTile) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_DualSimTile) },
        { },
    };

    static PyType_Spec type_spec_DualSimTile =
    {
        "_winsdk_Windows_Phone_StartScreen.DualSimTile",
        sizeof(py::wrapper::Windows::Phone::StartScreen::DualSimTile),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_DualSimTile
    };

    // ----- IToastNotificationManagerStatics3 interface --------------------
    static constexpr const char* const type_name_IToastNotificationManagerStatics3 = "IToastNotificationManagerStatics3";

    static PyObject* _new_IToastNotificationManagerStatics3(PyTypeObject* /* unused */, PyObject* /* unused */, PyObject* /* unused */) noexcept
    {
        py::set_invalid_activation_error(type_name_IToastNotificationManagerStatics3);
        return nullptr;
    }

    static void _dealloc_IToastNotificationManagerStatics3(py::wrapper::Windows::Phone::StartScreen::IToastNotificationManagerStatics3* 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* IToastNotificationManagerStatics3_CreateToastNotifierForSecondaryTile(py::wrapper::Windows::Phone::StartScreen::IToastNotificationManagerStatics3* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Phone.StartScreen.IToastNotificationManagerStatics3", L"CreateToastNotifierForSecondaryTile", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

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

    static PyObject* _assign_array_IToastNotificationManagerStatics3(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Phone::StartScreen::IToastNotificationManagerStatics3>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IToastNotificationManagerStatics3(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::Phone::StartScreen::IToastNotificationManagerStatics3>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IToastNotificationManagerStatics3[] = {
        { "create_toast_notifier_for_secondary_tile", reinterpret_cast<PyCFunction>(IToastNotificationManagerStatics3_CreateToastNotifierForSecondaryTile), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IToastNotificationManagerStatics3, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IToastNotificationManagerStatics3), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IToastNotificationManagerStatics3[] = {
        { }
    };

    static PyType_Slot _type_slots_IToastNotificationManagerStatics3[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IToastNotificationManagerStatics3) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IToastNotificationManagerStatics3) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IToastNotificationManagerStatics3) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IToastNotificationManagerStatics3) },
        { },
    };

    static PyType_Spec type_spec_IToastNotificationManagerStatics3 =
    {
        "_winsdk_Windows_Phone_StartScreen.IToastNotificationManagerStatics3",
        sizeof(py::wrapper::Windows::Phone::StartScreen::IToastNotificationManagerStatics3),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IToastNotificationManagerStatics3
    };

    // ----- Windows.Phone.StartScreen Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Phone::StartScreen");

    static PyMethodDef module_methods[] = {
        {}};


    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_DualSimTile);
        Py_VISIT(state->type_IToastNotificationManagerStatics3);

        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_DualSimTile);
        Py_CLEAR(state->type_IToastNotificationManagerStatics3);

        return 0;
    }


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

} // py::cpp::Windows::Phone::StartScreen

PyMODINIT_FUNC PyInit__winsdk_Windows_Phone_StartScreen(void) noexcept
{
    using namespace py::cpp::Windows::Phone::StartScreen;

    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_DualSimTile = py::register_python_type(module.get(), type_name_DualSimTile, &type_spec_DualSimTile, bases.get(), nullptr);
    if (!state->type_DualSimTile)
    {
        return nullptr;
    }

    state->type_IToastNotificationManagerStatics3 = py::register_python_type(module.get(), type_name_IToastNotificationManagerStatics3, &type_spec_IToastNotificationManagerStatics3, bases.get(), nullptr);
    if (!state->type_IToastNotificationManagerStatics3)
    {
        return nullptr;
    }


    return module.detach();
}

PyTypeObject* py::winrt_type<winrt::Windows::Phone::StartScreen::DualSimTile>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Phone::StartScreen;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_DualSimTile;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Phone::StartScreen::DualSimTile is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Phone::StartScreen::IToastNotificationManagerStatics3>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Phone::StartScreen;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_IToastNotificationManagerStatics3;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Phone::StartScreen::IToastNotificationManagerStatics3 is not registered");
        return nullptr;
    }

    return python_type;
}
