// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0

#include "py.Windows.ApplicationModel.DataTransfer.DragDrop.Core.h"

namespace py::cpp::Windows::ApplicationModel::DataTransfer::DragDrop::Core
{
    // ----- CoreDragDropManager class --------------------

    static PyObject* _new_CoreDragDropManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager>::type_name);
        return nullptr;
    }

    static void _dealloc_CoreDragDropManager(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

        if (arg_count == 0)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager", L"GetForCurrentView", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager::GetForCurrentView());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* CoreDragDropManager_get_AreConcurrentOperationsEnabled(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager", L"AreConcurrentOperationsEnabled"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragDropManager_put_AreConcurrentOperationsEnabled(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager", L"AreConcurrentOperationsEnabled"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<bool>(arg);

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

    static PyObject* CoreDragDropManager_add_TargetRequested(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager* self, PyObject* arg) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager", L"TargetRequested"))
            {
                PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
                return nullptr;
            }

            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager, winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs>>(arg);

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

    static PyObject* CoreDragDropManager_remove_TargetRequested(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager* self, PyObject* arg) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager", L"TargetRequested"))
            {
                PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _assign_array_CoreDragDropManager(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_CoreDragDropManager(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::DataTransfer::DragDrop::Core::CoreDragDropManager>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CoreDragDropManager[] = {
        { "add_target_requested", reinterpret_cast<PyCFunction>(CoreDragDropManager_add_TargetRequested), METH_O, nullptr },
        { "remove_target_requested", reinterpret_cast<PyCFunction>(CoreDragDropManager_remove_TargetRequested), METH_O, nullptr },
        { "_assign_array_", _assign_array_CoreDragDropManager, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CoreDragDropManager), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CoreDragDropManager[] = {
        { "are_concurrent_operations_enabled", reinterpret_cast<getter>(CoreDragDropManager_get_AreConcurrentOperationsEnabled), reinterpret_cast<setter>(CoreDragDropManager_put_AreConcurrentOperationsEnabled), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CoreDragDropManager[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CoreDragDropManager) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CoreDragDropManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CoreDragDropManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CoreDragDropManager) },
        { }
    };

    static PyType_Spec type_spec_CoreDragDropManager = {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.CoreDragDropManager",
        sizeof(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CoreDragDropManager};

    static PyGetSetDef getset_CoreDragDropManager_Static[] = {
        { }
    };

    static PyMethodDef methods_CoreDragDropManager_Static[] = {
        { "get_for_current_view", reinterpret_cast<PyCFunction>(CoreDragDropManager_GetForCurrentView), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_CoreDragDropManager_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_CoreDragDropManager_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_CoreDragDropManager_Static) },
        { }
    };

    static PyType_Spec type_spec_CoreDragDropManager_Static =
    {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.CoreDragDropManager_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_CoreDragDropManager_Static
    };

    // ----- CoreDragInfo class --------------------

    static PyObject* _new_CoreDragInfo(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>::type_name);
        return nullptr;
    }

    static void _dealloc_CoreDragInfo(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* CoreDragInfo_get_Data(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo", L"Data"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* CoreDragInfo_get_Modifiers(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo", L"Modifiers"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* CoreDragInfo_get_Position(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo", L"Position"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* CoreDragInfo_get_AllowedOperations(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo", L"AllowedOperations"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* _assign_array_CoreDragInfo(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_CoreDragInfo(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::DataTransfer::DragDrop::Core::CoreDragInfo>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CoreDragInfo[] = {
        { "_assign_array_", _assign_array_CoreDragInfo, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CoreDragInfo), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CoreDragInfo[] = {
        { "data", reinterpret_cast<getter>(CoreDragInfo_get_Data), nullptr, nullptr, nullptr },
        { "modifiers", reinterpret_cast<getter>(CoreDragInfo_get_Modifiers), nullptr, nullptr, nullptr },
        { "position", reinterpret_cast<getter>(CoreDragInfo_get_Position), nullptr, nullptr, nullptr },
        { "allowed_operations", reinterpret_cast<getter>(CoreDragInfo_get_AllowedOperations), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CoreDragInfo[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CoreDragInfo) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CoreDragInfo) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CoreDragInfo) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CoreDragInfo) },
        { }
    };

    static PyType_Spec type_spec_CoreDragInfo = {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.CoreDragInfo",
        sizeof(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CoreDragInfo};

    // ----- CoreDragOperation class --------------------

    static PyObject* _new_CoreDragOperation(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::DataTransfer::DragDrop::Core::CoreDragOperation 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_CoreDragOperation(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* CoreDragOperation_SetDragUIContentFromSoftwareBitmap(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"SetDragUIContentFromSoftwareBitmap", 1))
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Graphics::Imaging::SoftwareBitmap>(args, 0);

                self->obj.SetDragUIContentFromSoftwareBitmap(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"SetDragUIContentFromSoftwareBitmap", 2))
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Graphics::Imaging::SoftwareBitmap>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Point>(args, 1);

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

    static PyObject* CoreDragOperation_SetPointerId(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"SetPointerId", 1))
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<uint32_t>(args, 0);

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

    static PyObject* CoreDragOperation_StartAsync(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"StartAsync", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* CoreDragOperation_get_DragUIContentMode(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"DragUIContentMode"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragOperation_put_DragUIContentMode(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"DragUIContentMode"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIContentMode>(arg);

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

    static PyObject* CoreDragOperation_get_Data(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"Data"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* CoreDragOperation_get_AllowedOperations(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"AllowedOperations"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragOperation_put_AllowedOperations(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation", L"AllowedOperations"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation>(arg);

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

    static PyObject* _assign_array_CoreDragOperation(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_CoreDragOperation(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::DataTransfer::DragDrop::Core::CoreDragOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CoreDragOperation[] = {
        { "set_drag_u_i_content_from_software_bitmap", reinterpret_cast<PyCFunction>(CoreDragOperation_SetDragUIContentFromSoftwareBitmap), METH_VARARGS, nullptr },
        { "set_pointer_id", reinterpret_cast<PyCFunction>(CoreDragOperation_SetPointerId), METH_VARARGS, nullptr },
        { "start_async", reinterpret_cast<PyCFunction>(CoreDragOperation_StartAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_CoreDragOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CoreDragOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CoreDragOperation[] = {
        { "drag_u_i_content_mode", reinterpret_cast<getter>(CoreDragOperation_get_DragUIContentMode), reinterpret_cast<setter>(CoreDragOperation_put_DragUIContentMode), nullptr, nullptr },
        { "data", reinterpret_cast<getter>(CoreDragOperation_get_Data), nullptr, nullptr, nullptr },
        { "allowed_operations", reinterpret_cast<getter>(CoreDragOperation_get_AllowedOperations), reinterpret_cast<setter>(CoreDragOperation_put_AllowedOperations), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CoreDragOperation[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CoreDragOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CoreDragOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CoreDragOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CoreDragOperation) },
        { }
    };

    static PyType_Spec type_spec_CoreDragOperation = {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.CoreDragOperation",
        sizeof(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CoreDragOperation};

    // ----- CoreDragUIOverride class --------------------

    static PyObject* _new_CoreDragUIOverride(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride>::type_name);
        return nullptr;
    }

    static void _dealloc_CoreDragUIOverride(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* CoreDragUIOverride_Clear(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"Clear", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* CoreDragUIOverride_SetContentFromSoftwareBitmap(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"SetContentFromSoftwareBitmap", 1))
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Graphics::Imaging::SoftwareBitmap>(args, 0);

                self->obj.SetContentFromSoftwareBitmap(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"SetContentFromSoftwareBitmap", 2))
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Graphics::Imaging::SoftwareBitmap>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Point>(args, 1);

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

    static PyObject* CoreDragUIOverride_get_IsGlyphVisible(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"IsGlyphVisible"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragUIOverride_put_IsGlyphVisible(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"IsGlyphVisible"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<bool>(arg);

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

    static PyObject* CoreDragUIOverride_get_IsContentVisible(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"IsContentVisible"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragUIOverride_put_IsContentVisible(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"IsContentVisible"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<bool>(arg);

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

    static PyObject* CoreDragUIOverride_get_IsCaptionVisible(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"IsCaptionVisible"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragUIOverride_put_IsCaptionVisible(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"IsCaptionVisible"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<bool>(arg);

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

    static PyObject* CoreDragUIOverride_get_Caption(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, void* /*unused*/) noexcept
    {
        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"Caption"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static int CoreDragUIOverride_put_Caption(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride", L"Caption"))
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* _assign_array_CoreDragUIOverride(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_CoreDragUIOverride(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::DataTransfer::DragDrop::Core::CoreDragUIOverride>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CoreDragUIOverride[] = {
        { "clear", reinterpret_cast<PyCFunction>(CoreDragUIOverride_Clear), METH_VARARGS, nullptr },
        { "set_content_from_software_bitmap", reinterpret_cast<PyCFunction>(CoreDragUIOverride_SetContentFromSoftwareBitmap), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_CoreDragUIOverride, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CoreDragUIOverride), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CoreDragUIOverride[] = {
        { "is_glyph_visible", reinterpret_cast<getter>(CoreDragUIOverride_get_IsGlyphVisible), reinterpret_cast<setter>(CoreDragUIOverride_put_IsGlyphVisible), nullptr, nullptr },
        { "is_content_visible", reinterpret_cast<getter>(CoreDragUIOverride_get_IsContentVisible), reinterpret_cast<setter>(CoreDragUIOverride_put_IsContentVisible), nullptr, nullptr },
        { "is_caption_visible", reinterpret_cast<getter>(CoreDragUIOverride_get_IsCaptionVisible), reinterpret_cast<setter>(CoreDragUIOverride_put_IsCaptionVisible), nullptr, nullptr },
        { "caption", reinterpret_cast<getter>(CoreDragUIOverride_get_Caption), reinterpret_cast<setter>(CoreDragUIOverride_put_Caption), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CoreDragUIOverride[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CoreDragUIOverride) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CoreDragUIOverride) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CoreDragUIOverride) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CoreDragUIOverride) },
        { }
    };

    static PyType_Spec type_spec_CoreDragUIOverride = {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.CoreDragUIOverride",
        sizeof(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CoreDragUIOverride};

    // ----- CoreDropOperationTargetRequestedEventArgs class --------------------

    static PyObject* _new_CoreDropOperationTargetRequestedEventArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_CoreDropOperationTargetRequestedEventArgs(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* CoreDropOperationTargetRequestedEventArgs_SetTarget(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDropOperationTargetRequestedEventArgs", L"SetTarget", 1))
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget>(args, 0);

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

    static PyObject* _assign_array_CoreDropOperationTargetRequestedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_CoreDropOperationTargetRequestedEventArgs(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::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CoreDropOperationTargetRequestedEventArgs[] = {
        { "set_target", reinterpret_cast<PyCFunction>(CoreDropOperationTargetRequestedEventArgs_SetTarget), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_CoreDropOperationTargetRequestedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CoreDropOperationTargetRequestedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CoreDropOperationTargetRequestedEventArgs[] = {
        { }
    };

    static PyType_Slot _type_slots_CoreDropOperationTargetRequestedEventArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CoreDropOperationTargetRequestedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CoreDropOperationTargetRequestedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CoreDropOperationTargetRequestedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CoreDropOperationTargetRequestedEventArgs) },
        { }
    };

    static PyType_Spec type_spec_CoreDropOperationTargetRequestedEventArgs = {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.CoreDropOperationTargetRequestedEventArgs",
        sizeof(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CoreDropOperationTargetRequestedEventArgs};

    // ----- ICoreDropOperationTarget interface --------------------

    static PyObject* _new_ICoreDropOperationTarget(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget>::type_name);
        return nullptr;
    }

    static void _dealloc_ICoreDropOperationTarget(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ICoreDropOperationTarget_DropAsync(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget", L"DropAsync", 1))
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>(args, 0);

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

    static PyObject* ICoreDropOperationTarget_EnterAsync(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget", L"EnterAsync", 2))
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride>(args, 1);

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

    static PyObject* ICoreDropOperationTarget_LeaveAsync(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget", L"LeaveAsync", 1))
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>(args, 0);

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

    static PyObject* ICoreDropOperationTarget_OverAsync(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            try
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget", L"OverAsync", 2))
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride>(args, 1);

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

    static PyObject* _assign_array_ICoreDropOperationTarget(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ICoreDropOperationTarget(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::DataTransfer::DragDrop::Core::ICoreDropOperationTarget>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ICoreDropOperationTarget[] = {
        { "drop_async", reinterpret_cast<PyCFunction>(ICoreDropOperationTarget_DropAsync), METH_VARARGS, nullptr },
        { "enter_async", reinterpret_cast<PyCFunction>(ICoreDropOperationTarget_EnterAsync), METH_VARARGS, nullptr },
        { "leave_async", reinterpret_cast<PyCFunction>(ICoreDropOperationTarget_LeaveAsync), METH_VARARGS, nullptr },
        { "over_async", reinterpret_cast<PyCFunction>(ICoreDropOperationTarget_OverAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ICoreDropOperationTarget, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ICoreDropOperationTarget), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ICoreDropOperationTarget[] = {
        { }
    };

    static PyType_Slot _type_slots_ICoreDropOperationTarget[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_ICoreDropOperationTarget) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ICoreDropOperationTarget) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ICoreDropOperationTarget) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ICoreDropOperationTarget) },
        { }
    };

    static PyType_Spec type_spec_ICoreDropOperationTarget = {
        "winrt._winrt_windows_applicationmodel_datatransfer_dragdrop_core.ICoreDropOperationTarget",
        sizeof(py::wrapper::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ICoreDropOperationTarget};

    // ----- Windows.ApplicationModel.DataTransfer.DragDrop.Core Initialization --------------------

    PyDoc_STRVAR(module_doc, "Windows.ApplicationModel.DataTransfer.DragDrop.Core");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_windows_applicationmodel_datatransfer_dragdrop_core",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Windows::ApplicationModel::DataTransfer::DragDrop::Core

PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_datatransfer_dragdrop_core(void) noexcept
{
    using namespace py::cpp::Windows::ApplicationModel::DataTransfer::DragDrop::Core;

    if (py::import_winrt_runtime() == -1)
    {
        return nullptr;
    }

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

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_object_type();
    if (!object_type)
    {
        return nullptr;
    }

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

    if (!object_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_CoreDragDropManager_Static{PyType_FromSpec(&type_spec_CoreDragDropManager_Static)};
    if (!type_CoreDragDropManager_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_CoreDragDropManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_CoreDragDropManager_Static.get())) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_CoreDragInfo, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_CoreDragOperation, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_CoreDragUIOverride, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_CoreDropOperationTargetRequestedEventArgs, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_ICoreDropOperationTarget, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }


    return module.detach();
}
