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

#include "pybase.h"
#include "py.Windows.UI.ApplicationSettings.h"


namespace py::cpp::Windows::UI::ApplicationSettings
{
    struct module_state
    {
        PyObject* type_SettingsEdgeLocation;
        PyObject* type_SupportedWebAccountActions;
        PyObject* type_WebAccountAction;
        PyTypeObject* type_AccountsSettingsPane;
        PyTypeObject* type_AccountsSettingsPaneCommandsRequestedEventArgs;
        PyTypeObject* type_AccountsSettingsPaneEventDeferral;
        PyTypeObject* type_CredentialCommand;
        PyTypeObject* type_SettingsCommand;
        PyTypeObject* type_SettingsPane;
        PyTypeObject* type_SettingsPaneCommandsRequest;
        PyTypeObject* type_SettingsPaneCommandsRequestedEventArgs;
        PyTypeObject* type_WebAccountCommand;
        PyTypeObject* type_WebAccountInvokedArgs;
        PyTypeObject* type_WebAccountProviderCommand;
    };

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

        if (state->type_SettingsEdgeLocation)
        {
            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_SettingsEdgeLocation = type;
        Py_INCREF(state->type_SettingsEdgeLocation);


        Py_RETURN_NONE;
    }

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

        if (state->type_SupportedWebAccountActions)
        {
            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_SupportedWebAccountActions = type;
        Py_INCREF(state->type_SupportedWebAccountActions);


        Py_RETURN_NONE;
    }

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

        if (state->type_WebAccountAction)
        {
            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_WebAccountAction = type;
        Py_INCREF(state->type_WebAccountAction);


        Py_RETURN_NONE;
    }

    // ----- AccountsSettingsPane class --------------------
    static constexpr const char* const type_name_AccountsSettingsPane = "AccountsSettingsPane";

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

