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

#include "pybase.h"
#include "py.Windows.Media.Import.h"


PyObject* py::converter<winrt::Windows::Media::Import::PhotoImportProgress>::convert(winrt::Windows::Media::Import::PhotoImportProgress instance) noexcept
{
    auto type = py::get_python_type<winrt::Windows::Media::Import::PhotoImportProgress>();
    if (!type)
    {
        return nullptr;
    }

    return py::wrap_struct(instance, type);
}
winrt::Windows::Media::Import::PhotoImportProgress py::converter<winrt::Windows::Media::Import::PhotoImportProgress>::convert_to(PyObject* obj)
{
    throw_if_pyobj_null(obj);

    auto type =  py::get_python_type<winrt::Windows::Media::Import::PhotoImportProgress>();

    if (!type) {
        throw python_exception();
    }

    if (Py_TYPE(obj) == type)
    {
        return reinterpret_cast<py::winrt_struct_wrapper<winrt::Windows::Media::Import::PhotoImportProgress>*>(obj)->obj;
    }

    PyErr_SetString(PyExc_TypeError, "expecting winrt::Windows::Media::Import::PhotoImportProgress");
    throw python_exception();
}

namespace py::cpp::Windows::Media::Import
{
    struct module_state
    {
        PyObject* type_PhotoImportAccessMode;
        PyObject* type_PhotoImportConnectionTransport;
        PyObject* type_PhotoImportContentType;
        PyObject* type_PhotoImportContentTypeFilter;
        PyObject* type_PhotoImportImportMode;
        PyObject* type_PhotoImportItemSelectionMode;
        PyObject* type_PhotoImportPowerSource;
        PyObject* type_PhotoImportSourceType;
        PyObject* type_PhotoImportStage;
        PyObject* type_PhotoImportStorageMediumType;
        PyObject* type_PhotoImportSubfolderCreationMode;
        PyObject* type_PhotoImportSubfolderDateFormat;
        PyTypeObject* type_PhotoImportDeleteImportedItemsFromSourceResult;
        PyTypeObject* type_PhotoImportFindItemsResult;
        PyTypeObject* type_PhotoImportImportItemsResult;
        PyTypeObject* type_PhotoImportItem;
        PyTypeObject* type_PhotoImportItemImportedEventArgs;
        PyTypeObject* type_PhotoImportManager;
        PyTypeObject* type_PhotoImportOperation;
        PyTypeObject* type_PhotoImportSelectionChangedEventArgs;
        PyTypeObject* type_PhotoImportSession;
        PyTypeObject* type_PhotoImportSidecar;
        PyTypeObject* type_PhotoImportSource;
        PyTypeObject* type_PhotoImportStorageMedium;
        PyTypeObject* type_PhotoImportVideoSegment;
        PyTypeObject* type_PhotoImportProgress;
    };

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

    // ----- PhotoImportDeleteImportedItemsFromSourceResult class --------------------
    static constexpr const char* const type_name_PhotoImportDeleteImportedItemsFromSourceResult = "PhotoImportDeleteImportedItemsFromSourceResult";

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

