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

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

PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::CredentialCommand>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::SettingsCommand>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountCommand>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountInvokedArgs>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand>::python_type;

namespace py::cpp::Windows::UI::ApplicationSettings
{
    // ----- AccountsSettingsPane class --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* AccountsSettingsPane_GetForCurrentView(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        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
    {
        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* _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 },
        { "_from", reinterpret_cast<PyCFunction>(_from_AccountsSettingsPane), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AccountsSettingsPane[] = {
        { }
    };

    static PyType_Slot _type_slots_AccountsSettingsPane[] = 
    {
        { Py_tp_new, _new_AccountsSettingsPane },
        { Py_tp_dealloc, _dealloc_AccountsSettingsPane },
        { Py_tp_methods, _methods_AccountsSettingsPane },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* AccountsSettingsPaneCommandsRequestedEventArgs_GetDeferral(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.User());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 },
        { "_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, _new_AccountsSettingsPaneCommandsRequestedEventArgs },
        { Py_tp_dealloc, _dealloc_AccountsSettingsPaneCommandsRequestedEventArgs },
        { Py_tp_methods, _methods_AccountsSettingsPaneCommandsRequestedEventArgs },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* AccountsSettingsPaneEventDeferral_Complete(py::wrapper::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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* _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 },
        { "_from", reinterpret_cast<PyCFunction>(_from_AccountsSettingsPaneEventDeferral), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AccountsSettingsPaneEventDeferral[] = {
        { }
    };

    static PyType_Slot _type_slots_AccountsSettingsPaneEventDeferral[] = 
    {
        { Py_tp_new, _new_AccountsSettingsPaneEventDeferral },
        { Py_tp_dealloc, _dealloc_AccountsSettingsPaneEventDeferral },
        { Py_tp_methods, _methods_AccountsSettingsPaneEventDeferral },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* CredentialCommand_get_CredentialDeleted(py::wrapper::Windows::UI::ApplicationSettings::CredentialCommand* self, void* /*unused*/) noexcept
    {
        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
    {
        try
        {
            return py::convert(self->obj.PasswordCredential());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_CredentialCommand },
        { Py_tp_dealloc, _dealloc_CredentialCommand },
        { Py_tp_methods, _methods_CredentialCommand },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* SettingsCommand_get_Label(py::wrapper::Windows::UI::ApplicationSettings::SettingsCommand* self, void* /*unused*/) noexcept
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        try
        {
            return py::convert(winrt::Windows::UI::ApplicationSettings::SettingsCommand::AccountsCommand());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "get_accounts_command", reinterpret_cast<PyCFunction>(SettingsCommand_get_AccountsCommand), METH_NOARGS | 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, _new_SettingsCommand },
        { Py_tp_dealloc, _dealloc_SettingsCommand },
        { Py_tp_methods, _methods_SettingsCommand },
        { Py_tp_getset, _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
    };

    // ----- WebAccountCommand class --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* WebAccountCommand_get_Actions(py::wrapper::Windows::UI::ApplicationSettings::WebAccountCommand* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.WebAccount());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_WebAccountCommand },
        { Py_tp_dealloc, _dealloc_WebAccountCommand },
        { Py_tp_methods, _methods_WebAccountCommand },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* WebAccountInvokedArgs_get_Action(py::wrapper::Windows::UI::ApplicationSettings::WebAccountInvokedArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Action());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_WebAccountInvokedArgs },
        { Py_tp_dealloc, _dealloc_WebAccountInvokedArgs },
        { Py_tp_methods, _methods_WebAccountInvokedArgs },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* WebAccountProviderCommand_get_Invoked(py::wrapper::Windows::UI::ApplicationSettings::WebAccountProviderCommand* self, void* /*unused*/) noexcept
    {
        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
    {
        try
        {
            return py::convert(self->obj.WebAccountProvider());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_WebAccountProviderCommand },
        { Py_tp_dealloc, _dealloc_WebAccountProviderCommand },
        { Py_tp_methods, _methods_WebAccountProviderCommand },
        { Py_tp_getset, _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 --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::Object>::python_type) };

            py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane>::python_type = py::register_python_type(module, _type_name_AccountsSettingsPane, &_type_spec_AccountsSettingsPane, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs>::python_type = py::register_python_type(module, _type_name_AccountsSettingsPaneCommandsRequestedEventArgs, &_type_spec_AccountsSettingsPaneCommandsRequestedEventArgs, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral>::python_type = py::register_python_type(module, _type_name_AccountsSettingsPaneEventDeferral, &_type_spec_AccountsSettingsPaneEventDeferral, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::CredentialCommand>::python_type = py::register_python_type(module, _type_name_CredentialCommand, &_type_spec_CredentialCommand, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::SettingsCommand>::python_type = py::register_python_type(module, _type_name_SettingsCommand, &_type_spec_SettingsCommand, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountCommand>::python_type = py::register_python_type(module, _type_name_WebAccountCommand, &_type_spec_WebAccountCommand, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountInvokedArgs>::python_type = py::register_python_type(module, _type_name_WebAccountInvokedArgs, &_type_spec_WebAccountInvokedArgs, bases.get());
            py::winrt_type<winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand>::python_type = py::register_python_type(module, _type_name_WebAccountProviderCommand, &_type_spec_WebAccountProviderCommand, bases.get());

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

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

    PyDoc_STRVAR(module_doc, "Windows.UI.ApplicationSettings");

    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_UI_ApplicationSettings",
           module_doc,
           0,
           nullptr,
           module_slots,
           nullptr,
           nullptr,
           nullptr};
} // py::cpp::Windows::UI::ApplicationSettings

PyMODINIT_FUNC
PyInit__winsdk_Windows_UI_ApplicationSettings (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::UI::ApplicationSettings::module_def);
}