    static void _dealloc_AccountsSettingsPane(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPane* 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* AccountsSettingsPane_GetForCurrentView(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"GetForCurrentView", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane::GetForCurrentView());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"Show", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane::Show();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"ShowAddAccountAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane::ShowAddAccountAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"ShowAddAccountForUserAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane::ShowAddAccountForUserAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"ShowManageAccountsAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane::ShowManageAccountsAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"ShowManageAccountsForUserAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane::ShowManageAccountsForUserAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AccountsSettingsPane_add_AccountCommandsRequested(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPane* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"AccountCommandsRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane, winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs>>(arg);

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

    static PyObject* AccountsSettingsPane_remove_AccountCommandsRequested(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPane* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPane", L"AccountCommandsRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* _from_AccountsSettingsPane(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::UI::ApplicationSettings::AccountsSettingsPane>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AccountsSettingsPane[] = {
        { "get_for_current_view", reinterpret_cast<PyCFunction>(AccountsSettingsPane_GetForCurrentView), METH_VARARGS | METH_STATIC, nullptr },
        { "show", reinterpret_cast<PyCFunction>(AccountsSettingsPane_Show), METH_VARARGS | METH_STATIC, nullptr },
        { "show_add_account_async", reinterpret_cast<PyCFunction>(AccountsSettingsPane_ShowAddAccountAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "show_add_account_for_user_async", reinterpret_cast<PyCFunction>(AccountsSettingsPane_ShowAddAccountForUserAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "show_manage_accounts_async", reinterpret_cast<PyCFunction>(AccountsSettingsPane_ShowManageAccountsAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "show_manage_accounts_for_user_async", reinterpret_cast<PyCFunction>(AccountsSettingsPane_ShowManageAccountsForUserAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "add_account_commands_requested", reinterpret_cast<PyCFunction>(AccountsSettingsPane_add_AccountCommandsRequested), METH_O, nullptr },
        { "remove_account_commands_requested", reinterpret_cast<PyCFunction>(AccountsSettingsPane_remove_AccountCommandsRequested), METH_O, nullptr },
        { "_assign_array_", _assign_array_AccountsSettingsPane, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AccountsSettingsPane), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AccountsSettingsPane[] = {
        { }
    };

    static PyType_Slot _type_slots_AccountsSettingsPane[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AccountsSettingsPane) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AccountsSettingsPane) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AccountsSettingsPane) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AccountsSettingsPane) },
        { },
    };

    static PyType_Spec type_spec_AccountsSettingsPane =
    {
        "_winsdk_Windows_UI_ApplicationSettings.AccountsSettingsPane",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPane),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AccountsSettingsPane
    };

    // ----- AccountsSettingsPaneCommandsRequestedEventArgs class --------------------
    static constexpr const char* const type_name_AccountsSettingsPaneCommandsRequestedEventArgs = "AccountsSettingsPaneCommandsRequestedEventArgs";

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

    static void _dealloc_AccountsSettingsPaneCommandsRequestedEventArgs(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs* 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* AccountsSettingsPaneCommandsRequestedEventArgs_GetDeferral(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPaneCommandsRequestedEventArgs", L"GetDeferral", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

    static int AccountsSettingsPaneCommandsRequestedEventArgs_put_HeaderText(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPaneCommandsRequestedEventArgs", L"HeaderText"))
        {
            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.HeaderText(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_AccountsSettingsPaneCommandsRequestedEventArgs(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::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AccountsSettingsPaneCommandsRequestedEventArgs[] = {
        { "get_deferral", reinterpret_cast<PyCFunction>(AccountsSettingsPaneCommandsRequestedEventArgs_GetDeferral), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_AccountsSettingsPaneCommandsRequestedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AccountsSettingsPaneCommandsRequestedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AccountsSettingsPaneCommandsRequestedEventArgs[] = {
        { "header_text", reinterpret_cast<getter>(AccountsSettingsPaneCommandsRequestedEventArgs_get_HeaderText), reinterpret_cast<setter>(AccountsSettingsPaneCommandsRequestedEventArgs_put_HeaderText), nullptr, nullptr },
        { "commands", reinterpret_cast<getter>(AccountsSettingsPaneCommandsRequestedEventArgs_get_Commands), nullptr, nullptr, nullptr },
        { "credential_commands", reinterpret_cast<getter>(AccountsSettingsPaneCommandsRequestedEventArgs_get_CredentialCommands), nullptr, nullptr, nullptr },
        { "web_account_commands", reinterpret_cast<getter>(AccountsSettingsPaneCommandsRequestedEventArgs_get_WebAccountCommands), nullptr, nullptr, nullptr },
        { "web_account_provider_commands", reinterpret_cast<getter>(AccountsSettingsPaneCommandsRequestedEventArgs_get_WebAccountProviderCommands), nullptr, nullptr, nullptr },
        { "user", reinterpret_cast<getter>(AccountsSettingsPaneCommandsRequestedEventArgs_get_User), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AccountsSettingsPaneCommandsRequestedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AccountsSettingsPaneCommandsRequestedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AccountsSettingsPaneCommandsRequestedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AccountsSettingsPaneCommandsRequestedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AccountsSettingsPaneCommandsRequestedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_AccountsSettingsPaneCommandsRequestedEventArgs =
    {
        "_winsdk_Windows_UI_ApplicationSettings.AccountsSettingsPaneCommandsRequestedEventArgs",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AccountsSettingsPaneCommandsRequestedEventArgs
    };

    // ----- AccountsSettingsPaneEventDeferral class --------------------
    static constexpr const char* const type_name_AccountsSettingsPaneEventDeferral = "AccountsSettingsPaneEventDeferral";

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

    static void _dealloc_AccountsSettingsPaneEventDeferral(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral* 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* AccountsSettingsPaneEventDeferral_Complete(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.AccountsSettingsPaneEventDeferral", L"Complete", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

    static PyObject* _from_AccountsSettingsPaneEventDeferral(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::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AccountsSettingsPaneEventDeferral[] = {
        { "complete", reinterpret_cast<PyCFunction>(AccountsSettingsPaneEventDeferral_Complete), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_AccountsSettingsPaneEventDeferral, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AccountsSettingsPaneEventDeferral), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AccountsSettingsPaneEventDeferral[] = {
        { }
    };

    static PyType_Slot _type_slots_AccountsSettingsPaneEventDeferral[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AccountsSettingsPaneEventDeferral) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AccountsSettingsPaneEventDeferral) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AccountsSettingsPaneEventDeferral) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AccountsSettingsPaneEventDeferral) },
        { },
    };

    static PyType_Spec type_spec_AccountsSettingsPaneEventDeferral =
    {
        "_winsdk_Windows_UI_ApplicationSettings.AccountsSettingsPaneEventDeferral",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AccountsSettingsPaneEventDeferral
    };

    // ----- CredentialCommand class --------------------
    static constexpr const char* const type_name_CredentialCommand = "CredentialCommand";

    static PyObject* _new_CredentialCommand(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 == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::PasswordCredential>(args, 0);

                winrt::Windows::UI::ApplicationSettings::CredentialCommand instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::PasswordCredential>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler>(args, 1);

                winrt::Windows::UI::ApplicationSettings::CredentialCommand instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_CredentialCommand(py::wrapper::Windows::UI::ApplicationSettings::CredentialCommand* 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* CredentialCommand_get_CredentialDeleted(py::wrapper::Windows::UI::ApplicationSettings::CredentialCommand* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.CredentialCommand", L"CredentialDeleted"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

    static PyObject* _from_CredentialCommand(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::UI::ApplicationSettings::CredentialCommand>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CredentialCommand[] = {
        { "_assign_array_", _assign_array_CredentialCommand, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CredentialCommand), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CredentialCommand[] = {
        { "credential_deleted", reinterpret_cast<getter>(CredentialCommand_get_CredentialDeleted), nullptr, nullptr, nullptr },
        { "password_credential", reinterpret_cast<getter>(CredentialCommand_get_PasswordCredential), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CredentialCommand[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_CredentialCommand) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CredentialCommand) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CredentialCommand) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CredentialCommand) },
        { },
    };

    static PyType_Spec type_spec_CredentialCommand =
    {
        "_winsdk_Windows_UI_ApplicationSettings.CredentialCommand",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::CredentialCommand),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CredentialCommand
    };

    // ----- SettingsCommand class --------------------
    static constexpr const char* const type_name_SettingsCommand = "SettingsCommand";

    static PyObject* _new_SettingsCommand(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 == 3)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Popups::UICommandInvokedHandler>(args, 2);

                winrt::Windows::UI::ApplicationSettings::SettingsCommand instance{ param0, param1, param2 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_SettingsCommand(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand* 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* SettingsCommand_get_Label(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsCommand", L"Label"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int SettingsCommand_put_Label(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsCommand", L"Label"))
        {
            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.Label(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

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

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

    static int SettingsCommand_put_Invoked(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsCommand", L"Invoked"))
        {
            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::Windows::UI::Popups::UICommandInvokedHandler>(arg);

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

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

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

    static int SettingsCommand_put_Id(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsCommand", L"Id"))
        {
            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::Windows::Foundation::IInspectable>(arg);

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

    static PyObject* SettingsCommand_get_AccountsCommand(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsCommand", L"AccountsCommand"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::UI::ApplicationSettings::SettingsCommand::AccountsCommand());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_SettingsCommand(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::UI::ApplicationSettings::SettingsCommand>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SettingsCommand[] = {
        { "_assign_array_", _assign_array_SettingsCommand, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SettingsCommand), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SettingsCommand[] = {
        { "label", reinterpret_cast<getter>(SettingsCommand_get_Label), reinterpret_cast<setter>(SettingsCommand_put_Label), nullptr, nullptr },
        { "invoked", reinterpret_cast<getter>(SettingsCommand_get_Invoked), reinterpret_cast<setter>(SettingsCommand_put_Invoked), nullptr, nullptr },
        { "id", reinterpret_cast<getter>(SettingsCommand_get_Id), reinterpret_cast<setter>(SettingsCommand_put_Id), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SettingsCommand[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SettingsCommand) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SettingsCommand) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SettingsCommand) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SettingsCommand) },
        { },
    };

    static PyType_Spec type_spec_SettingsCommand =
    {
        "_winsdk_Windows_UI_ApplicationSettings.SettingsCommand",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SettingsCommand
    };

    static PyGetSetDef getset_SettingsCommand_Meta[] = {
        { "accounts_command", reinterpret_cast<getter>(SettingsCommand_get_AccountsCommand), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot type_slots_SettingsCommand_Meta[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_SettingsCommand_Meta) },
        { }
    };

    static PyType_Spec type_spec_SettingsCommand_Meta =
    {
        "_winsdk_Windows_UI_ApplicationSettings.SettingsCommand_Meta",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_SettingsCommand_Meta
    };

    // ----- SettingsPane class --------------------
    static constexpr const char* const type_name_SettingsPane = "SettingsPane";

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

    static void _dealloc_SettingsPane(py::wrapper::Windows::UI::ApplicationSettings::SettingsPane* 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* SettingsPane_GetForCurrentView(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.SettingsPane", L"GetForCurrentView", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::UI::ApplicationSettings::SettingsPane::GetForCurrentView());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.ApplicationSettings.SettingsPane", L"Show", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                winrt::Windows::UI::ApplicationSettings::SettingsPane::Show();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SettingsPane_get_Edge(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsPane", L"Edge"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::UI::ApplicationSettings::SettingsPane::Edge());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SettingsPane_add_CommandsRequested(py::wrapper::Windows::UI::ApplicationSettings::SettingsPane* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.ApplicationSettings.SettingsPane", L"CommandsRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::ApplicationSettings::SettingsPane, winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs>>(arg);

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

    static PyObject* SettingsPane_remove_CommandsRequested(py::wrapper::Windows::UI::ApplicationSettings::SettingsPane* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.ApplicationSettings.SettingsPane", L"CommandsRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* _from_SettingsPane(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::UI::ApplicationSettings::SettingsPane>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SettingsPane[] = {
        { "get_for_current_view", reinterpret_cast<PyCFunction>(SettingsPane_GetForCurrentView), METH_VARARGS | METH_STATIC, nullptr },
        { "show", reinterpret_cast<PyCFunction>(SettingsPane_Show), METH_VARARGS | METH_STATIC, nullptr },
        { "add_commands_requested", reinterpret_cast<PyCFunction>(SettingsPane_add_CommandsRequested), METH_O, nullptr },
        { "remove_commands_requested", reinterpret_cast<PyCFunction>(SettingsPane_remove_CommandsRequested), METH_O, nullptr },
        { "_assign_array_", _assign_array_SettingsPane, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SettingsPane), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SettingsPane[] = {
        { }
    };

    static PyType_Slot _type_slots_SettingsPane[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SettingsPane) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SettingsPane) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SettingsPane) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SettingsPane) },
        { },
    };

    static PyType_Spec type_spec_SettingsPane =
    {
        "_winsdk_Windows_UI_ApplicationSettings.SettingsPane",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::SettingsPane),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SettingsPane
    };

    static PyGetSetDef getset_SettingsPane_Meta[] = {
        { "edge", reinterpret_cast<getter>(SettingsPane_get_Edge), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot type_slots_SettingsPane_Meta[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_SettingsPane_Meta) },
        { }
    };

    static PyType_Spec type_spec_SettingsPane_Meta =
    {
        "_winsdk_Windows_UI_ApplicationSettings.SettingsPane_Meta",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_SettingsPane_Meta
    };

    // ----- SettingsPaneCommandsRequest class --------------------
    static constexpr const char* const type_name_SettingsPaneCommandsRequest = "SettingsPaneCommandsRequest";

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

    static void _dealloc_SettingsPaneCommandsRequest(py::wrapper::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest* 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* SettingsPaneCommandsRequest_get_ApplicationCommands(py::wrapper::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsPaneCommandsRequest", L"ApplicationCommands"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_SettingsPaneCommandsRequest(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::UI::ApplicationSettings::SettingsPaneCommandsRequest>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SettingsPaneCommandsRequest[] = {
        { "_assign_array_", _assign_array_SettingsPaneCommandsRequest, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SettingsPaneCommandsRequest), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SettingsPaneCommandsRequest[] = {
        { "application_commands", reinterpret_cast<getter>(SettingsPaneCommandsRequest_get_ApplicationCommands), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SettingsPaneCommandsRequest[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SettingsPaneCommandsRequest) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SettingsPaneCommandsRequest) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SettingsPaneCommandsRequest) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SettingsPaneCommandsRequest) },
        { },
    };

    static PyType_Spec type_spec_SettingsPaneCommandsRequest =
    {
        "_winsdk_Windows_UI_ApplicationSettings.SettingsPaneCommandsRequest",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SettingsPaneCommandsRequest
    };

    // ----- SettingsPaneCommandsRequestedEventArgs class --------------------
    static constexpr const char* const type_name_SettingsPaneCommandsRequestedEventArgs = "SettingsPaneCommandsRequestedEventArgs";

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

    static void _dealloc_SettingsPaneCommandsRequestedEventArgs(py::wrapper::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs* 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* SettingsPaneCommandsRequestedEventArgs_get_Request(py::wrapper::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs", L"Request"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_SettingsPaneCommandsRequestedEventArgs(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::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SettingsPaneCommandsRequestedEventArgs[] = {
        { "_assign_array_", _assign_array_SettingsPaneCommandsRequestedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SettingsPaneCommandsRequestedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SettingsPaneCommandsRequestedEventArgs[] = {
        { "request", reinterpret_cast<getter>(SettingsPaneCommandsRequestedEventArgs_get_Request), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SettingsPaneCommandsRequestedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SettingsPaneCommandsRequestedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SettingsPaneCommandsRequestedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SettingsPaneCommandsRequestedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SettingsPaneCommandsRequestedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_SettingsPaneCommandsRequestedEventArgs =
    {
        "_winsdk_Windows_UI_ApplicationSettings.SettingsPaneCommandsRequestedEventArgs",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SettingsPaneCommandsRequestedEventArgs
    };

    // ----- WebAccountCommand class --------------------
    static constexpr const char* const type_name_WebAccountCommand = "WebAccountCommand";

    static PyObject* _new_WebAccountCommand(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 == 3)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccount>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::ApplicationSettings::SupportedWebAccountActions>(args, 2);

                winrt::Windows::UI::ApplicationSettings::WebAccountCommand instance{ param0, param1, param2 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_WebAccountCommand(py::wrapper::Windows::UI::ApplicationSettings::WebAccountCommand* 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* WebAccountCommand_get_Actions(py::wrapper::Windows::UI::ApplicationSettings::WebAccountCommand* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.WebAccountCommand", L"Actions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

    static PyObject* _from_WebAccountCommand(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::UI::ApplicationSettings::WebAccountCommand>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebAccountCommand[] = {
        { "_assign_array_", _assign_array_WebAccountCommand, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebAccountCommand), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebAccountCommand[] = {
        { "actions", reinterpret_cast<getter>(WebAccountCommand_get_Actions), nullptr, nullptr, nullptr },
        { "invoked", reinterpret_cast<getter>(WebAccountCommand_get_Invoked), nullptr, nullptr, nullptr },
        { "web_account", reinterpret_cast<getter>(WebAccountCommand_get_WebAccount), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebAccountCommand[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebAccountCommand) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebAccountCommand) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebAccountCommand) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebAccountCommand) },
        { },
    };

    static PyType_Spec type_spec_WebAccountCommand =
    {
        "_winsdk_Windows_UI_ApplicationSettings.WebAccountCommand",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::WebAccountCommand),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebAccountCommand
    };

    // ----- WebAccountInvokedArgs class --------------------
    static constexpr const char* const type_name_WebAccountInvokedArgs = "WebAccountInvokedArgs";

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

    static void _dealloc_WebAccountInvokedArgs(py::wrapper::Windows::UI::ApplicationSettings::WebAccountInvokedArgs* 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* WebAccountInvokedArgs_get_Action(py::wrapper::Windows::UI::ApplicationSettings::WebAccountInvokedArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.WebAccountInvokedArgs", L"Action"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_WebAccountInvokedArgs(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::UI::ApplicationSettings::WebAccountInvokedArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebAccountInvokedArgs[] = {
        { "_assign_array_", _assign_array_WebAccountInvokedArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebAccountInvokedArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebAccountInvokedArgs[] = {
        { "action", reinterpret_cast<getter>(WebAccountInvokedArgs_get_Action), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebAccountInvokedArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebAccountInvokedArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebAccountInvokedArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebAccountInvokedArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebAccountInvokedArgs) },
        { },
    };

    static PyType_Spec type_spec_WebAccountInvokedArgs =
    {
        "_winsdk_Windows_UI_ApplicationSettings.WebAccountInvokedArgs",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::WebAccountInvokedArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebAccountInvokedArgs
    };

    // ----- WebAccountProviderCommand class --------------------
    static constexpr const char* const type_name_WebAccountProviderCommand = "WebAccountProviderCommand";

    static PyObject* _new_WebAccountProviderCommand(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 == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler>(args, 1);

                winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_WebAccountProviderCommand(py::wrapper::Windows::UI::ApplicationSettings::WebAccountProviderCommand* 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* WebAccountProviderCommand_get_Invoked(py::wrapper::Windows::UI::ApplicationSettings::WebAccountProviderCommand* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.ApplicationSettings.WebAccountProviderCommand", L"Invoked"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

    static PyObject* _from_WebAccountProviderCommand(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::UI::ApplicationSettings::WebAccountProviderCommand>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebAccountProviderCommand[] = {
        { "_assign_array_", _assign_array_WebAccountProviderCommand, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebAccountProviderCommand), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebAccountProviderCommand[] = {
        { "invoked", reinterpret_cast<getter>(WebAccountProviderCommand_get_Invoked), nullptr, nullptr, nullptr },
        { "web_account_provider", reinterpret_cast<getter>(WebAccountProviderCommand_get_WebAccountProvider), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebAccountProviderCommand[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebAccountProviderCommand) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebAccountProviderCommand) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebAccountProviderCommand) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebAccountProviderCommand) },
        { },
    };

    static PyType_Spec type_spec_WebAccountProviderCommand =
    {
        "_winsdk_Windows_UI_ApplicationSettings.WebAccountProviderCommand",
        sizeof(py::wrapper::Windows::UI::ApplicationSettings::WebAccountProviderCommand),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebAccountProviderCommand
    };

    // ----- Windows.UI.ApplicationSettings Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::UI::ApplicationSettings");

    static PyMethodDef module_methods[] = {
        {"_register_SettingsEdgeLocation", register_SettingsEdgeLocation, METH_O, "registers type"},
        {"_register_SupportedWebAccountActions", register_SupportedWebAccountActions, METH_O, "registers type"},
        {"_register_WebAccountAction", register_WebAccountAction, 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_SettingsEdgeLocation);
        Py_VISIT(state->type_SupportedWebAccountActions);
        Py_VISIT(state->type_WebAccountAction);
        Py_VISIT(state->type_AccountsSettingsPane);
        Py_VISIT(state->type_AccountsSettingsPaneCommandsRequestedEventArgs);
        Py_VISIT(state->type_AccountsSettingsPaneEventDeferral);
        Py_VISIT(state->type_CredentialCommand);
        Py_VISIT(state->type_SettingsCommand);
        Py_VISIT(state->type_SettingsPane);
        Py_VISIT(state->type_SettingsPaneCommandsRequest);
        Py_VISIT(state->type_SettingsPaneCommandsRequestedEventArgs);
        Py_VISIT(state->type_WebAccountCommand);
        Py_VISIT(state->type_WebAccountInvokedArgs);
        Py_VISIT(state->type_WebAccountProviderCommand);

        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_SettingsEdgeLocation);
        Py_CLEAR(state->type_SupportedWebAccountActions);
        Py_CLEAR(state->type_WebAccountAction);
        Py_CLEAR(state->type_AccountsSettingsPane);
        Py_CLEAR(state->type_AccountsSettingsPaneCommandsRequestedEventArgs);
        Py_CLEAR(state->type_AccountsSettingsPaneEventDeferral);
        Py_CLEAR(state->type_CredentialCommand);
        Py_CLEAR(state->type_SettingsCommand);
        Py_CLEAR(state->type_SettingsPane);
        Py_CLEAR(state->type_SettingsPaneCommandsRequest);
        Py_CLEAR(state->type_SettingsPaneCommandsRequestedEventArgs);
        Py_CLEAR(state->type_WebAccountCommand);
        Py_CLEAR(state->type_WebAccountInvokedArgs);
        Py_CLEAR(state->type_WebAccountProviderCommand);

        return 0;
    }


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

} // py::cpp::Windows::UI::ApplicationSettings

PyMODINIT_FUNC PyInit__winsdk_Windows_UI_ApplicationSettings(void) noexcept
{
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    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_AccountsSettingsPane = py::register_python_type(module.get(), type_name_AccountsSettingsPane, &type_spec_AccountsSettingsPane, bases.get(), nullptr);
    if (!state->type_AccountsSettingsPane)
    {
        return nullptr;
    }

    state->type_AccountsSettingsPaneCommandsRequestedEventArgs = py::register_python_type(module.get(), type_name_AccountsSettingsPaneCommandsRequestedEventArgs, &type_spec_AccountsSettingsPaneCommandsRequestedEventArgs, bases.get(), nullptr);
    if (!state->type_AccountsSettingsPaneCommandsRequestedEventArgs)
    {
        return nullptr;
    }

    state->type_AccountsSettingsPaneEventDeferral = py::register_python_type(module.get(), type_name_AccountsSettingsPaneEventDeferral, &type_spec_AccountsSettingsPaneEventDeferral, bases.get(), nullptr);
    if (!state->type_AccountsSettingsPaneEventDeferral)
    {
        return nullptr;
    }

    state->type_CredentialCommand = py::register_python_type(module.get(), type_name_CredentialCommand, &type_spec_CredentialCommand, bases.get(), nullptr);
    if (!state->type_CredentialCommand)
    {
        return nullptr;
    }

    py::pyobj_handle type_SettingsCommand_Meta{PyType_FromSpec(&type_spec_SettingsCommand_Meta)};
    if (!type_SettingsCommand_Meta)
    {
        return nullptr;
    }

    state->type_SettingsCommand = py::register_python_type(module.get(), type_name_SettingsCommand, &type_spec_SettingsCommand, bases.get(), reinterpret_cast<PyTypeObject*>(type_SettingsCommand_Meta.get()));
    if (!state->type_SettingsCommand)
    {
        return nullptr;
    }

    py::pyobj_handle type_SettingsPane_Meta{PyType_FromSpec(&type_spec_SettingsPane_Meta)};
    if (!type_SettingsPane_Meta)
    {
        return nullptr;
    }

    state->type_SettingsPane = py::register_python_type(module.get(), type_name_SettingsPane, &type_spec_SettingsPane, bases.get(), reinterpret_cast<PyTypeObject*>(type_SettingsPane_Meta.get()));
    if (!state->type_SettingsPane)
    {
        return nullptr;
    }

    state->type_SettingsPaneCommandsRequest = py::register_python_type(module.get(), type_name_SettingsPaneCommandsRequest, &type_spec_SettingsPaneCommandsRequest, bases.get(), nullptr);
    if (!state->type_SettingsPaneCommandsRequest)
    {
        return nullptr;
    }

    state->type_SettingsPaneCommandsRequestedEventArgs = py::register_python_type(module.get(), type_name_SettingsPaneCommandsRequestedEventArgs, &type_spec_SettingsPaneCommandsRequestedEventArgs, bases.get(), nullptr);
    if (!state->type_SettingsPaneCommandsRequestedEventArgs)
    {
        return nullptr;
    }

    state->type_WebAccountCommand = py::register_python_type(module.get(), type_name_WebAccountCommand, &type_spec_WebAccountCommand, bases.get(), nullptr);
    if (!state->type_WebAccountCommand)
    {
        return nullptr;
    }

    state->type_WebAccountInvokedArgs = py::register_python_type(module.get(), type_name_WebAccountInvokedArgs, &type_spec_WebAccountInvokedArgs, bases.get(), nullptr);
    if (!state->type_WebAccountInvokedArgs)
    {
        return nullptr;
    }

    state->type_WebAccountProviderCommand = py::register_python_type(module.get(), type_name_WebAccountProviderCommand, &type_spec_WebAccountProviderCommand, bases.get(), nullptr);
    if (!state->type_WebAccountProviderCommand)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::UI::ApplicationSettings::SettingsEdgeLocation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SettingsEdgeLocation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::SettingsEdgeLocation is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::UI::ApplicationSettings::SupportedWebAccountActions>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SupportedWebAccountActions;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::SupportedWebAccountActions is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::UI::ApplicationSettings::WebAccountAction>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAccountAction;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::WebAccountAction is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AccountsSettingsPane;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AccountsSettingsPaneCommandsRequestedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AccountsSettingsPaneEventDeferral;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::CredentialCommand>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_CredentialCommand;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::CredentialCommand is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::SettingsCommand>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SettingsCommand;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::SettingsCommand is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::SettingsPane>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SettingsPane;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::SettingsPane is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SettingsPaneCommandsRequest;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SettingsPaneCommandsRequestedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountCommand>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAccountCommand;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::WebAccountCommand is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountInvokedArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAccountInvokedArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::WebAccountInvokedArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::ApplicationSettings;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAccountProviderCommand;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand is not registered");
        return nullptr;
    }

    return python_type;
}