    static void _dealloc_PhotoImportDeleteImportedItemsFromSourceResult(py::wrapper::Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult* 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* PhotoImportDeleteImportedItemsFromSourceResult_get_DeletedItems(py::wrapper::Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportDeleteImportedItemsFromSourceResult", L"DeletedItems"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportDeleteImportedItemsFromSourceResult(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::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportDeleteImportedItemsFromSourceResult[] = {
        { "_assign_array_", _assign_array_PhotoImportDeleteImportedItemsFromSourceResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportDeleteImportedItemsFromSourceResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportDeleteImportedItemsFromSourceResult[] = {
        { "deleted_items", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_DeletedItems), nullptr, nullptr, nullptr },
        { "has_succeeded", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_HasSucceeded), nullptr, nullptr, nullptr },
        { "photos_count", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_PhotosCount), nullptr, nullptr, nullptr },
        { "photos_size_in_bytes", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_PhotosSizeInBytes), nullptr, nullptr, nullptr },
        { "session", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_Session), nullptr, nullptr, nullptr },
        { "siblings_count", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_SiblingsCount), nullptr, nullptr, nullptr },
        { "siblings_size_in_bytes", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_SiblingsSizeInBytes), nullptr, nullptr, nullptr },
        { "sidecars_count", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_SidecarsCount), nullptr, nullptr, nullptr },
        { "sidecars_size_in_bytes", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_SidecarsSizeInBytes), nullptr, nullptr, nullptr },
        { "total_count", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_TotalCount), nullptr, nullptr, nullptr },
        { "total_size_in_bytes", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_TotalSizeInBytes), nullptr, nullptr, nullptr },
        { "videos_count", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_VideosCount), nullptr, nullptr, nullptr },
        { "videos_size_in_bytes", reinterpret_cast<getter>(PhotoImportDeleteImportedItemsFromSourceResult_get_VideosSizeInBytes), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportDeleteImportedItemsFromSourceResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportDeleteImportedItemsFromSourceResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportDeleteImportedItemsFromSourceResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportDeleteImportedItemsFromSourceResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportDeleteImportedItemsFromSourceResult) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportDeleteImportedItemsFromSourceResult =
    {
        "_winsdk_Windows_Media_Import.PhotoImportDeleteImportedItemsFromSourceResult",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportDeleteImportedItemsFromSourceResult
    };

    // ----- PhotoImportFindItemsResult class --------------------
    static constexpr const char* const type_name_PhotoImportFindItemsResult = "PhotoImportFindItemsResult";

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

    static void _dealloc_PhotoImportFindItemsResult(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* 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* PhotoImportFindItemsResult_AddItemsInDateRangeToSelection(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"AddItemsInDateRangeToSelection", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::DateTime>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);

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

    static PyObject* PhotoImportFindItemsResult_ImportItemsAsync(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"ImportItemsAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PhotoImportFindItemsResult_SelectAll(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"SelectAll", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PhotoImportFindItemsResult_SelectNewAsync(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"SelectNewAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PhotoImportFindItemsResult_SelectNone(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"SelectNone", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PhotoImportFindItemsResult_SetImportMode(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"SetImportMode", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Media::Import::PhotoImportImportMode>(args, 0);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* PhotoImportFindItemsResult_add_ItemImported(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"ItemImported"))
        {
            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::Media::Import::PhotoImportFindItemsResult, winrt::Windows::Media::Import::PhotoImportItemImportedEventArgs>>(arg);

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

    static PyObject* PhotoImportFindItemsResult_remove_ItemImported(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"ItemImported"))
        {
            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.ItemImported(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* PhotoImportFindItemsResult_add_SelectionChanged(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"SelectionChanged"))
        {
            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::Media::Import::PhotoImportFindItemsResult, winrt::Windows::Media::Import::PhotoImportSelectionChangedEventArgs>>(arg);

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

    static PyObject* PhotoImportFindItemsResult_remove_SelectionChanged(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Import.PhotoImportFindItemsResult", L"SelectionChanged"))
        {
            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.SelectionChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_PhotoImportFindItemsResult(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::Media::Import::PhotoImportFindItemsResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportFindItemsResult[] = {
        { "add_items_in_date_range_to_selection", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_AddItemsInDateRangeToSelection), METH_VARARGS, nullptr },
        { "import_items_async", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_ImportItemsAsync), METH_VARARGS, nullptr },
        { "select_all", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_SelectAll), METH_VARARGS, nullptr },
        { "select_new_async", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_SelectNewAsync), METH_VARARGS, nullptr },
        { "select_none", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_SelectNone), METH_VARARGS, nullptr },
        { "set_import_mode", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_SetImportMode), METH_VARARGS, nullptr },
        { "add_item_imported", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_add_ItemImported), METH_O, nullptr },
        { "remove_item_imported", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_remove_ItemImported), METH_O, nullptr },
        { "add_selection_changed", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_add_SelectionChanged), METH_O, nullptr },
        { "remove_selection_changed", reinterpret_cast<PyCFunction>(PhotoImportFindItemsResult_remove_SelectionChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_PhotoImportFindItemsResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportFindItemsResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportFindItemsResult[] = {
        { "found_items", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_FoundItems), nullptr, nullptr, nullptr },
        { "has_succeeded", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_HasSucceeded), nullptr, nullptr, nullptr },
        { "import_mode", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_ImportMode), nullptr, nullptr, nullptr },
        { "photos_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_PhotosCount), nullptr, nullptr, nullptr },
        { "photos_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_PhotosSizeInBytes), nullptr, nullptr, nullptr },
        { "selected_photos_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedPhotosCount), nullptr, nullptr, nullptr },
        { "selected_photos_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedPhotosSizeInBytes), nullptr, nullptr, nullptr },
        { "selected_siblings_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedSiblingsCount), nullptr, nullptr, nullptr },
        { "selected_siblings_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedSiblingsSizeInBytes), nullptr, nullptr, nullptr },
        { "selected_sidecars_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedSidecarsCount), nullptr, nullptr, nullptr },
        { "selected_sidecars_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedSidecarsSizeInBytes), nullptr, nullptr, nullptr },
        { "selected_total_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedTotalCount), nullptr, nullptr, nullptr },
        { "selected_total_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedTotalSizeInBytes), nullptr, nullptr, nullptr },
        { "selected_videos_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedVideosCount), nullptr, nullptr, nullptr },
        { "selected_videos_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SelectedVideosSizeInBytes), nullptr, nullptr, nullptr },
        { "session", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_Session), nullptr, nullptr, nullptr },
        { "siblings_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SiblingsCount), nullptr, nullptr, nullptr },
        { "siblings_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SiblingsSizeInBytes), nullptr, nullptr, nullptr },
        { "sidecars_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SidecarsCount), nullptr, nullptr, nullptr },
        { "sidecars_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_SidecarsSizeInBytes), nullptr, nullptr, nullptr },
        { "total_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_TotalCount), nullptr, nullptr, nullptr },
        { "total_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_TotalSizeInBytes), nullptr, nullptr, nullptr },
        { "videos_count", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_VideosCount), nullptr, nullptr, nullptr },
        { "videos_size_in_bytes", reinterpret_cast<getter>(PhotoImportFindItemsResult_get_VideosSizeInBytes), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportFindItemsResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportFindItemsResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportFindItemsResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportFindItemsResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportFindItemsResult) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportFindItemsResult =
    {
        "_winsdk_Windows_Media_Import.PhotoImportFindItemsResult",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportFindItemsResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportFindItemsResult
    };

    // ----- PhotoImportImportItemsResult class --------------------
    static constexpr const char* const type_name_PhotoImportImportItemsResult = "PhotoImportImportItemsResult";

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

    static void _dealloc_PhotoImportImportItemsResult(py::wrapper::Windows::Media::Import::PhotoImportImportItemsResult* 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* PhotoImportImportItemsResult_DeleteImportedItemsFromSourceAsync(py::wrapper::Windows::Media::Import::PhotoImportImportItemsResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportImportItemsResult", L"DeleteImportedItemsFromSourceAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportImportItemsResult(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::Media::Import::PhotoImportImportItemsResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportImportItemsResult[] = {
        { "delete_imported_items_from_source_async", reinterpret_cast<PyCFunction>(PhotoImportImportItemsResult_DeleteImportedItemsFromSourceAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PhotoImportImportItemsResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportImportItemsResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportImportItemsResult[] = {
        { "has_succeeded", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_HasSucceeded), nullptr, nullptr, nullptr },
        { "imported_items", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_ImportedItems), nullptr, nullptr, nullptr },
        { "photos_count", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_PhotosCount), nullptr, nullptr, nullptr },
        { "photos_size_in_bytes", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_PhotosSizeInBytes), nullptr, nullptr, nullptr },
        { "session", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_Session), nullptr, nullptr, nullptr },
        { "siblings_count", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_SiblingsCount), nullptr, nullptr, nullptr },
        { "siblings_size_in_bytes", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_SiblingsSizeInBytes), nullptr, nullptr, nullptr },
        { "sidecars_count", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_SidecarsCount), nullptr, nullptr, nullptr },
        { "sidecars_size_in_bytes", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_SidecarsSizeInBytes), nullptr, nullptr, nullptr },
        { "total_count", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_TotalCount), nullptr, nullptr, nullptr },
        { "total_size_in_bytes", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_TotalSizeInBytes), nullptr, nullptr, nullptr },
        { "videos_count", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_VideosCount), nullptr, nullptr, nullptr },
        { "videos_size_in_bytes", reinterpret_cast<getter>(PhotoImportImportItemsResult_get_VideosSizeInBytes), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportImportItemsResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportImportItemsResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportImportItemsResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportImportItemsResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportImportItemsResult) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportImportItemsResult =
    {
        "_winsdk_Windows_Media_Import.PhotoImportImportItemsResult",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportImportItemsResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportImportItemsResult
    };

    // ----- PhotoImportItem class --------------------
    static constexpr const char* const type_name_PhotoImportItem = "PhotoImportItem";

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

    static void _dealloc_PhotoImportItem(py::wrapper::Windows::Media::Import::PhotoImportItem* 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* PhotoImportItem_get_IsSelected(py::wrapper::Windows::Media::Import::PhotoImportItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportItem", L"IsSelected"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportItem(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::Media::Import::PhotoImportItem>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportItem[] = {
        { "_assign_array_", _assign_array_PhotoImportItem, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportItem), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportItem[] = {
        { "is_selected", reinterpret_cast<getter>(PhotoImportItem_get_IsSelected), reinterpret_cast<setter>(PhotoImportItem_put_IsSelected), nullptr, nullptr },
        { "content_type", reinterpret_cast<getter>(PhotoImportItem_get_ContentType), nullptr, nullptr, nullptr },
        { "date", reinterpret_cast<getter>(PhotoImportItem_get_Date), nullptr, nullptr, nullptr },
        { "deleted_file_names", reinterpret_cast<getter>(PhotoImportItem_get_DeletedFileNames), nullptr, nullptr, nullptr },
        { "imported_file_names", reinterpret_cast<getter>(PhotoImportItem_get_ImportedFileNames), nullptr, nullptr, nullptr },
        { "item_key", reinterpret_cast<getter>(PhotoImportItem_get_ItemKey), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PhotoImportItem_get_Name), nullptr, nullptr, nullptr },
        { "sibling", reinterpret_cast<getter>(PhotoImportItem_get_Sibling), nullptr, nullptr, nullptr },
        { "sidecars", reinterpret_cast<getter>(PhotoImportItem_get_Sidecars), nullptr, nullptr, nullptr },
        { "size_in_bytes", reinterpret_cast<getter>(PhotoImportItem_get_SizeInBytes), nullptr, nullptr, nullptr },
        { "thumbnail", reinterpret_cast<getter>(PhotoImportItem_get_Thumbnail), nullptr, nullptr, nullptr },
        { "video_segments", reinterpret_cast<getter>(PhotoImportItem_get_VideoSegments), nullptr, nullptr, nullptr },
        { "path", reinterpret_cast<getter>(PhotoImportItem_get_Path), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportItem[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportItem) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportItem) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportItem) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportItem) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportItem =
    {
        "_winsdk_Windows_Media_Import.PhotoImportItem",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportItem),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportItem
    };

    // ----- PhotoImportItemImportedEventArgs class --------------------
    static constexpr const char* const type_name_PhotoImportItemImportedEventArgs = "PhotoImportItemImportedEventArgs";

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

    static void _dealloc_PhotoImportItemImportedEventArgs(py::wrapper::Windows::Media::Import::PhotoImportItemImportedEventArgs* 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* PhotoImportItemImportedEventArgs_get_ImportedItem(py::wrapper::Windows::Media::Import::PhotoImportItemImportedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportItemImportedEventArgs", L"ImportedItem"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_PhotoImportItemImportedEventArgs(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::Media::Import::PhotoImportItemImportedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportItemImportedEventArgs[] = {
        { "_assign_array_", _assign_array_PhotoImportItemImportedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportItemImportedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportItemImportedEventArgs[] = {
        { "imported_item", reinterpret_cast<getter>(PhotoImportItemImportedEventArgs_get_ImportedItem), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportItemImportedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportItemImportedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportItemImportedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportItemImportedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportItemImportedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportItemImportedEventArgs =
    {
        "_winsdk_Windows_Media_Import.PhotoImportItemImportedEventArgs",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportItemImportedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportItemImportedEventArgs
    };

    // ----- PhotoImportManager class --------------------
    static constexpr const char* const type_name_PhotoImportManager = "PhotoImportManager";

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

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportManager", L"FindAllSourcesAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Media::Import::PhotoImportManager::FindAllSourcesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportManager", L"GetPendingOperations", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Media::Import::PhotoImportManager::GetPendingOperations());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportManager", L"IsSupportedAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Media::Import::PhotoImportManager::IsSupportedAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportManager[] = {
        { "find_all_sources_async", reinterpret_cast<PyCFunction>(PhotoImportManager_FindAllSourcesAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "get_pending_operations", reinterpret_cast<PyCFunction>(PhotoImportManager_GetPendingOperations), METH_VARARGS | METH_STATIC, nullptr },
        { "is_supported_async", reinterpret_cast<PyCFunction>(PhotoImportManager_IsSupportedAsync), METH_VARARGS | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportManager[] = {
        { }
    };

    static PyType_Slot _type_slots_PhotoImportManager[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportManager) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportManager =
    {
        "_winsdk_Windows_Media_Import.PhotoImportManager",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportManager
    };

    // ----- PhotoImportOperation class --------------------
    static constexpr const char* const type_name_PhotoImportOperation = "PhotoImportOperation";

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

    static void _dealloc_PhotoImportOperation(py::wrapper::Windows::Media::Import::PhotoImportOperation* 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* PhotoImportOperation_get_ContinueDeletingImportedItemsFromSourceAsync(py::wrapper::Windows::Media::Import::PhotoImportOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportOperation", L"ContinueDeletingImportedItemsFromSourceAsync"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportOperation(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::Media::Import::PhotoImportOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportOperation[] = {
        { "_assign_array_", _assign_array_PhotoImportOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportOperation[] = {
        { "continue_deleting_imported_items_from_source_async", reinterpret_cast<getter>(PhotoImportOperation_get_ContinueDeletingImportedItemsFromSourceAsync), nullptr, nullptr, nullptr },
        { "continue_finding_items_async", reinterpret_cast<getter>(PhotoImportOperation_get_ContinueFindingItemsAsync), nullptr, nullptr, nullptr },
        { "continue_importing_items_async", reinterpret_cast<getter>(PhotoImportOperation_get_ContinueImportingItemsAsync), nullptr, nullptr, nullptr },
        { "session", reinterpret_cast<getter>(PhotoImportOperation_get_Session), nullptr, nullptr, nullptr },
        { "stage", reinterpret_cast<getter>(PhotoImportOperation_get_Stage), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportOperation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportOperation) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportOperation =
    {
        "_winsdk_Windows_Media_Import.PhotoImportOperation",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportOperation
    };

    // ----- PhotoImportSelectionChangedEventArgs class --------------------
    static constexpr const char* const type_name_PhotoImportSelectionChangedEventArgs = "PhotoImportSelectionChangedEventArgs";

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

    static void _dealloc_PhotoImportSelectionChangedEventArgs(py::wrapper::Windows::Media::Import::PhotoImportSelectionChangedEventArgs* 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* PhotoImportSelectionChangedEventArgs_get_IsSelectionEmpty(py::wrapper::Windows::Media::Import::PhotoImportSelectionChangedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportSelectionChangedEventArgs", L"IsSelectionEmpty"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_PhotoImportSelectionChangedEventArgs(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::Media::Import::PhotoImportSelectionChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportSelectionChangedEventArgs[] = {
        { "_assign_array_", _assign_array_PhotoImportSelectionChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportSelectionChangedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportSelectionChangedEventArgs[] = {
        { "is_selection_empty", reinterpret_cast<getter>(PhotoImportSelectionChangedEventArgs_get_IsSelectionEmpty), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportSelectionChangedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportSelectionChangedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportSelectionChangedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportSelectionChangedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportSelectionChangedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportSelectionChangedEventArgs =
    {
        "_winsdk_Windows_Media_Import.PhotoImportSelectionChangedEventArgs",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportSelectionChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportSelectionChangedEventArgs
    };

    // ----- PhotoImportSession class --------------------
    static constexpr const char* const type_name_PhotoImportSession = "PhotoImportSession";

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

    static void _dealloc_PhotoImportSession(py::wrapper::Windows::Media::Import::PhotoImportSession* 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* PhotoImportSession_Close(py::wrapper::Windows::Media::Import::PhotoImportSession* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportSession", L"Close", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PhotoImportSession_FindItemsAsync(py::wrapper::Windows::Media::Import::PhotoImportSession* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportSession", L"FindItemsAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Media::Import::PhotoImportContentTypeFilter>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Media::Import::PhotoImportItemSelectionMode>(args, 1);

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

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

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

    static int PhotoImportSession_put_SubfolderCreationMode(py::wrapper::Windows::Media::Import::PhotoImportSession* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportSession", L"SubfolderCreationMode"))
        {
            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::Media::Import::PhotoImportSubfolderCreationMode>(arg);

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

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

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

    static int PhotoImportSession_put_DestinationFolder(py::wrapper::Windows::Media::Import::PhotoImportSession* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportSession", L"DestinationFolder"))
        {
            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::Storage::IStorageFolder>(arg);

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

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

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

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

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

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

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

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

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

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

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

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

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

    static int PhotoImportSession_put_SubfolderDateFormat(py::wrapper::Windows::Media::Import::PhotoImportSession* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportSession", L"SubfolderDateFormat"))
        {
            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::Media::Import::PhotoImportSubfolderDateFormat>(arg);

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

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

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

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

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

    static PyObject* _from_PhotoImportSession(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::Media::Import::PhotoImportSession>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _enter_PhotoImportSession(py::wrapper::Windows::Media::Import::PhotoImportSession* self) noexcept
    {
        Py_INCREF(self);
        return reinterpret_cast<PyObject*>(self);
    }

    static PyObject* _exit_PhotoImportSession(py::wrapper::Windows::Media::Import::PhotoImportSession* self) noexcept
    {
        try
        {
            self->obj.Close();
            Py_RETURN_FALSE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportSession[] = {
        { "close", reinterpret_cast<PyCFunction>(PhotoImportSession_Close), METH_VARARGS, nullptr },
        { "find_items_async", reinterpret_cast<PyCFunction>(PhotoImportSession_FindItemsAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PhotoImportSession, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportSession), METH_O | METH_STATIC, nullptr },
        { "__enter__", reinterpret_cast<PyCFunction>(_enter_PhotoImportSession), METH_NOARGS, nullptr },
        { "__exit__",  reinterpret_cast<PyCFunction>(_exit_PhotoImportSession), METH_VARARGS, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportSession[] = {
        { "subfolder_creation_mode", reinterpret_cast<getter>(PhotoImportSession_get_SubfolderCreationMode), reinterpret_cast<setter>(PhotoImportSession_put_SubfolderCreationMode), nullptr, nullptr },
        { "destination_folder", reinterpret_cast<getter>(PhotoImportSession_get_DestinationFolder), reinterpret_cast<setter>(PhotoImportSession_put_DestinationFolder), nullptr, nullptr },
        { "destination_file_name_prefix", reinterpret_cast<getter>(PhotoImportSession_get_DestinationFileNamePrefix), reinterpret_cast<setter>(PhotoImportSession_put_DestinationFileNamePrefix), nullptr, nullptr },
        { "append_session_date_to_destination_folder", reinterpret_cast<getter>(PhotoImportSession_get_AppendSessionDateToDestinationFolder), reinterpret_cast<setter>(PhotoImportSession_put_AppendSessionDateToDestinationFolder), nullptr, nullptr },
        { "session_id", reinterpret_cast<getter>(PhotoImportSession_get_SessionId), nullptr, nullptr, nullptr },
        { "source", reinterpret_cast<getter>(PhotoImportSession_get_Source), nullptr, nullptr, nullptr },
        { "subfolder_date_format", reinterpret_cast<getter>(PhotoImportSession_get_SubfolderDateFormat), reinterpret_cast<setter>(PhotoImportSession_put_SubfolderDateFormat), nullptr, nullptr },
        { "remember_deselected_items", reinterpret_cast<getter>(PhotoImportSession_get_RememberDeselectedItems), reinterpret_cast<setter>(PhotoImportSession_put_RememberDeselectedItems), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportSession[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportSession) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportSession) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportSession) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportSession) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportSession =
    {
        "_winsdk_Windows_Media_Import.PhotoImportSession",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportSession),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportSession
    };

    // ----- PhotoImportSidecar class --------------------
    static constexpr const char* const type_name_PhotoImportSidecar = "PhotoImportSidecar";

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

    static void _dealloc_PhotoImportSidecar(py::wrapper::Windows::Media::Import::PhotoImportSidecar* 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* PhotoImportSidecar_get_Date(py::wrapper::Windows::Media::Import::PhotoImportSidecar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportSidecar", L"Date"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

    static PyObject* _from_PhotoImportSidecar(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::Media::Import::PhotoImportSidecar>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportSidecar[] = {
        { "_assign_array_", _assign_array_PhotoImportSidecar, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportSidecar), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportSidecar[] = {
        { "date", reinterpret_cast<getter>(PhotoImportSidecar_get_Date), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PhotoImportSidecar_get_Name), nullptr, nullptr, nullptr },
        { "size_in_bytes", reinterpret_cast<getter>(PhotoImportSidecar_get_SizeInBytes), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportSidecar[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportSidecar) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportSidecar) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportSidecar) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportSidecar) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportSidecar =
    {
        "_winsdk_Windows_Media_Import.PhotoImportSidecar",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportSidecar),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportSidecar
    };

    // ----- PhotoImportSource class --------------------
    static constexpr const char* const type_name_PhotoImportSource = "PhotoImportSource";

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

    static void _dealloc_PhotoImportSource(py::wrapper::Windows::Media::Import::PhotoImportSource* 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* PhotoImportSource_CreateImportSession(py::wrapper::Windows::Media::Import::PhotoImportSource* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportSource", L"CreateImportSession", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportSource", L"FromFolderAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Media::Import::PhotoImportSource::FromFolderAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportSource", L"FromIdAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Media::Import::PhotoImportSource::FromIdAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportSource(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::Media::Import::PhotoImportSource>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportSource[] = {
        { "create_import_session", reinterpret_cast<PyCFunction>(PhotoImportSource_CreateImportSession), METH_VARARGS, nullptr },
        { "from_folder_async", reinterpret_cast<PyCFunction>(PhotoImportSource_FromFolderAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "from_id_async", reinterpret_cast<PyCFunction>(PhotoImportSource_FromIdAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "_assign_array_", _assign_array_PhotoImportSource, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportSource), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportSource[] = {
        { "battery_level_percent", reinterpret_cast<getter>(PhotoImportSource_get_BatteryLevelPercent), nullptr, nullptr, nullptr },
        { "connection_protocol", reinterpret_cast<getter>(PhotoImportSource_get_ConnectionProtocol), nullptr, nullptr, nullptr },
        { "connection_transport", reinterpret_cast<getter>(PhotoImportSource_get_ConnectionTransport), nullptr, nullptr, nullptr },
        { "date_time", reinterpret_cast<getter>(PhotoImportSource_get_DateTime), nullptr, nullptr, nullptr },
        { "description", reinterpret_cast<getter>(PhotoImportSource_get_Description), nullptr, nullptr, nullptr },
        { "display_name", reinterpret_cast<getter>(PhotoImportSource_get_DisplayName), nullptr, nullptr, nullptr },
        { "id", reinterpret_cast<getter>(PhotoImportSource_get_Id), nullptr, nullptr, nullptr },
        { "is_locked", reinterpret_cast<getter>(PhotoImportSource_get_IsLocked), nullptr, nullptr, nullptr },
        { "is_mass_storage", reinterpret_cast<getter>(PhotoImportSource_get_IsMassStorage), nullptr, nullptr, nullptr },
        { "manufacturer", reinterpret_cast<getter>(PhotoImportSource_get_Manufacturer), nullptr, nullptr, nullptr },
        { "model", reinterpret_cast<getter>(PhotoImportSource_get_Model), nullptr, nullptr, nullptr },
        { "power_source", reinterpret_cast<getter>(PhotoImportSource_get_PowerSource), nullptr, nullptr, nullptr },
        { "serial_number", reinterpret_cast<getter>(PhotoImportSource_get_SerialNumber), nullptr, nullptr, nullptr },
        { "storage_media", reinterpret_cast<getter>(PhotoImportSource_get_StorageMedia), nullptr, nullptr, nullptr },
        { "thumbnail", reinterpret_cast<getter>(PhotoImportSource_get_Thumbnail), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(PhotoImportSource_get_Type), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportSource[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportSource) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportSource) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportSource) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportSource) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportSource =
    {
        "_winsdk_Windows_Media_Import.PhotoImportSource",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportSource),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportSource
    };

    // ----- PhotoImportStorageMedium class --------------------
    static constexpr const char* const type_name_PhotoImportStorageMedium = "PhotoImportStorageMedium";

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

    static void _dealloc_PhotoImportStorageMedium(py::wrapper::Windows::Media::Import::PhotoImportStorageMedium* 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* PhotoImportStorageMedium_Refresh(py::wrapper::Windows::Media::Import::PhotoImportStorageMedium* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Import.PhotoImportStorageMedium", L"Refresh", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportStorageMedium(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::Media::Import::PhotoImportStorageMedium>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportStorageMedium[] = {
        { "refresh", reinterpret_cast<PyCFunction>(PhotoImportStorageMedium_Refresh), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PhotoImportStorageMedium, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportStorageMedium), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportStorageMedium[] = {
        { "available_space_in_bytes", reinterpret_cast<getter>(PhotoImportStorageMedium_get_AvailableSpaceInBytes), nullptr, nullptr, nullptr },
        { "capacity_in_bytes", reinterpret_cast<getter>(PhotoImportStorageMedium_get_CapacityInBytes), nullptr, nullptr, nullptr },
        { "description", reinterpret_cast<getter>(PhotoImportStorageMedium_get_Description), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PhotoImportStorageMedium_get_Name), nullptr, nullptr, nullptr },
        { "serial_number", reinterpret_cast<getter>(PhotoImportStorageMedium_get_SerialNumber), nullptr, nullptr, nullptr },
        { "storage_medium_type", reinterpret_cast<getter>(PhotoImportStorageMedium_get_StorageMediumType), nullptr, nullptr, nullptr },
        { "supported_access_mode", reinterpret_cast<getter>(PhotoImportStorageMedium_get_SupportedAccessMode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportStorageMedium[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportStorageMedium) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportStorageMedium) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportStorageMedium) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportStorageMedium) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportStorageMedium =
    {
        "_winsdk_Windows_Media_Import.PhotoImportStorageMedium",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportStorageMedium),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportStorageMedium
    };

    // ----- PhotoImportVideoSegment class --------------------
    static constexpr const char* const type_name_PhotoImportVideoSegment = "PhotoImportVideoSegment";

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

    static void _dealloc_PhotoImportVideoSegment(py::wrapper::Windows::Media::Import::PhotoImportVideoSegment* 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* PhotoImportVideoSegment_get_Date(py::wrapper::Windows::Media::Import::PhotoImportVideoSegment* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Import.PhotoImportVideoSegment", L"Date"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_PhotoImportVideoSegment(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::Media::Import::PhotoImportVideoSegment>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PhotoImportVideoSegment[] = {
        { "_assign_array_", _assign_array_PhotoImportVideoSegment, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PhotoImportVideoSegment), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PhotoImportVideoSegment[] = {
        { "date", reinterpret_cast<getter>(PhotoImportVideoSegment_get_Date), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PhotoImportVideoSegment_get_Name), nullptr, nullptr, nullptr },
        { "sibling", reinterpret_cast<getter>(PhotoImportVideoSegment_get_Sibling), nullptr, nullptr, nullptr },
        { "sidecars", reinterpret_cast<getter>(PhotoImportVideoSegment_get_Sidecars), nullptr, nullptr, nullptr },
        { "size_in_bytes", reinterpret_cast<getter>(PhotoImportVideoSegment_get_SizeInBytes), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportVideoSegment[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportVideoSegment) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportVideoSegment) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PhotoImportVideoSegment) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportVideoSegment) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportVideoSegment =
    {
        "_winsdk_Windows_Media_Import.PhotoImportVideoSegment",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportVideoSegment),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportVideoSegment
    };

    // ----- PhotoImportProgress struct --------------------
    static constexpr const char* const type_name_PhotoImportProgress = "PhotoImportProgress";

    PyObject* _new_PhotoImportProgress(PyTypeObject* type, PyObject* args, PyObject* kwds)
    {
        auto tuple_size = PyTuple_Size(args);

        if ((tuple_size == 0) && (kwds == nullptr))
        {
            try
            {
                winrt::Windows::Media::Import::PhotoImportProgress return_value{};
                return py::convert(return_value);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }

        uint32_t _ItemsImported{};
        uint32_t _TotalItemsToImport{};
        uint64_t _BytesImported{};
        uint64_t _TotalBytesToImport{};
        double _ImportProgress{};

        static const char* kwlist[] = {"items_imported", "total_items_to_import", "bytes_imported", "total_bytes_to_import", "import_progress", nullptr};
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "IIKKd", const_cast<char**>(kwlist), &_ItemsImported, &_TotalItemsToImport, &_BytesImported, &_TotalBytesToImport, &_ImportProgress))
        {
            return nullptr;
        }

        try
        {
            winrt::Windows::Media::Import::PhotoImportProgress return_value{ _ItemsImported, _TotalItemsToImport, _BytesImported, _TotalBytesToImport, _ImportProgress };
            return py::convert(return_value);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static void _dealloc_PhotoImportProgress(py::wrapper::Windows::Media::Import::PhotoImportProgress* self) noexcept
    {
    }

    static PyObject* PhotoImportProgress_get_ItemsImported(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.ItemsImported);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PhotoImportProgress_set_ItemsImported(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.ItemsImported = py::converter<uint32_t>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* PhotoImportProgress_get_TotalItemsToImport(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.TotalItemsToImport);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PhotoImportProgress_set_TotalItemsToImport(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.TotalItemsToImport = py::converter<uint32_t>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* PhotoImportProgress_get_BytesImported(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.BytesImported);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PhotoImportProgress_set_BytesImported(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.BytesImported = py::converter<uint64_t>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* PhotoImportProgress_get_TotalBytesToImport(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.TotalBytesToImport);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PhotoImportProgress_set_TotalBytesToImport(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.TotalBytesToImport = py::converter<uint64_t>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* PhotoImportProgress_get_ImportProgress(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.ImportProgress);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PhotoImportProgress_set_ImportProgress(py::wrapper::Windows::Media::Import::PhotoImportProgress* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.ImportProgress = py::converter<double>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyGetSetDef _getset_PhotoImportProgress[] = {
        { "items_imported", reinterpret_cast<getter>(PhotoImportProgress_get_ItemsImported), reinterpret_cast<setter>(PhotoImportProgress_set_ItemsImported), nullptr, nullptr },
        { "total_items_to_import", reinterpret_cast<getter>(PhotoImportProgress_get_TotalItemsToImport), reinterpret_cast<setter>(PhotoImportProgress_set_TotalItemsToImport), nullptr, nullptr },
        { "bytes_imported", reinterpret_cast<getter>(PhotoImportProgress_get_BytesImported), reinterpret_cast<setter>(PhotoImportProgress_set_BytesImported), nullptr, nullptr },
        { "total_bytes_to_import", reinterpret_cast<getter>(PhotoImportProgress_get_TotalBytesToImport), reinterpret_cast<setter>(PhotoImportProgress_set_TotalBytesToImport), nullptr, nullptr },
        { "import_progress", reinterpret_cast<getter>(PhotoImportProgress_get_ImportProgress), reinterpret_cast<setter>(PhotoImportProgress_set_ImportProgress), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PhotoImportProgress[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PhotoImportProgress) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PhotoImportProgress) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PhotoImportProgress) },
        { },
    };

    static PyType_Spec type_spec_PhotoImportProgress =
    {
        "_winsdk_Windows_Media_Import.PhotoImportProgress",
        sizeof(py::wrapper::Windows::Media::Import::PhotoImportProgress),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PhotoImportProgress
    };

    // ----- Windows.Media.Import Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Media::Import");

    static PyMethodDef module_methods[] = {
        {"_register_PhotoImportAccessMode", register_PhotoImportAccessMode, METH_O, "registers type"},
        {"_register_PhotoImportConnectionTransport", register_PhotoImportConnectionTransport, METH_O, "registers type"},
        {"_register_PhotoImportContentType", register_PhotoImportContentType, METH_O, "registers type"},
        {"_register_PhotoImportContentTypeFilter", register_PhotoImportContentTypeFilter, METH_O, "registers type"},
        {"_register_PhotoImportImportMode", register_PhotoImportImportMode, METH_O, "registers type"},
        {"_register_PhotoImportItemSelectionMode", register_PhotoImportItemSelectionMode, METH_O, "registers type"},
        {"_register_PhotoImportPowerSource", register_PhotoImportPowerSource, METH_O, "registers type"},
        {"_register_PhotoImportSourceType", register_PhotoImportSourceType, METH_O, "registers type"},
        {"_register_PhotoImportStage", register_PhotoImportStage, METH_O, "registers type"},
        {"_register_PhotoImportStorageMediumType", register_PhotoImportStorageMediumType, METH_O, "registers type"},
        {"_register_PhotoImportSubfolderCreationMode", register_PhotoImportSubfolderCreationMode, METH_O, "registers type"},
        {"_register_PhotoImportSubfolderDateFormat", register_PhotoImportSubfolderDateFormat, 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_PhotoImportAccessMode);
        Py_VISIT(state->type_PhotoImportConnectionTransport);
        Py_VISIT(state->type_PhotoImportContentType);
        Py_VISIT(state->type_PhotoImportContentTypeFilter);
        Py_VISIT(state->type_PhotoImportImportMode);
        Py_VISIT(state->type_PhotoImportItemSelectionMode);
        Py_VISIT(state->type_PhotoImportPowerSource);
        Py_VISIT(state->type_PhotoImportSourceType);
        Py_VISIT(state->type_PhotoImportStage);
        Py_VISIT(state->type_PhotoImportStorageMediumType);
        Py_VISIT(state->type_PhotoImportSubfolderCreationMode);
        Py_VISIT(state->type_PhotoImportSubfolderDateFormat);
        Py_VISIT(state->type_PhotoImportDeleteImportedItemsFromSourceResult);
        Py_VISIT(state->type_PhotoImportFindItemsResult);
        Py_VISIT(state->type_PhotoImportImportItemsResult);
        Py_VISIT(state->type_PhotoImportItem);
        Py_VISIT(state->type_PhotoImportItemImportedEventArgs);
        Py_VISIT(state->type_PhotoImportManager);
        Py_VISIT(state->type_PhotoImportOperation);
        Py_VISIT(state->type_PhotoImportSelectionChangedEventArgs);
        Py_VISIT(state->type_PhotoImportSession);
        Py_VISIT(state->type_PhotoImportSidecar);
        Py_VISIT(state->type_PhotoImportSource);
        Py_VISIT(state->type_PhotoImportStorageMedium);
        Py_VISIT(state->type_PhotoImportVideoSegment);
        Py_VISIT(state->type_PhotoImportProgress);

        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_PhotoImportAccessMode);
        Py_CLEAR(state->type_PhotoImportConnectionTransport);
        Py_CLEAR(state->type_PhotoImportContentType);
        Py_CLEAR(state->type_PhotoImportContentTypeFilter);
        Py_CLEAR(state->type_PhotoImportImportMode);
        Py_CLEAR(state->type_PhotoImportItemSelectionMode);
        Py_CLEAR(state->type_PhotoImportPowerSource);
        Py_CLEAR(state->type_PhotoImportSourceType);
        Py_CLEAR(state->type_PhotoImportStage);
        Py_CLEAR(state->type_PhotoImportStorageMediumType);
        Py_CLEAR(state->type_PhotoImportSubfolderCreationMode);
        Py_CLEAR(state->type_PhotoImportSubfolderDateFormat);
        Py_CLEAR(state->type_PhotoImportDeleteImportedItemsFromSourceResult);
        Py_CLEAR(state->type_PhotoImportFindItemsResult);
        Py_CLEAR(state->type_PhotoImportImportItemsResult);
        Py_CLEAR(state->type_PhotoImportItem);
        Py_CLEAR(state->type_PhotoImportItemImportedEventArgs);
        Py_CLEAR(state->type_PhotoImportManager);
        Py_CLEAR(state->type_PhotoImportOperation);
        Py_CLEAR(state->type_PhotoImportSelectionChangedEventArgs);
        Py_CLEAR(state->type_PhotoImportSession);
        Py_CLEAR(state->type_PhotoImportSidecar);
        Py_CLEAR(state->type_PhotoImportSource);
        Py_CLEAR(state->type_PhotoImportStorageMedium);
        Py_CLEAR(state->type_PhotoImportVideoSegment);
        Py_CLEAR(state->type_PhotoImportProgress);

        return 0;
    }


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

} // py::cpp::Windows::Media::Import

PyMODINIT_FUNC PyInit__winsdk_Windows_Media_Import(void) noexcept
{
    using namespace py::cpp::Windows::Media::Import;

    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_PhotoImportDeleteImportedItemsFromSourceResult = py::register_python_type(module.get(), type_name_PhotoImportDeleteImportedItemsFromSourceResult, &type_spec_PhotoImportDeleteImportedItemsFromSourceResult, bases.get(), nullptr);
    if (!state->type_PhotoImportDeleteImportedItemsFromSourceResult)
    {
        return nullptr;
    }

    state->type_PhotoImportFindItemsResult = py::register_python_type(module.get(), type_name_PhotoImportFindItemsResult, &type_spec_PhotoImportFindItemsResult, bases.get(), nullptr);
    if (!state->type_PhotoImportFindItemsResult)
    {
        return nullptr;
    }

    state->type_PhotoImportImportItemsResult = py::register_python_type(module.get(), type_name_PhotoImportImportItemsResult, &type_spec_PhotoImportImportItemsResult, bases.get(), nullptr);
    if (!state->type_PhotoImportImportItemsResult)
    {
        return nullptr;
    }

    state->type_PhotoImportItem = py::register_python_type(module.get(), type_name_PhotoImportItem, &type_spec_PhotoImportItem, bases.get(), nullptr);
    if (!state->type_PhotoImportItem)
    {
        return nullptr;
    }

    state->type_PhotoImportItemImportedEventArgs = py::register_python_type(module.get(), type_name_PhotoImportItemImportedEventArgs, &type_spec_PhotoImportItemImportedEventArgs, bases.get(), nullptr);
    if (!state->type_PhotoImportItemImportedEventArgs)
    {
        return nullptr;
    }

    state->type_PhotoImportManager = py::register_python_type(module.get(), type_name_PhotoImportManager, &type_spec_PhotoImportManager, nullptr, nullptr);
    if (!state->type_PhotoImportManager)
    {
        return nullptr;
    }

    state->type_PhotoImportOperation = py::register_python_type(module.get(), type_name_PhotoImportOperation, &type_spec_PhotoImportOperation, bases.get(), nullptr);
    if (!state->type_PhotoImportOperation)
    {
        return nullptr;
    }

    state->type_PhotoImportSelectionChangedEventArgs = py::register_python_type(module.get(), type_name_PhotoImportSelectionChangedEventArgs, &type_spec_PhotoImportSelectionChangedEventArgs, bases.get(), nullptr);
    if (!state->type_PhotoImportSelectionChangedEventArgs)
    {
        return nullptr;
    }

    state->type_PhotoImportSession = py::register_python_type(module.get(), type_name_PhotoImportSession, &type_spec_PhotoImportSession, bases.get(), nullptr);
    if (!state->type_PhotoImportSession)
    {
        return nullptr;
    }

    state->type_PhotoImportSidecar = py::register_python_type(module.get(), type_name_PhotoImportSidecar, &type_spec_PhotoImportSidecar, bases.get(), nullptr);
    if (!state->type_PhotoImportSidecar)
    {
        return nullptr;
    }

    state->type_PhotoImportSource = py::register_python_type(module.get(), type_name_PhotoImportSource, &type_spec_PhotoImportSource, bases.get(), nullptr);
    if (!state->type_PhotoImportSource)
    {
        return nullptr;
    }

    state->type_PhotoImportStorageMedium = py::register_python_type(module.get(), type_name_PhotoImportStorageMedium, &type_spec_PhotoImportStorageMedium, bases.get(), nullptr);
    if (!state->type_PhotoImportStorageMedium)
    {
        return nullptr;
    }

    state->type_PhotoImportVideoSegment = py::register_python_type(module.get(), type_name_PhotoImportVideoSegment, &type_spec_PhotoImportVideoSegment, bases.get(), nullptr);
    if (!state->type_PhotoImportVideoSegment)
    {
        return nullptr;
    }

    state->type_PhotoImportProgress = py::register_python_type(module.get(), type_name_PhotoImportProgress, &type_spec_PhotoImportProgress, bases.get(), nullptr);
    if (!state->type_PhotoImportProgress)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportAccessMode>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportAccessMode;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportAccessMode is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportConnectionTransport>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportConnectionTransport;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportConnectionTransport is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportContentType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportContentType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportContentType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportContentTypeFilter>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportContentTypeFilter;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportContentTypeFilter is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportImportMode>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportImportMode;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportImportMode is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportItemSelectionMode>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportItemSelectionMode;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportItemSelectionMode is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportPowerSource>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportPowerSource;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportPowerSource is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportSourceType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSourceType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSourceType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportStage>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportStage;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportStage is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportStorageMediumType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportStorageMediumType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportStorageMediumType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportSubfolderCreationMode>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSubfolderCreationMode;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSubfolderCreationMode is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Media::Import::PhotoImportSubfolderDateFormat>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSubfolderDateFormat;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSubfolderDateFormat is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportDeleteImportedItemsFromSourceResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportFindItemsResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportFindItemsResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportFindItemsResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportImportItemsResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportImportItemsResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportImportItemsResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportItem>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportItem;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportItem is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportItemImportedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportItemImportedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportItemImportedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportManager>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportManager;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportManager is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportOperation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportOperation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportOperation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportSelectionChangedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSelectionChangedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSelectionChangedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportSession>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSession;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSession is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportSidecar>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSidecar;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSidecar is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportSource>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportSource;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportSource is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportStorageMedium>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportStorageMedium;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportStorageMedium is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportVideoSegment>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportVideoSegment;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportVideoSegment is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Media::Import::PhotoImportProgress>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Media::Import;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PhotoImportProgress;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Media::Import::PhotoImportProgress is not registered");
        return nullptr;
    }

    return python_type;
}
