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

#include "pybase.h"
#include "py.Windows.ApplicationModel.Store.Preview.InstallControl.h"


namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl
{
    struct module_state
    {
        PyObject* type_AppInstallState;
        PyObject* type_AppInstallType;
        PyObject* type_AppInstallationToastNotificationMode;
        PyObject* type_AutoUpdateSetting;
        PyObject* type_GetEntitlementStatus;
        PyTypeObject* type_AppInstallItem;
        PyTypeObject* type_AppInstallManager;
        PyTypeObject* type_AppInstallManagerItemEventArgs;
        PyTypeObject* type_AppInstallOptions;
        PyTypeObject* type_AppInstallStatus;
        PyTypeObject* type_AppUpdateOptions;
        PyTypeObject* type_GetEntitlementResult;
    };

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

    // ----- AppInstallItem class --------------------
    static constexpr const char* const type_name_AppInstallItem = "AppInstallItem";

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

    static void _dealloc_AppInstallItem(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* 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* AppInstallItem_Cancel(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Cancel", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Cancel();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Cancel", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AppInstallItem_GetCurrentStatus(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"GetCurrentStatus", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* AppInstallItem_Pause(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Pause", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Pause();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Pause", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AppInstallItem_Restart(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Restart", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Restart();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Restart", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AppInstallItem_get_InstallType(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"InstallType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallItem_get_IsUserInitiated(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"IsUserInitiated"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallItem_get_PackageFamilyName(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PackageFamilyName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallItem_get_ProductId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"ProductId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallItem_get_Children(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Children"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallItem_get_ItemOperationsMightAffectOtherItems(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"ItemOperationsMightAffectOtherItems"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallItem_get_LaunchAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"LaunchAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallItem_put_LaunchAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"LaunchAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallItem_get_PinToTaskbarAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PinToTaskbarAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallItem_put_PinToTaskbarAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PinToTaskbarAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallItem_get_PinToStartAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PinToStartAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallItem_put_PinToStartAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PinToStartAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallItem_get_PinToDesktopAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PinToDesktopAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallItem_put_PinToDesktopAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"PinToDesktopAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallItem_get_InstallInProgressToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"InstallInProgressToastNotificationMode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallItem_put_InstallInProgressToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"InstallInProgressToastNotificationMode"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallationToastNotificationMode>(arg);

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

    static PyObject* AppInstallItem_get_CompletedInstallToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"CompletedInstallToastNotificationMode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallItem_put_CompletedInstallToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"CompletedInstallToastNotificationMode"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallationToastNotificationMode>(arg);

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

    static PyObject* AppInstallItem_add_Completed(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Completed"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallItem, winrt::Windows::Foundation::IInspectable>>(arg);

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

    static PyObject* AppInstallItem_remove_Completed(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"Completed"))
        {
            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.Completed(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppInstallItem_add_StatusChanged(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"StatusChanged"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallItem, winrt::Windows::Foundation::IInspectable>>(arg);

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

    static PyObject* AppInstallItem_remove_StatusChanged(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem", L"StatusChanged"))
        {
            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.StatusChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_AppInstallItem(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AppInstallItem(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppInstallItem[] = {
        { "cancel", reinterpret_cast<PyCFunction>(AppInstallItem_Cancel), METH_VARARGS, nullptr },
        { "get_current_status", reinterpret_cast<PyCFunction>(AppInstallItem_GetCurrentStatus), METH_VARARGS, nullptr },
        { "pause", reinterpret_cast<PyCFunction>(AppInstallItem_Pause), METH_VARARGS, nullptr },
        { "restart", reinterpret_cast<PyCFunction>(AppInstallItem_Restart), METH_VARARGS, nullptr },
        { "add_completed", reinterpret_cast<PyCFunction>(AppInstallItem_add_Completed), METH_O, nullptr },
        { "remove_completed", reinterpret_cast<PyCFunction>(AppInstallItem_remove_Completed), METH_O, nullptr },
        { "add_status_changed", reinterpret_cast<PyCFunction>(AppInstallItem_add_StatusChanged), METH_O, nullptr },
        { "remove_status_changed", reinterpret_cast<PyCFunction>(AppInstallItem_remove_StatusChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_AppInstallItem, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppInstallItem), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AppInstallItem[] = {
        { "install_type", reinterpret_cast<getter>(AppInstallItem_get_InstallType), nullptr, nullptr, nullptr },
        { "is_user_initiated", reinterpret_cast<getter>(AppInstallItem_get_IsUserInitiated), nullptr, nullptr, nullptr },
        { "package_family_name", reinterpret_cast<getter>(AppInstallItem_get_PackageFamilyName), nullptr, nullptr, nullptr },
        { "product_id", reinterpret_cast<getter>(AppInstallItem_get_ProductId), nullptr, nullptr, nullptr },
        { "children", reinterpret_cast<getter>(AppInstallItem_get_Children), nullptr, nullptr, nullptr },
        { "item_operations_might_affect_other_items", reinterpret_cast<getter>(AppInstallItem_get_ItemOperationsMightAffectOtherItems), nullptr, nullptr, nullptr },
        { "launch_after_install", reinterpret_cast<getter>(AppInstallItem_get_LaunchAfterInstall), reinterpret_cast<setter>(AppInstallItem_put_LaunchAfterInstall), nullptr, nullptr },
        { "pin_to_taskbar_after_install", reinterpret_cast<getter>(AppInstallItem_get_PinToTaskbarAfterInstall), reinterpret_cast<setter>(AppInstallItem_put_PinToTaskbarAfterInstall), nullptr, nullptr },
        { "pin_to_start_after_install", reinterpret_cast<getter>(AppInstallItem_get_PinToStartAfterInstall), reinterpret_cast<setter>(AppInstallItem_put_PinToStartAfterInstall), nullptr, nullptr },
        { "pin_to_desktop_after_install", reinterpret_cast<getter>(AppInstallItem_get_PinToDesktopAfterInstall), reinterpret_cast<setter>(AppInstallItem_put_PinToDesktopAfterInstall), nullptr, nullptr },
        { "install_in_progress_toast_notification_mode", reinterpret_cast<getter>(AppInstallItem_get_InstallInProgressToastNotificationMode), reinterpret_cast<setter>(AppInstallItem_put_InstallInProgressToastNotificationMode), nullptr, nullptr },
        { "completed_install_toast_notification_mode", reinterpret_cast<getter>(AppInstallItem_get_CompletedInstallToastNotificationMode), reinterpret_cast<setter>(AppInstallItem_put_CompletedInstallToastNotificationMode), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AppInstallItem[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppInstallItem) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppInstallItem) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppInstallItem) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppInstallItem) },
        { },
    };

    static PyType_Spec type_spec_AppInstallItem =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.AppInstallItem",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppInstallItem
    };

    // ----- AppInstallManager class --------------------
    static constexpr const char* const type_name_AppInstallManager = "AppInstallManager";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_AppInstallManager(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* 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* AppInstallManager_Cancel(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"Cancel", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                self->obj.Cancel(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"Cancel", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                self->obj.Cancel(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_GetFreeDeviceEntitlementAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetFreeDeviceEntitlementAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_GetFreeUserEntitlementAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetFreeUserEntitlementAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_GetFreeUserEntitlementForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetFreeUserEntitlementForUserAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);

                return py::convert(self->obj.GetFreeUserEntitlementForUserAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_GetIsAppAllowedToInstallAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsAppAllowedToInstallAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(self->obj.GetIsAppAllowedToInstallAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsAppAllowedToInstallAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);

                return py::convert(self->obj.GetIsAppAllowedToInstallAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_GetIsAppAllowedToInstallForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 5)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsAppAllowedToInstallForUserAsync", 5))
            {
                py::set_arg_count_version_error(5);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::hstring>(args, 4);

                return py::convert(self->obj.GetIsAppAllowedToInstallForUserAsync(param0, param1, param2, param3, param4));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_GetIsApplicableAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsApplicableAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_GetIsApplicableForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsApplicableForUserAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_GetIsPackageIdentityAllowedToInstallAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsPackageIdentityAllowedToInstallAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_GetIsPackageIdentityAllowedToInstallForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"GetIsPackageIdentityAllowedToInstallForUserAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);

                return py::convert(self->obj.GetIsPackageIdentityAllowedToInstallForUserAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_IsStoreBlockedByPolicyAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"IsStoreBlockedByPolicyAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_MoveToFrontOfDownloadQueue(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"MoveToFrontOfDownloadQueue", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                self->obj.MoveToFrontOfDownloadQueue(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_Pause(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"Pause", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                self->obj.Pause(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"Pause", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                self->obj.Pause(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_Restart(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"Restart", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                self->obj.Restart(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"Restart", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                self->obj.Restart(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_SearchForAllUpdatesAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForAllUpdatesAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.SearchForAllUpdatesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForAllUpdatesAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(self->obj.SearchForAllUpdatesAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForAllUpdatesAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>(args, 2);

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

    static PyObject* AppInstallManager_SearchForAllUpdatesForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForAllUpdatesForUserAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                return py::convert(self->obj.SearchForAllUpdatesForUserAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForAllUpdatesForUserAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>(args, 3);

                return py::convert(self->obj.SearchForAllUpdatesForUserAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_SearchForUpdatesAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForUpdatesAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                return py::convert(self->obj.SearchForUpdatesAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForUpdatesAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);

                return py::convert(self->obj.SearchForUpdatesAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 5)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForUpdatesAsync", 5))
            {
                py::set_arg_count_version_error(5);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>(args, 4);

                return py::convert(self->obj.SearchForUpdatesAsync(param0, param1, param2, param3, param4));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_SearchForUpdatesForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 5)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForUpdatesForUserAsync", 5))
            {
                py::set_arg_count_version_error(5);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::hstring>(args, 4);

                return py::convert(self->obj.SearchForUpdatesForUserAsync(param0, param1, param2, param3, param4));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 6)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"SearchForUpdatesForUserAsync", 6))
            {
                py::set_arg_count_version_error(6);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::hstring>(args, 4);
                auto param5 = py::convert_to<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>(args, 5);

                return py::convert(self->obj.SearchForUpdatesForUserAsync(param0, param1, param2, param3, param4, param5));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_StartAppInstallAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"StartAppInstallAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<bool>(args, 2);
                auto param3 = py::convert_to<bool>(args, 3);

                return py::convert(self->obj.StartAppInstallAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 7)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"StartAppInstallAsync", 7))
            {
                py::set_arg_count_version_error(7);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<bool>(args, 2);
                auto param3 = py::convert_to<bool>(args, 3);
                auto param4 = py::convert_to<winrt::hstring>(args, 4);
                auto param5 = py::convert_to<winrt::hstring>(args, 5);
                auto param6 = py::convert_to<winrt::hstring>(args, 6);

                return py::convert(self->obj.StartAppInstallAsync(param0, param1, param2, param3, param4, param5, param6));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_StartProductInstallAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 5)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"StartProductInstallAsync", 5))
            {
                py::set_arg_count_version_error(5);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions>(args, 4);

                return py::convert(self->obj.StartProductInstallAsync(param0, param1, param2, param3, param4));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 8)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"StartProductInstallAsync", 8))
            {
                py::set_arg_count_version_error(8);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<bool>(args, 4);
                auto param5 = py::convert_to<bool>(args, 5);
                auto param6 = py::convert_to<winrt::hstring>(args, 6);
                auto param7 = py::convert_to<winrt::Windows::Management::Deployment::PackageVolume>(args, 7);

                return py::convert(self->obj.StartProductInstallAsync(param0, param1, param2, param3, param4, param5, param6, param7));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_StartProductInstallForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 6)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"StartProductInstallForUserAsync", 6))
            {
                py::set_arg_count_version_error(6);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::hstring>(args, 4);
                auto param5 = py::convert_to<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions>(args, 5);

                return py::convert(self->obj.StartProductInstallForUserAsync(param0, param1, param2, param3, param4, param5));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 9)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"StartProductInstallForUserAsync", 9))
            {
                py::set_arg_count_version_error(9);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);
                auto param4 = py::convert_to<winrt::hstring>(args, 4);
                auto param5 = py::convert_to<bool>(args, 5);
                auto param6 = py::convert_to<bool>(args, 6);
                auto param7 = py::convert_to<winrt::hstring>(args, 7);
                auto param8 = py::convert_to<winrt::Windows::Management::Deployment::PackageVolume>(args, 8);

                return py::convert(self->obj.StartProductInstallForUserAsync(param0, param1, param2, param3, param4, param5, param6, param7, param8));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_UpdateAppByPackageFamilyNameAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"UpdateAppByPackageFamilyNameAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(self->obj.UpdateAppByPackageFamilyNameAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"UpdateAppByPackageFamilyNameAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_UpdateAppByPackageFamilyNameForUserAsync(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"UpdateAppByPackageFamilyNameForUserAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* AppInstallManager_get_AutoUpdateSetting(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"AutoUpdateSetting"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallManager_put_AutoUpdateSetting(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"AutoUpdateSetting"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AutoUpdateSetting>(arg);

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

    static PyObject* AppInstallManager_get_AcquisitionIdentity(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"AcquisitionIdentity"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallManager_put_AcquisitionIdentity(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"AcquisitionIdentity"))
        {
            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.AcquisitionIdentity(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* AppInstallManager_get_AppInstallItems(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"AppInstallItems"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallManager_get_AppInstallItemsWithGroupSupport(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"AppInstallItemsWithGroupSupport"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallManager_get_CanInstallForAllUsers(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"CanInstallForAllUsers"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallManager_add_ItemCompleted(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"ItemCompleted"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallManager, winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs>>(arg);

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

    static PyObject* AppInstallManager_remove_ItemCompleted(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"ItemCompleted"))
        {
            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.ItemCompleted(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppInstallManager_add_ItemStatusChanged(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"ItemStatusChanged"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallManager, winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs>>(arg);

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

    static PyObject* AppInstallManager_remove_ItemStatusChanged(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager", L"ItemStatusChanged"))
        {
            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.ItemStatusChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_AppInstallManager(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AppInstallManager(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppInstallManager[] = {
        { "cancel", reinterpret_cast<PyCFunction>(AppInstallManager_Cancel), METH_VARARGS, nullptr },
        { "get_free_device_entitlement_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetFreeDeviceEntitlementAsync), METH_VARARGS, nullptr },
        { "get_free_user_entitlement_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetFreeUserEntitlementAsync), METH_VARARGS, nullptr },
        { "get_free_user_entitlement_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetFreeUserEntitlementForUserAsync), METH_VARARGS, nullptr },
        { "get_is_app_allowed_to_install_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetIsAppAllowedToInstallAsync), METH_VARARGS, nullptr },
        { "get_is_app_allowed_to_install_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetIsAppAllowedToInstallForUserAsync), METH_VARARGS, nullptr },
        { "get_is_applicable_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetIsApplicableAsync), METH_VARARGS, nullptr },
        { "get_is_applicable_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetIsApplicableForUserAsync), METH_VARARGS, nullptr },
        { "get_is_package_identity_allowed_to_install_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetIsPackageIdentityAllowedToInstallAsync), METH_VARARGS, nullptr },
        { "get_is_package_identity_allowed_to_install_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_GetIsPackageIdentityAllowedToInstallForUserAsync), METH_VARARGS, nullptr },
        { "is_store_blocked_by_policy_async", reinterpret_cast<PyCFunction>(AppInstallManager_IsStoreBlockedByPolicyAsync), METH_VARARGS, nullptr },
        { "move_to_front_of_download_queue", reinterpret_cast<PyCFunction>(AppInstallManager_MoveToFrontOfDownloadQueue), METH_VARARGS, nullptr },
        { "pause", reinterpret_cast<PyCFunction>(AppInstallManager_Pause), METH_VARARGS, nullptr },
        { "restart", reinterpret_cast<PyCFunction>(AppInstallManager_Restart), METH_VARARGS, nullptr },
        { "search_for_all_updates_async", reinterpret_cast<PyCFunction>(AppInstallManager_SearchForAllUpdatesAsync), METH_VARARGS, nullptr },
        { "search_for_all_updates_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_SearchForAllUpdatesForUserAsync), METH_VARARGS, nullptr },
        { "search_for_updates_async", reinterpret_cast<PyCFunction>(AppInstallManager_SearchForUpdatesAsync), METH_VARARGS, nullptr },
        { "search_for_updates_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_SearchForUpdatesForUserAsync), METH_VARARGS, nullptr },
        { "start_app_install_async", reinterpret_cast<PyCFunction>(AppInstallManager_StartAppInstallAsync), METH_VARARGS, nullptr },
        { "start_product_install_async", reinterpret_cast<PyCFunction>(AppInstallManager_StartProductInstallAsync), METH_VARARGS, nullptr },
        { "start_product_install_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_StartProductInstallForUserAsync), METH_VARARGS, nullptr },
        { "update_app_by_package_family_name_async", reinterpret_cast<PyCFunction>(AppInstallManager_UpdateAppByPackageFamilyNameAsync), METH_VARARGS, nullptr },
        { "update_app_by_package_family_name_for_user_async", reinterpret_cast<PyCFunction>(AppInstallManager_UpdateAppByPackageFamilyNameForUserAsync), METH_VARARGS, nullptr },
        { "add_item_completed", reinterpret_cast<PyCFunction>(AppInstallManager_add_ItemCompleted), METH_O, nullptr },
        { "remove_item_completed", reinterpret_cast<PyCFunction>(AppInstallManager_remove_ItemCompleted), METH_O, nullptr },
        { "add_item_status_changed", reinterpret_cast<PyCFunction>(AppInstallManager_add_ItemStatusChanged), METH_O, nullptr },
        { "remove_item_status_changed", reinterpret_cast<PyCFunction>(AppInstallManager_remove_ItemStatusChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_AppInstallManager, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppInstallManager), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AppInstallManager[] = {
        { "auto_update_setting", reinterpret_cast<getter>(AppInstallManager_get_AutoUpdateSetting), reinterpret_cast<setter>(AppInstallManager_put_AutoUpdateSetting), nullptr, nullptr },
        { "acquisition_identity", reinterpret_cast<getter>(AppInstallManager_get_AcquisitionIdentity), reinterpret_cast<setter>(AppInstallManager_put_AcquisitionIdentity), nullptr, nullptr },
        { "app_install_items", reinterpret_cast<getter>(AppInstallManager_get_AppInstallItems), nullptr, nullptr, nullptr },
        { "app_install_items_with_group_support", reinterpret_cast<getter>(AppInstallManager_get_AppInstallItemsWithGroupSupport), nullptr, nullptr, nullptr },
        { "can_install_for_all_users", reinterpret_cast<getter>(AppInstallManager_get_CanInstallForAllUsers), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AppInstallManager[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppInstallManager) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppInstallManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppInstallManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppInstallManager) },
        { },
    };

    static PyType_Spec type_spec_AppInstallManager =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.AppInstallManager",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppInstallManager
    };

    // ----- AppInstallManagerItemEventArgs class --------------------
    static constexpr const char* const type_name_AppInstallManagerItemEventArgs = "AppInstallManagerItemEventArgs";

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

    static void _dealloc_AppInstallManagerItemEventArgs(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs* 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* AppInstallManagerItemEventArgs_get_Item(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManagerItemEventArgs", L"Item"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_AppInstallManagerItemEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AppInstallManagerItemEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppInstallManagerItemEventArgs[] = {
        { "_assign_array_", _assign_array_AppInstallManagerItemEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppInstallManagerItemEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AppInstallManagerItemEventArgs[] = {
        { "item", reinterpret_cast<getter>(AppInstallManagerItemEventArgs_get_Item), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AppInstallManagerItemEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppInstallManagerItemEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppInstallManagerItemEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppInstallManagerItemEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppInstallManagerItemEventArgs) },
        { },
    };

    static PyType_Spec type_spec_AppInstallManagerItemEventArgs =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.AppInstallManagerItemEventArgs",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppInstallManagerItemEventArgs
    };

    // ----- AppInstallOptions class --------------------
    static constexpr const char* const type_name_AppInstallOptions = "AppInstallOptions";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_AppInstallOptions(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* 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* AppInstallOptions_get_TargetVolume(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"TargetVolume"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_TargetVolume(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"TargetVolume"))
        {
            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::Management::Deployment::PackageVolume>(arg);

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

    static PyObject* AppInstallOptions_get_Repair(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"Repair"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_Repair(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"Repair"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_LaunchAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"LaunchAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_LaunchAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"LaunchAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_ForceUseOfNonRemovableStorage(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"ForceUseOfNonRemovableStorage"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_ForceUseOfNonRemovableStorage(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"ForceUseOfNonRemovableStorage"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_CatalogId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"CatalogId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_CatalogId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"CatalogId"))
        {
            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.CatalogId(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* AppInstallOptions_get_AllowForcedAppRestart(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"AllowForcedAppRestart"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_AllowForcedAppRestart(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"AllowForcedAppRestart"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_StageButDoNotInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"StageButDoNotInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_StageButDoNotInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"StageButDoNotInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_PinToTaskbarAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"PinToTaskbarAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_PinToTaskbarAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"PinToTaskbarAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_PinToStartAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"PinToStartAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_PinToStartAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"PinToStartAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_PinToDesktopAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"PinToDesktopAfterInstall"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_PinToDesktopAfterInstall(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"PinToDesktopAfterInstall"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_InstallInProgressToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"InstallInProgressToastNotificationMode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_InstallInProgressToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"InstallInProgressToastNotificationMode"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallationToastNotificationMode>(arg);

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

    static PyObject* AppInstallOptions_get_InstallForAllUsers(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"InstallForAllUsers"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_InstallForAllUsers(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"InstallForAllUsers"))
        {
            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<bool>(arg);

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

    static PyObject* AppInstallOptions_get_ExtendedCampaignId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"ExtendedCampaignId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_ExtendedCampaignId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"ExtendedCampaignId"))
        {
            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.ExtendedCampaignId(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* AppInstallOptions_get_CompletedInstallToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"CompletedInstallToastNotificationMode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_CompletedInstallToastNotificationMode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"CompletedInstallToastNotificationMode"))
        {
            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::ApplicationModel::Store::Preview::InstallControl::AppInstallationToastNotificationMode>(arg);

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

    static PyObject* AppInstallOptions_get_CampaignId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"CampaignId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppInstallOptions_put_CampaignId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallOptions", L"CampaignId"))
        {
            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.CampaignId(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _assign_array_AppInstallOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AppInstallOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppInstallOptions[] = {
        { "_assign_array_", _assign_array_AppInstallOptions, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppInstallOptions), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AppInstallOptions[] = {
        { "target_volume", reinterpret_cast<getter>(AppInstallOptions_get_TargetVolume), reinterpret_cast<setter>(AppInstallOptions_put_TargetVolume), nullptr, nullptr },
        { "repair", reinterpret_cast<getter>(AppInstallOptions_get_Repair), reinterpret_cast<setter>(AppInstallOptions_put_Repair), nullptr, nullptr },
        { "launch_after_install", reinterpret_cast<getter>(AppInstallOptions_get_LaunchAfterInstall), reinterpret_cast<setter>(AppInstallOptions_put_LaunchAfterInstall), nullptr, nullptr },
        { "force_use_of_non_removable_storage", reinterpret_cast<getter>(AppInstallOptions_get_ForceUseOfNonRemovableStorage), reinterpret_cast<setter>(AppInstallOptions_put_ForceUseOfNonRemovableStorage), nullptr, nullptr },
        { "catalog_id", reinterpret_cast<getter>(AppInstallOptions_get_CatalogId), reinterpret_cast<setter>(AppInstallOptions_put_CatalogId), nullptr, nullptr },
        { "allow_forced_app_restart", reinterpret_cast<getter>(AppInstallOptions_get_AllowForcedAppRestart), reinterpret_cast<setter>(AppInstallOptions_put_AllowForcedAppRestart), nullptr, nullptr },
        { "stage_but_do_not_install", reinterpret_cast<getter>(AppInstallOptions_get_StageButDoNotInstall), reinterpret_cast<setter>(AppInstallOptions_put_StageButDoNotInstall), nullptr, nullptr },
        { "pin_to_taskbar_after_install", reinterpret_cast<getter>(AppInstallOptions_get_PinToTaskbarAfterInstall), reinterpret_cast<setter>(AppInstallOptions_put_PinToTaskbarAfterInstall), nullptr, nullptr },
        { "pin_to_start_after_install", reinterpret_cast<getter>(AppInstallOptions_get_PinToStartAfterInstall), reinterpret_cast<setter>(AppInstallOptions_put_PinToStartAfterInstall), nullptr, nullptr },
        { "pin_to_desktop_after_install", reinterpret_cast<getter>(AppInstallOptions_get_PinToDesktopAfterInstall), reinterpret_cast<setter>(AppInstallOptions_put_PinToDesktopAfterInstall), nullptr, nullptr },
        { "install_in_progress_toast_notification_mode", reinterpret_cast<getter>(AppInstallOptions_get_InstallInProgressToastNotificationMode), reinterpret_cast<setter>(AppInstallOptions_put_InstallInProgressToastNotificationMode), nullptr, nullptr },
        { "install_for_all_users", reinterpret_cast<getter>(AppInstallOptions_get_InstallForAllUsers), reinterpret_cast<setter>(AppInstallOptions_put_InstallForAllUsers), nullptr, nullptr },
        { "extended_campaign_id", reinterpret_cast<getter>(AppInstallOptions_get_ExtendedCampaignId), reinterpret_cast<setter>(AppInstallOptions_put_ExtendedCampaignId), nullptr, nullptr },
        { "completed_install_toast_notification_mode", reinterpret_cast<getter>(AppInstallOptions_get_CompletedInstallToastNotificationMode), reinterpret_cast<setter>(AppInstallOptions_put_CompletedInstallToastNotificationMode), nullptr, nullptr },
        { "campaign_id", reinterpret_cast<getter>(AppInstallOptions_get_CampaignId), reinterpret_cast<setter>(AppInstallOptions_put_CampaignId), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AppInstallOptions[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppInstallOptions) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppInstallOptions) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppInstallOptions) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppInstallOptions) },
        { },
    };

    static PyType_Spec type_spec_AppInstallOptions =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.AppInstallOptions",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppInstallOptions
    };

    // ----- AppInstallStatus class --------------------
    static constexpr const char* const type_name_AppInstallStatus = "AppInstallStatus";

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

    static void _dealloc_AppInstallStatus(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* 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* AppInstallStatus_get_BytesDownloaded(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"BytesDownloaded"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallStatus_get_DownloadSizeInBytes(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"DownloadSizeInBytes"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallStatus_get_ErrorCode(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"ErrorCode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallStatus_get_InstallState(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"InstallState"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallStatus_get_PercentComplete(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"PercentComplete"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallStatus_get_ReadyForLaunch(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"ReadyForLaunch"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AppInstallStatus_get_User(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", 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* AppInstallStatus_get_IsStaged(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallStatus", L"IsStaged"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_AppInstallStatus(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AppInstallStatus(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppInstallStatus[] = {
        { "_assign_array_", _assign_array_AppInstallStatus, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppInstallStatus), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AppInstallStatus[] = {
        { "bytes_downloaded", reinterpret_cast<getter>(AppInstallStatus_get_BytesDownloaded), nullptr, nullptr, nullptr },
        { "download_size_in_bytes", reinterpret_cast<getter>(AppInstallStatus_get_DownloadSizeInBytes), nullptr, nullptr, nullptr },
        { "error_code", reinterpret_cast<getter>(AppInstallStatus_get_ErrorCode), nullptr, nullptr, nullptr },
        { "install_state", reinterpret_cast<getter>(AppInstallStatus_get_InstallState), nullptr, nullptr, nullptr },
        { "percent_complete", reinterpret_cast<getter>(AppInstallStatus_get_PercentComplete), nullptr, nullptr, nullptr },
        { "ready_for_launch", reinterpret_cast<getter>(AppInstallStatus_get_ReadyForLaunch), nullptr, nullptr, nullptr },
        { "user", reinterpret_cast<getter>(AppInstallStatus_get_User), nullptr, nullptr, nullptr },
        { "is_staged", reinterpret_cast<getter>(AppInstallStatus_get_IsStaged), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AppInstallStatus[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppInstallStatus) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppInstallStatus) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppInstallStatus) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppInstallStatus) },
        { },
    };

    static PyType_Spec type_spec_AppInstallStatus =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.AppInstallStatus",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppInstallStatus
    };

    // ----- AppUpdateOptions class --------------------
    static constexpr const char* const type_name_AppUpdateOptions = "AppUpdateOptions";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_AppUpdateOptions(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* 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* AppUpdateOptions_get_CatalogId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions", L"CatalogId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppUpdateOptions_put_CatalogId(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions", L"CatalogId"))
        {
            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.CatalogId(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* AppUpdateOptions_get_AllowForcedAppRestart(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions", L"AllowForcedAppRestart"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppUpdateOptions_put_AllowForcedAppRestart(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions", L"AllowForcedAppRestart"))
        {
            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<bool>(arg);

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

    static PyObject* AppUpdateOptions_get_AutomaticallyDownloadAndInstallUpdateIfFound(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions", L"AutomaticallyDownloadAndInstallUpdateIfFound"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AppUpdateOptions_put_AutomaticallyDownloadAndInstallUpdateIfFound(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions", L"AutomaticallyDownloadAndInstallUpdateIfFound"))
        {
            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<bool>(arg);

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

    static PyObject* _assign_array_AppUpdateOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AppUpdateOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppUpdateOptions[] = {
        { "_assign_array_", _assign_array_AppUpdateOptions, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppUpdateOptions), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AppUpdateOptions[] = {
        { "catalog_id", reinterpret_cast<getter>(AppUpdateOptions_get_CatalogId), reinterpret_cast<setter>(AppUpdateOptions_put_CatalogId), nullptr, nullptr },
        { "allow_forced_app_restart", reinterpret_cast<getter>(AppUpdateOptions_get_AllowForcedAppRestart), reinterpret_cast<setter>(AppUpdateOptions_put_AllowForcedAppRestart), nullptr, nullptr },
        { "automatically_download_and_install_update_if_found", reinterpret_cast<getter>(AppUpdateOptions_get_AutomaticallyDownloadAndInstallUpdateIfFound), reinterpret_cast<setter>(AppUpdateOptions_put_AutomaticallyDownloadAndInstallUpdateIfFound), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AppUpdateOptions[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppUpdateOptions) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppUpdateOptions) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppUpdateOptions) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppUpdateOptions) },
        { },
    };

    static PyType_Spec type_spec_AppUpdateOptions =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.AppUpdateOptions",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppUpdateOptions
    };

    // ----- GetEntitlementResult class --------------------
    static constexpr const char* const type_name_GetEntitlementResult = "GetEntitlementResult";

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

    static void _dealloc_GetEntitlementResult(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult* 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* GetEntitlementResult_get_Status(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.Preview.InstallControl.GetEntitlementResult", L"Status"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_GetEntitlementResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_GetEntitlementResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_GetEntitlementResult[] = {
        { "_assign_array_", _assign_array_GetEntitlementResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_GetEntitlementResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_GetEntitlementResult[] = {
        { "status", reinterpret_cast<getter>(GetEntitlementResult_get_Status), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_GetEntitlementResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_GetEntitlementResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_GetEntitlementResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_GetEntitlementResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_GetEntitlementResult) },
        { },
    };

    static PyType_Spec type_spec_GetEntitlementResult =
    {
        "_winsdk_Windows_ApplicationModel_Store_Preview_InstallControl.GetEntitlementResult",
        sizeof(py::wrapper::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_GetEntitlementResult
    };

    // ----- Windows.ApplicationModel.Store.Preview.InstallControl Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Store::Preview::InstallControl");

    static PyMethodDef module_methods[] = {
        {"_register_AppInstallState", register_AppInstallState, METH_O, "registers type"},
        {"_register_AppInstallType", register_AppInstallType, METH_O, "registers type"},
        {"_register_AppInstallationToastNotificationMode", register_AppInstallationToastNotificationMode, METH_O, "registers type"},
        {"_register_AutoUpdateSetting", register_AutoUpdateSetting, METH_O, "registers type"},
        {"_register_GetEntitlementStatus", register_GetEntitlementStatus, 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_AppInstallState);
        Py_VISIT(state->type_AppInstallType);
        Py_VISIT(state->type_AppInstallationToastNotificationMode);
        Py_VISIT(state->type_AutoUpdateSetting);
        Py_VISIT(state->type_GetEntitlementStatus);
        Py_VISIT(state->type_AppInstallItem);
        Py_VISIT(state->type_AppInstallManager);
        Py_VISIT(state->type_AppInstallManagerItemEventArgs);
        Py_VISIT(state->type_AppInstallOptions);
        Py_VISIT(state->type_AppInstallStatus);
        Py_VISIT(state->type_AppUpdateOptions);
        Py_VISIT(state->type_GetEntitlementResult);

        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_AppInstallState);
        Py_CLEAR(state->type_AppInstallType);
        Py_CLEAR(state->type_AppInstallationToastNotificationMode);
        Py_CLEAR(state->type_AutoUpdateSetting);
        Py_CLEAR(state->type_GetEntitlementStatus);
        Py_CLEAR(state->type_AppInstallItem);
        Py_CLEAR(state->type_AppInstallManager);
        Py_CLEAR(state->type_AppInstallManagerItemEventArgs);
        Py_CLEAR(state->type_AppInstallOptions);
        Py_CLEAR(state->type_AppInstallStatus);
        Py_CLEAR(state->type_AppUpdateOptions);
        Py_CLEAR(state->type_GetEntitlementResult);

        return 0;
    }


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

} // py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl

PyMODINIT_FUNC PyInit__winsdk_Windows_ApplicationModel_Store_Preview_InstallControl(void) noexcept
{
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    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_AppInstallItem = py::register_python_type(module.get(), type_name_AppInstallItem, &type_spec_AppInstallItem, bases.get(), nullptr);
    if (!state->type_AppInstallItem)
    {
        return nullptr;
    }

    state->type_AppInstallManager = py::register_python_type(module.get(), type_name_AppInstallManager, &type_spec_AppInstallManager, bases.get(), nullptr);
    if (!state->type_AppInstallManager)
    {
        return nullptr;
    }

    state->type_AppInstallManagerItemEventArgs = py::register_python_type(module.get(), type_name_AppInstallManagerItemEventArgs, &type_spec_AppInstallManagerItemEventArgs, bases.get(), nullptr);
    if (!state->type_AppInstallManagerItemEventArgs)
    {
        return nullptr;
    }

    state->type_AppInstallOptions = py::register_python_type(module.get(), type_name_AppInstallOptions, &type_spec_AppInstallOptions, bases.get(), nullptr);
    if (!state->type_AppInstallOptions)
    {
        return nullptr;
    }

    state->type_AppInstallStatus = py::register_python_type(module.get(), type_name_AppInstallStatus, &type_spec_AppInstallStatus, bases.get(), nullptr);
    if (!state->type_AppInstallStatus)
    {
        return nullptr;
    }

    state->type_AppUpdateOptions = py::register_python_type(module.get(), type_name_AppUpdateOptions, &type_spec_AppUpdateOptions, bases.get(), nullptr);
    if (!state->type_AppUpdateOptions)
    {
        return nullptr;
    }

    state->type_GetEntitlementResult = py::register_python_type(module.get(), type_name_GetEntitlementResult, &type_spec_GetEntitlementResult, bases.get(), nullptr);
    if (!state->type_GetEntitlementResult)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallState>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallState;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallState is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallationToastNotificationMode>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallationToastNotificationMode;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallationToastNotificationMode is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AutoUpdateSetting>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AutoUpdateSetting;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AutoUpdateSetting is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementStatus>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_GetEntitlementStatus;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementStatus is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallItem;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallManager;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallManagerItemEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallOptions;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallOptions is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppInstallStatus;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AppUpdateOptions;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppUpdateOptions is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Store::Preview::InstallControl;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_GetEntitlementResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Store::Preview::InstallControl::GetEntitlementResult is not registered");
        return nullptr;
    }

    return python_type;
}
