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

#include "py.Windows.Storage.FileProperties.h"

namespace py::cpp::Windows::Storage::FileProperties
{
    // ----- BasicProperties class --------------------

    static PyObject* _new_BasicProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::BasicProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::BasicProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_BasicProperties(py::wrapper::Windows::Storage::FileProperties::BasicProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* BasicProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::BasicProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.BasicProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* BasicProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::BasicProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.BasicProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.BasicProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

    static PyObject* BasicProperties_get_DateModified(py::wrapper::Windows::Storage::FileProperties::BasicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.BasicProperties", L"DateModified");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* BasicProperties_get_ItemDate(py::wrapper::Windows::Storage::FileProperties::BasicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.BasicProperties", L"ItemDate");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* BasicProperties_get_Size(py::wrapper::Windows::Storage::FileProperties::BasicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.BasicProperties", L"Size");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _from_BasicProperties(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::Storage::FileProperties::BasicProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_BasicProperties[] = {
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(BasicProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(BasicProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_BasicProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_BasicProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_BasicProperties[] = {
        { "date_modified", reinterpret_cast<getter>(BasicProperties_get_DateModified), nullptr, nullptr, nullptr },
        { "item_date", reinterpret_cast<getter>(BasicProperties_get_ItemDate), nullptr, nullptr, nullptr },
        { "size", reinterpret_cast<getter>(BasicProperties_get_Size), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_BasicProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_BasicProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_BasicProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_BasicProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_BasicProperties) },
        { }
    };

    static PyType_Spec type_spec_BasicProperties = {
        "winrt._winrt_windows_storage_fileproperties.BasicProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::BasicProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_BasicProperties};

    // ----- DocumentProperties class --------------------

    static PyObject* _new_DocumentProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::DocumentProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::DocumentProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_DocumentProperties(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* DocumentProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* DocumentProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

    static PyObject* DocumentProperties_get_Title(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* DocumentProperties_get_Comment(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"Comment");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"Comment");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* DocumentProperties_get_Author(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"Author");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* DocumentProperties_get_Keywords(py::wrapper::Windows::Storage::FileProperties::DocumentProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.DocumentProperties", L"Keywords");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _from_DocumentProperties(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::Storage::FileProperties::DocumentProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_DocumentProperties[] = {
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(DocumentProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(DocumentProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_DocumentProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_DocumentProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_DocumentProperties[] = {
        { "title", reinterpret_cast<getter>(DocumentProperties_get_Title), reinterpret_cast<setter>(DocumentProperties_put_Title), nullptr, nullptr },
        { "comment", reinterpret_cast<getter>(DocumentProperties_get_Comment), reinterpret_cast<setter>(DocumentProperties_put_Comment), nullptr, nullptr },
        { "author", reinterpret_cast<getter>(DocumentProperties_get_Author), nullptr, nullptr, nullptr },
        { "keywords", reinterpret_cast<getter>(DocumentProperties_get_Keywords), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_DocumentProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_DocumentProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DocumentProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_DocumentProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_DocumentProperties) },
        { }
    };

    static PyType_Spec type_spec_DocumentProperties = {
        "winrt._winrt_windows_storage_fileproperties.DocumentProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::DocumentProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_DocumentProperties};

    // ----- GeotagHelper class --------------------

    static PyObject* _new_GeotagHelper(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::GeotagHelper>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::GeotagHelper>::type_name);
        return nullptr;
    }

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

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.GeotagHelper", L"GetGeotagAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert(winrt::Windows::Storage::FileProperties::GeotagHelper::GetGeotagAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 2)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.GeotagHelper", L"SetGeotagAsync", 2);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Storage::IStorageFile>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Devices::Geolocation::Geopoint>(args, 1);

                return py::convert(winrt::Windows::Storage::FileProperties::GeotagHelper::SetGeotagAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 2)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.GeotagHelper", L"SetGeotagFromGeolocatorAsync", 2);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Storage::IStorageFile>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Devices::Geolocation::Geolocator>(args, 1);

                return py::convert(winrt::Windows::Storage::FileProperties::GeotagHelper::SetGeotagFromGeolocatorAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_GeotagHelper[] = {
        { }
    };

    static PyGetSetDef _getset_GeotagHelper[] = {
        { }
    };

    static PyType_Slot _type_slots_GeotagHelper[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_GeotagHelper) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_GeotagHelper) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_GeotagHelper) },
        { }
    };

    static PyType_Spec type_spec_GeotagHelper = {
        "winrt._winrt_windows_storage_fileproperties.GeotagHelper",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_GeotagHelper};

    static PyGetSetDef getset_GeotagHelper_Static[] = {
        { }
    };

    static PyMethodDef methods_GeotagHelper_Static[] = {
        { "get_geotag_async", reinterpret_cast<PyCFunction>(GeotagHelper_GetGeotagAsync), METH_VARARGS, nullptr },
        { "set_geotag_async", reinterpret_cast<PyCFunction>(GeotagHelper_SetGeotagAsync), METH_VARARGS, nullptr },
        { "set_geotag_from_geolocator_async", reinterpret_cast<PyCFunction>(GeotagHelper_SetGeotagFromGeolocatorAsync), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_GeotagHelper_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_GeotagHelper_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_GeotagHelper_Static) },
        { }
    };

    static PyType_Spec type_spec_GeotagHelper_Static =
    {
        "winrt._winrt_windows_storage_fileproperties.GeotagHelper_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_GeotagHelper_Static
    };

    // ----- ImageProperties class --------------------

    static PyObject* _new_ImageProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::ImageProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::ImageProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_ImageProperties(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ImageProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.ImageProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* ImageProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.ImageProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.ImageProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

    static PyObject* ImageProperties_get_Title(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* ImageProperties_get_Rating(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Rating");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Rating");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* ImageProperties_get_DateTaken(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"DateTaken");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"DateTaken");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::Foundation::DateTime>(arg);

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

    static PyObject* ImageProperties_get_CameraModel(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"CameraModel");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"CameraModel");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* ImageProperties_get_CameraManufacturer(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"CameraManufacturer");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"CameraManufacturer");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* ImageProperties_get_Height(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Height");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* ImageProperties_get_Keywords(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Keywords");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* ImageProperties_get_Latitude(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Latitude");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* ImageProperties_get_Longitude(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Longitude");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* ImageProperties_get_Orientation(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Orientation");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* ImageProperties_get_PeopleNames(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"PeopleNames");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* ImageProperties_get_Width(py::wrapper::Windows::Storage::FileProperties::ImageProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.ImageProperties", L"Width");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _from_ImageProperties(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::Storage::FileProperties::ImageProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ImageProperties[] = {
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(ImageProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(ImageProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ImageProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ImageProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ImageProperties[] = {
        { "title", reinterpret_cast<getter>(ImageProperties_get_Title), reinterpret_cast<setter>(ImageProperties_put_Title), nullptr, nullptr },
        { "rating", reinterpret_cast<getter>(ImageProperties_get_Rating), reinterpret_cast<setter>(ImageProperties_put_Rating), nullptr, nullptr },
        { "date_taken", reinterpret_cast<getter>(ImageProperties_get_DateTaken), reinterpret_cast<setter>(ImageProperties_put_DateTaken), nullptr, nullptr },
        { "camera_model", reinterpret_cast<getter>(ImageProperties_get_CameraModel), reinterpret_cast<setter>(ImageProperties_put_CameraModel), nullptr, nullptr },
        { "camera_manufacturer", reinterpret_cast<getter>(ImageProperties_get_CameraManufacturer), reinterpret_cast<setter>(ImageProperties_put_CameraManufacturer), nullptr, nullptr },
        { "height", reinterpret_cast<getter>(ImageProperties_get_Height), nullptr, nullptr, nullptr },
        { "keywords", reinterpret_cast<getter>(ImageProperties_get_Keywords), nullptr, nullptr, nullptr },
        { "latitude", reinterpret_cast<getter>(ImageProperties_get_Latitude), nullptr, nullptr, nullptr },
        { "longitude", reinterpret_cast<getter>(ImageProperties_get_Longitude), nullptr, nullptr, nullptr },
        { "orientation", reinterpret_cast<getter>(ImageProperties_get_Orientation), nullptr, nullptr, nullptr },
        { "people_names", reinterpret_cast<getter>(ImageProperties_get_PeopleNames), nullptr, nullptr, nullptr },
        { "width", reinterpret_cast<getter>(ImageProperties_get_Width), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ImageProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_ImageProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ImageProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ImageProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ImageProperties) },
        { }
    };

    static PyType_Spec type_spec_ImageProperties = {
        "winrt._winrt_windows_storage_fileproperties.ImageProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::ImageProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ImageProperties};

    // ----- MusicProperties class --------------------

    static PyObject* _new_MusicProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::MusicProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::MusicProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_MusicProperties(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* MusicProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.MusicProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* MusicProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.MusicProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.MusicProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

    static PyObject* MusicProperties_get_Year(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Year");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Year");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_TrackNumber(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"TrackNumber");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"TrackNumber");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Title(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Subtitle(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Subtitle");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Subtitle");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Rating(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Rating");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Rating");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Publisher(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Publisher");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Publisher");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Artist(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Artist");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Artist");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_AlbumArtist(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"AlbumArtist");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"AlbumArtist");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Album(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Album");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Album");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* MusicProperties_get_Bitrate(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Bitrate");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* MusicProperties_get_Composers(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Composers");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* MusicProperties_get_Conductors(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Conductors");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* MusicProperties_get_Duration(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Duration");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* MusicProperties_get_Genre(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Genre");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* MusicProperties_get_Producers(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Producers");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* MusicProperties_get_Writers(py::wrapper::Windows::Storage::FileProperties::MusicProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.MusicProperties", L"Writers");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _from_MusicProperties(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::Storage::FileProperties::MusicProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_MusicProperties[] = {
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(MusicProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(MusicProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_MusicProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MusicProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MusicProperties[] = {
        { "year", reinterpret_cast<getter>(MusicProperties_get_Year), reinterpret_cast<setter>(MusicProperties_put_Year), nullptr, nullptr },
        { "track_number", reinterpret_cast<getter>(MusicProperties_get_TrackNumber), reinterpret_cast<setter>(MusicProperties_put_TrackNumber), nullptr, nullptr },
        { "title", reinterpret_cast<getter>(MusicProperties_get_Title), reinterpret_cast<setter>(MusicProperties_put_Title), nullptr, nullptr },
        { "subtitle", reinterpret_cast<getter>(MusicProperties_get_Subtitle), reinterpret_cast<setter>(MusicProperties_put_Subtitle), nullptr, nullptr },
        { "rating", reinterpret_cast<getter>(MusicProperties_get_Rating), reinterpret_cast<setter>(MusicProperties_put_Rating), nullptr, nullptr },
        { "publisher", reinterpret_cast<getter>(MusicProperties_get_Publisher), reinterpret_cast<setter>(MusicProperties_put_Publisher), nullptr, nullptr },
        { "artist", reinterpret_cast<getter>(MusicProperties_get_Artist), reinterpret_cast<setter>(MusicProperties_put_Artist), nullptr, nullptr },
        { "album_artist", reinterpret_cast<getter>(MusicProperties_get_AlbumArtist), reinterpret_cast<setter>(MusicProperties_put_AlbumArtist), nullptr, nullptr },
        { "album", reinterpret_cast<getter>(MusicProperties_get_Album), reinterpret_cast<setter>(MusicProperties_put_Album), nullptr, nullptr },
        { "bitrate", reinterpret_cast<getter>(MusicProperties_get_Bitrate), nullptr, nullptr, nullptr },
        { "composers", reinterpret_cast<getter>(MusicProperties_get_Composers), nullptr, nullptr, nullptr },
        { "conductors", reinterpret_cast<getter>(MusicProperties_get_Conductors), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(MusicProperties_get_Duration), nullptr, nullptr, nullptr },
        { "genre", reinterpret_cast<getter>(MusicProperties_get_Genre), nullptr, nullptr, nullptr },
        { "producers", reinterpret_cast<getter>(MusicProperties_get_Producers), nullptr, nullptr, nullptr },
        { "writers", reinterpret_cast<getter>(MusicProperties_get_Writers), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_MusicProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_MusicProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MusicProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MusicProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MusicProperties) },
        { }
    };

    static PyType_Spec type_spec_MusicProperties = {
        "winrt._winrt_windows_storage_fileproperties.MusicProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::MusicProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MusicProperties};

    // ----- StorageItemContentProperties class --------------------

    static PyObject* _new_StorageItemContentProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::StorageItemContentProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::StorageItemContentProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_StorageItemContentProperties(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageItemContentProperties_GetDocumentPropertiesAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"GetDocumentPropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* StorageItemContentProperties_GetImagePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"GetImagePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* StorageItemContentProperties_GetMusicPropertiesAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"GetMusicPropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* StorageItemContentProperties_GetVideoPropertiesAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"GetVideoPropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* StorageItemContentProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* StorageItemContentProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemContentProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

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

    static PyObject* _from_StorageItemContentProperties(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::Storage::FileProperties::StorageItemContentProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageItemContentProperties[] = {
        { "get_document_properties_async", reinterpret_cast<PyCFunction>(StorageItemContentProperties_GetDocumentPropertiesAsync), METH_VARARGS, nullptr },
        { "get_image_properties_async", reinterpret_cast<PyCFunction>(StorageItemContentProperties_GetImagePropertiesAsync), METH_VARARGS, nullptr },
        { "get_music_properties_async", reinterpret_cast<PyCFunction>(StorageItemContentProperties_GetMusicPropertiesAsync), METH_VARARGS, nullptr },
        { "get_video_properties_async", reinterpret_cast<PyCFunction>(StorageItemContentProperties_GetVideoPropertiesAsync), METH_VARARGS, nullptr },
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(StorageItemContentProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(StorageItemContentProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_StorageItemContentProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageItemContentProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageItemContentProperties[] = {
        { }
    };

    static PyType_Slot _type_slots_StorageItemContentProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageItemContentProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageItemContentProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageItemContentProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageItemContentProperties) },
        { }
    };

    static PyType_Spec type_spec_StorageItemContentProperties = {
        "winrt._winrt_windows_storage_fileproperties.StorageItemContentProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::StorageItemContentProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageItemContentProperties};

    // ----- StorageItemThumbnail class --------------------

    static PyObject* _new_StorageItemThumbnail(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::StorageItemThumbnail>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::StorageItemThumbnail>::type_name);
        return nullptr;
    }

    static void _dealloc_StorageItemThumbnail(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageItemThumbnail_CloneStream(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"CloneStream", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* StorageItemThumbnail_Close(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"Close", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                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* StorageItemThumbnail_FlushAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"FlushAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

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

    static PyObject* StorageItemThumbnail_GetInputStreamAt(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"GetInputStreamAt", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

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

    static PyObject* StorageItemThumbnail_GetOutputStreamAt(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"GetOutputStreamAt", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

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

    static PyObject* StorageItemThumbnail_ReadAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"ReadAsync", 3);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(3);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Storage::Streams::InputStreamOptions>(args, 2);

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

    static PyObject* StorageItemThumbnail_Seek(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"Seek", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

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

    static PyObject* StorageItemThumbnail_WriteAsync(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"WriteAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);

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

    static PyObject* StorageItemThumbnail_get_OriginalHeight(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"OriginalHeight");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_OriginalWidth(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"OriginalWidth");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_ReturnedSmallerCachedSize(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"ReturnedSmallerCachedSize");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_Type(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"Type");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_ContentType(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"ContentType");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_Size(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"Size");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"Size");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* StorageItemThumbnail_get_CanRead(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"CanRead");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_CanWrite(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"CanWrite");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* StorageItemThumbnail_get_Position(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.StorageItemThumbnail", L"Position");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _from_StorageItemThumbnail(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::Storage::FileProperties::StorageItemThumbnail>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _enter_StorageItemThumbnail(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* /*unused*/) noexcept
    {
        return Py_NewRef(self);
    }

    static PyObject* _exit_StorageItemThumbnail(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail* self, PyObject* /*unused*/) noexcept
    {
        try
        {
            self->obj.Close();
            Py_RETURN_FALSE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageItemThumbnail[] = {
        { "clone_stream", reinterpret_cast<PyCFunction>(StorageItemThumbnail_CloneStream), METH_VARARGS, nullptr },
        { "close", reinterpret_cast<PyCFunction>(StorageItemThumbnail_Close), METH_VARARGS, nullptr },
        { "flush_async", reinterpret_cast<PyCFunction>(StorageItemThumbnail_FlushAsync), METH_VARARGS, nullptr },
        { "get_input_stream_at", reinterpret_cast<PyCFunction>(StorageItemThumbnail_GetInputStreamAt), METH_VARARGS, nullptr },
        { "get_output_stream_at", reinterpret_cast<PyCFunction>(StorageItemThumbnail_GetOutputStreamAt), METH_VARARGS, nullptr },
        { "read_async", reinterpret_cast<PyCFunction>(StorageItemThumbnail_ReadAsync), METH_VARARGS, nullptr },
        { "seek", reinterpret_cast<PyCFunction>(StorageItemThumbnail_Seek), METH_VARARGS, nullptr },
        { "write_async", reinterpret_cast<PyCFunction>(StorageItemThumbnail_WriteAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_StorageItemThumbnail, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageItemThumbnail), METH_O | METH_STATIC, nullptr },
        { "__enter__", reinterpret_cast<PyCFunction>(_enter_StorageItemThumbnail), METH_NOARGS, nullptr },
        { "__exit__", reinterpret_cast<PyCFunction>(_exit_StorageItemThumbnail), METH_VARARGS, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageItemThumbnail[] = {
        { "original_height", reinterpret_cast<getter>(StorageItemThumbnail_get_OriginalHeight), nullptr, nullptr, nullptr },
        { "original_width", reinterpret_cast<getter>(StorageItemThumbnail_get_OriginalWidth), nullptr, nullptr, nullptr },
        { "returned_smaller_cached_size", reinterpret_cast<getter>(StorageItemThumbnail_get_ReturnedSmallerCachedSize), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(StorageItemThumbnail_get_Type), nullptr, nullptr, nullptr },
        { "content_type", reinterpret_cast<getter>(StorageItemThumbnail_get_ContentType), nullptr, nullptr, nullptr },
        { "size", reinterpret_cast<getter>(StorageItemThumbnail_get_Size), reinterpret_cast<setter>(StorageItemThumbnail_put_Size), nullptr, nullptr },
        { "can_read", reinterpret_cast<getter>(StorageItemThumbnail_get_CanRead), nullptr, nullptr, nullptr },
        { "can_write", reinterpret_cast<getter>(StorageItemThumbnail_get_CanWrite), nullptr, nullptr, nullptr },
        { "position", reinterpret_cast<getter>(StorageItemThumbnail_get_Position), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_StorageItemThumbnail[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageItemThumbnail) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageItemThumbnail) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageItemThumbnail) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageItemThumbnail) },
        { }
    };

    static PyType_Spec type_spec_StorageItemThumbnail = {
        "winrt._winrt_windows_storage_fileproperties.StorageItemThumbnail",
        sizeof(py::wrapper::Windows::Storage::FileProperties::StorageItemThumbnail),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageItemThumbnail};

    // ----- VideoProperties class --------------------

    static PyObject* _new_VideoProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::VideoProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::VideoProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_VideoProperties(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* VideoProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.VideoProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* VideoProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.VideoProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.VideoProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

    static PyObject* VideoProperties_get_Year(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Year");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Year");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* VideoProperties_get_Title(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Title");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* VideoProperties_get_Subtitle(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Subtitle");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Subtitle");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* VideoProperties_get_Rating(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Rating");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Rating");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* VideoProperties_get_Publisher(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Publisher");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Publisher");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

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

    static PyObject* VideoProperties_get_Bitrate(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Bitrate");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Directors(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Directors");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Duration(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Duration");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Height(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Height");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Keywords(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Keywords");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Latitude(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Latitude");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Longitude(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Longitude");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Orientation(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Orientation");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Producers(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Producers");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Width(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Width");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

    static PyObject* VideoProperties_get_Writers(py::wrapper::Windows::Storage::FileProperties::VideoProperties* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.FileProperties.VideoProperties", L"Writers");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

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

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

    static PyObject* _from_VideoProperties(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::Storage::FileProperties::VideoProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_VideoProperties[] = {
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(VideoProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(VideoProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_VideoProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_VideoProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_VideoProperties[] = {
        { "year", reinterpret_cast<getter>(VideoProperties_get_Year), reinterpret_cast<setter>(VideoProperties_put_Year), nullptr, nullptr },
        { "title", reinterpret_cast<getter>(VideoProperties_get_Title), reinterpret_cast<setter>(VideoProperties_put_Title), nullptr, nullptr },
        { "subtitle", reinterpret_cast<getter>(VideoProperties_get_Subtitle), reinterpret_cast<setter>(VideoProperties_put_Subtitle), nullptr, nullptr },
        { "rating", reinterpret_cast<getter>(VideoProperties_get_Rating), reinterpret_cast<setter>(VideoProperties_put_Rating), nullptr, nullptr },
        { "publisher", reinterpret_cast<getter>(VideoProperties_get_Publisher), reinterpret_cast<setter>(VideoProperties_put_Publisher), nullptr, nullptr },
        { "bitrate", reinterpret_cast<getter>(VideoProperties_get_Bitrate), nullptr, nullptr, nullptr },
        { "directors", reinterpret_cast<getter>(VideoProperties_get_Directors), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(VideoProperties_get_Duration), nullptr, nullptr, nullptr },
        { "height", reinterpret_cast<getter>(VideoProperties_get_Height), nullptr, nullptr, nullptr },
        { "keywords", reinterpret_cast<getter>(VideoProperties_get_Keywords), nullptr, nullptr, nullptr },
        { "latitude", reinterpret_cast<getter>(VideoProperties_get_Latitude), nullptr, nullptr, nullptr },
        { "longitude", reinterpret_cast<getter>(VideoProperties_get_Longitude), nullptr, nullptr, nullptr },
        { "orientation", reinterpret_cast<getter>(VideoProperties_get_Orientation), nullptr, nullptr, nullptr },
        { "producers", reinterpret_cast<getter>(VideoProperties_get_Producers), nullptr, nullptr, nullptr },
        { "width", reinterpret_cast<getter>(VideoProperties_get_Width), nullptr, nullptr, nullptr },
        { "writers", reinterpret_cast<getter>(VideoProperties_get_Writers), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_VideoProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_VideoProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_VideoProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_VideoProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_VideoProperties) },
        { }
    };

    static PyType_Spec type_spec_VideoProperties = {
        "winrt._winrt_windows_storage_fileproperties.VideoProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::VideoProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VideoProperties};

    // ----- IStorageItemExtraProperties interface --------------------

    static PyObject* _new_IStorageItemExtraProperties(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Storage::FileProperties::IStorageItemExtraProperties>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Storage::FileProperties::IStorageItemExtraProperties>::type_name);
        return nullptr;
    }

    static void _dealloc_IStorageItemExtraProperties(py::wrapper::Windows::Storage::FileProperties::IStorageItemExtraProperties* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IStorageItemExtraProperties_RetrievePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::IStorageItemExtraProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.IStorageItemExtraProperties", L"RetrievePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

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

    static PyObject* IStorageItemExtraProperties_SavePropertiesAsync(py::wrapper::Windows::Storage::FileProperties::IStorageItemExtraProperties* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.IStorageItemExtraProperties", L"SavePropertiesAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert(self->obj.SavePropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.FileProperties.IStorageItemExtraProperties", L"SavePropertiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Foundation::IInspectable>>>(args, 0);

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

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

    static PyObject* _from_IStorageItemExtraProperties(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::Storage::FileProperties::IStorageItemExtraProperties>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IStorageItemExtraProperties[] = {
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(IStorageItemExtraProperties_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "save_properties_async", reinterpret_cast<PyCFunction>(IStorageItemExtraProperties_SavePropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IStorageItemExtraProperties, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IStorageItemExtraProperties), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IStorageItemExtraProperties[] = {
        { }
    };

    static PyType_Slot _type_slots_IStorageItemExtraProperties[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IStorageItemExtraProperties) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IStorageItemExtraProperties) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IStorageItemExtraProperties) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IStorageItemExtraProperties) },
        { }
    };

    static PyType_Spec type_spec_IStorageItemExtraProperties = {
        "winrt._winrt_windows_storage_fileproperties.IStorageItemExtraProperties",
        sizeof(py::wrapper::Windows::Storage::FileProperties::IStorageItemExtraProperties),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IStorageItemExtraProperties};

    // ----- Windows.Storage.FileProperties Initialization --------------------

    PyDoc_STRVAR(module_doc, "Windows.Storage.FileProperties");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_windows_storage_fileproperties",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Windows::Storage::FileProperties

PyMODINIT_FUNC PyInit__winrt_windows_storage_fileproperties(void) noexcept
{
    using namespace py::cpp::Windows::Storage::FileProperties;

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

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!object_bases)
    {
        return nullptr;
    }

    py::pytype_handle BasicProperties_type{py::register_python_type(module.get(), &type_spec_BasicProperties, object_bases.get(), nullptr)};
    if (!BasicProperties_type)
    {
        return nullptr;
    }

    py::pytype_handle DocumentProperties_type{py::register_python_type(module.get(), &type_spec_DocumentProperties, object_bases.get(), nullptr)};
    if (!DocumentProperties_type)
    {
        return nullptr;
    }

    py::pyobj_handle type_GeotagHelper_Static{PyType_FromSpec(&type_spec_GeotagHelper_Static)};
    if (!type_GeotagHelper_Static)
    {
        return nullptr;
    }

    py::pytype_handle GeotagHelper_type{py::register_python_type(module.get(), &type_spec_GeotagHelper, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_GeotagHelper_Static.get()))};
    if (!GeotagHelper_type)
    {
        return nullptr;
    }

    py::pytype_handle ImageProperties_type{py::register_python_type(module.get(), &type_spec_ImageProperties, object_bases.get(), nullptr)};
    if (!ImageProperties_type)
    {
        return nullptr;
    }

    py::pytype_handle MusicProperties_type{py::register_python_type(module.get(), &type_spec_MusicProperties, object_bases.get(), nullptr)};
    if (!MusicProperties_type)
    {
        return nullptr;
    }

    py::pytype_handle StorageItemContentProperties_type{py::register_python_type(module.get(), &type_spec_StorageItemContentProperties, object_bases.get(), nullptr)};
    if (!StorageItemContentProperties_type)
    {
        return nullptr;
    }

    py::pytype_handle StorageItemThumbnail_type{py::register_python_type(module.get(), &type_spec_StorageItemThumbnail, object_bases.get(), nullptr)};
    if (!StorageItemThumbnail_type)
    {
        return nullptr;
    }

    py::pytype_handle VideoProperties_type{py::register_python_type(module.get(), &type_spec_VideoProperties, object_bases.get(), nullptr)};
    if (!VideoProperties_type)
    {
        return nullptr;
    }

    py::pytype_handle IStorageItemExtraProperties_type{py::register_python_type(module.get(), &type_spec_IStorageItemExtraProperties, object_bases.get(), nullptr)};
    if (!IStorageItemExtraProperties_type)
    {
        return nullptr;
    }


    return module.detach();
}
