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

#include "pybase.h"
#include "py.Windows.Services.TargetedContent.h"


namespace py::cpp::Windows::Services::TargetedContent
{
    struct module_state
    {
        PyObject* type_TargetedContentAppInstallationState;
        PyObject* type_TargetedContentAvailability;
        PyObject* type_TargetedContentInteraction;
        PyObject* type_TargetedContentObjectKind;
        PyObject* type_TargetedContentValueKind;
        PyTypeObject* type_TargetedContentAction;
        PyTypeObject* type_TargetedContentAvailabilityChangedEventArgs;
        PyTypeObject* type_TargetedContentChangedEventArgs;
        PyTypeObject* type_TargetedContentCollection;
        PyTypeObject* type_TargetedContentContainer;
        PyTypeObject* type_TargetedContentFile;
        PyTypeObject* type_TargetedContentImage;
        PyTypeObject* type_TargetedContentItem;
        PyTypeObject* type_TargetedContentItemState;
        PyTypeObject* type_TargetedContentObject;
        PyTypeObject* type_TargetedContentStateChangedEventArgs;
        PyTypeObject* type_TargetedContentSubscription;
        PyTypeObject* type_TargetedContentSubscriptionOptions;
        PyTypeObject* type_TargetedContentValue;
    };

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

        if (state->type_TargetedContentAppInstallationState)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_TargetedContentAppInstallationState = type;
        Py_INCREF(state->type_TargetedContentAppInstallationState);


        Py_RETURN_NONE;
    }

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

        if (state->type_TargetedContentAvailability)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_TargetedContentAvailability = type;
        Py_INCREF(state->type_TargetedContentAvailability);


        Py_RETURN_NONE;
    }

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

        if (state->type_TargetedContentInteraction)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_TargetedContentInteraction = type;
        Py_INCREF(state->type_TargetedContentInteraction);


        Py_RETURN_NONE;
    }

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

        if (state->type_TargetedContentObjectKind)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_TargetedContentObjectKind = type;
        Py_INCREF(state->type_TargetedContentObjectKind);


        Py_RETURN_NONE;
    }

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

        if (state->type_TargetedContentValueKind)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_TargetedContentValueKind = type;
        Py_INCREF(state->type_TargetedContentValueKind);


        Py_RETURN_NONE;
    }

    // ----- TargetedContentAction class --------------------
    static constexpr const char* const type_name_TargetedContentAction = "TargetedContentAction";

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

    static void _dealloc_TargetedContentAction(py::wrapper::Windows::Services::TargetedContent::TargetedContentAction* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentAction_InvokeAsync(py::wrapper::Windows::Services::TargetedContent::TargetedContentAction* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentAction", L"InvokeAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

    static PyObject* _from_TargetedContentAction(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::Services::TargetedContent::TargetedContentAction>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentAction[] = {
        { "invoke_async", reinterpret_cast<PyCFunction>(TargetedContentAction_InvokeAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentAction, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentAction), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentAction[] = {
        { }
    };

    static PyType_Slot _type_slots_TargetedContentAction[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentAction) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentAction) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentAction) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentAction) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentAction =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentAction",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentAction),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentAction
    };

    // ----- TargetedContentAvailabilityChangedEventArgs class --------------------
    static constexpr const char* const type_name_TargetedContentAvailabilityChangedEventArgs = "TargetedContentAvailabilityChangedEventArgs";

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

    static void _dealloc_TargetedContentAvailabilityChangedEventArgs(py::wrapper::Windows::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentAvailabilityChangedEventArgs_GetDeferral(py::wrapper::Windows::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentAvailabilityChangedEventArgs", L"GetDeferral", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

    static PyObject* _from_TargetedContentAvailabilityChangedEventArgs(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::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentAvailabilityChangedEventArgs[] = {
        { "get_deferral", reinterpret_cast<PyCFunction>(TargetedContentAvailabilityChangedEventArgs_GetDeferral), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentAvailabilityChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentAvailabilityChangedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentAvailabilityChangedEventArgs[] = {
        { }
    };

    static PyType_Slot _type_slots_TargetedContentAvailabilityChangedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentAvailabilityChangedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentAvailabilityChangedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentAvailabilityChangedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentAvailabilityChangedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentAvailabilityChangedEventArgs =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentAvailabilityChangedEventArgs",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentAvailabilityChangedEventArgs
    };

    // ----- TargetedContentChangedEventArgs class --------------------
    static constexpr const char* const type_name_TargetedContentChangedEventArgs = "TargetedContentChangedEventArgs";

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

    static void _dealloc_TargetedContentChangedEventArgs(py::wrapper::Windows::Services::TargetedContent::TargetedContentChangedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentChangedEventArgs_GetDeferral(py::wrapper::Windows::Services::TargetedContent::TargetedContentChangedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentChangedEventArgs", L"GetDeferral", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

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

    static PyObject* _from_TargetedContentChangedEventArgs(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::Services::TargetedContent::TargetedContentChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentChangedEventArgs[] = {
        { "get_deferral", reinterpret_cast<PyCFunction>(TargetedContentChangedEventArgs_GetDeferral), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentChangedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentChangedEventArgs[] = {
        { "has_previous_content_expired", reinterpret_cast<getter>(TargetedContentChangedEventArgs_get_HasPreviousContentExpired), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentChangedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentChangedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentChangedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentChangedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentChangedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentChangedEventArgs =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentChangedEventArgs",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentChangedEventArgs
    };

    // ----- TargetedContentCollection class --------------------
    static constexpr const char* const type_name_TargetedContentCollection = "TargetedContentCollection";

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

    static void _dealloc_TargetedContentCollection(py::wrapper::Windows::Services::TargetedContent::TargetedContentCollection* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentCollection_ReportCustomInteraction(py::wrapper::Windows::Services::TargetedContent::TargetedContentCollection* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentCollection", L"ReportCustomInteraction", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* TargetedContentCollection_ReportInteraction(py::wrapper::Windows::Services::TargetedContent::TargetedContentCollection* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentCollection", L"ReportInteraction", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Services::TargetedContent::TargetedContentInteraction>(args, 0);

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_TargetedContentCollection(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::Services::TargetedContent::TargetedContentCollection>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentCollection[] = {
        { "report_custom_interaction", reinterpret_cast<PyCFunction>(TargetedContentCollection_ReportCustomInteraction), METH_VARARGS, nullptr },
        { "report_interaction", reinterpret_cast<PyCFunction>(TargetedContentCollection_ReportInteraction), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentCollection, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentCollection), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentCollection[] = {
        { "collections", reinterpret_cast<getter>(TargetedContentCollection_get_Collections), nullptr, nullptr, nullptr },
        { "id", reinterpret_cast<getter>(TargetedContentCollection_get_Id), nullptr, nullptr, nullptr },
        { "items", reinterpret_cast<getter>(TargetedContentCollection_get_Items), nullptr, nullptr, nullptr },
        { "path", reinterpret_cast<getter>(TargetedContentCollection_get_Path), nullptr, nullptr, nullptr },
        { "properties", reinterpret_cast<getter>(TargetedContentCollection_get_Properties), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentCollection[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentCollection) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentCollection) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentCollection) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentCollection) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentCollection =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentCollection",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentCollection),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentCollection
    };

    // ----- TargetedContentContainer class --------------------
    static constexpr const char* const type_name_TargetedContentContainer = "TargetedContentContainer";

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

    static void _dealloc_TargetedContentContainer(py::wrapper::Windows::Services::TargetedContent::TargetedContentContainer* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentContainer", L"GetAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Services::TargetedContent::TargetedContentContainer::GetAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* TargetedContentContainer_SelectSingleObject(py::wrapper::Windows::Services::TargetedContent::TargetedContentContainer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentContainer", L"SelectSingleObject", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_TargetedContentContainer(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::Services::TargetedContent::TargetedContentContainer>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentContainer[] = {
        { "get_async", reinterpret_cast<PyCFunction>(TargetedContentContainer_GetAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "select_single_object", reinterpret_cast<PyCFunction>(TargetedContentContainer_SelectSingleObject), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentContainer, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentContainer), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentContainer[] = {
        { "availability", reinterpret_cast<getter>(TargetedContentContainer_get_Availability), nullptr, nullptr, nullptr },
        { "content", reinterpret_cast<getter>(TargetedContentContainer_get_Content), nullptr, nullptr, nullptr },
        { "id", reinterpret_cast<getter>(TargetedContentContainer_get_Id), nullptr, nullptr, nullptr },
        { "timestamp", reinterpret_cast<getter>(TargetedContentContainer_get_Timestamp), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentContainer[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentContainer) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentContainer) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentContainer) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentContainer) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentContainer =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentContainer",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentContainer),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentContainer
    };

    // ----- TargetedContentFile class --------------------
    static constexpr const char* const type_name_TargetedContentFile = "TargetedContentFile";

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

    static void _dealloc_TargetedContentFile(py::wrapper::Windows::Services::TargetedContent::TargetedContentFile* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentFile_OpenReadAsync(py::wrapper::Windows::Services::TargetedContent::TargetedContentFile* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentFile", L"OpenReadAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

    static PyObject* _from_TargetedContentFile(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::Services::TargetedContent::TargetedContentFile>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentFile[] = {
        { "open_read_async", reinterpret_cast<PyCFunction>(TargetedContentFile_OpenReadAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentFile, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentFile), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentFile[] = {
        { }
    };

    static PyType_Slot _type_slots_TargetedContentFile[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentFile) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentFile) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentFile) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentFile) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentFile =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentFile",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentFile),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentFile
    };

    // ----- TargetedContentImage class --------------------
    static constexpr const char* const type_name_TargetedContentImage = "TargetedContentImage";

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

    static void _dealloc_TargetedContentImage(py::wrapper::Windows::Services::TargetedContent::TargetedContentImage* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentImage_OpenReadAsync(py::wrapper::Windows::Services::TargetedContent::TargetedContentImage* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentImage", L"OpenReadAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

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

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

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

    static PyObject* _from_TargetedContentImage(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::Services::TargetedContent::TargetedContentImage>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentImage[] = {
        { "open_read_async", reinterpret_cast<PyCFunction>(TargetedContentImage_OpenReadAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentImage, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentImage), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentImage[] = {
        { "height", reinterpret_cast<getter>(TargetedContentImage_get_Height), nullptr, nullptr, nullptr },
        { "width", reinterpret_cast<getter>(TargetedContentImage_get_Width), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentImage[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentImage) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentImage) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentImage) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentImage) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentImage =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentImage",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentImage),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentImage
    };

    // ----- TargetedContentItem class --------------------
    static constexpr const char* const type_name_TargetedContentItem = "TargetedContentItem";

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

    static void _dealloc_TargetedContentItem(py::wrapper::Windows::Services::TargetedContent::TargetedContentItem* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentItem_ReportCustomInteraction(py::wrapper::Windows::Services::TargetedContent::TargetedContentItem* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentItem", L"ReportCustomInteraction", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* TargetedContentItem_ReportInteraction(py::wrapper::Windows::Services::TargetedContent::TargetedContentItem* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentItem", L"ReportInteraction", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Services::TargetedContent::TargetedContentInteraction>(args, 0);

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_TargetedContentItem(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::Services::TargetedContent::TargetedContentItem>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentItem[] = {
        { "report_custom_interaction", reinterpret_cast<PyCFunction>(TargetedContentItem_ReportCustomInteraction), METH_VARARGS, nullptr },
        { "report_interaction", reinterpret_cast<PyCFunction>(TargetedContentItem_ReportInteraction), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentItem, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentItem), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentItem[] = {
        { "collections", reinterpret_cast<getter>(TargetedContentItem_get_Collections), nullptr, nullptr, nullptr },
        { "path", reinterpret_cast<getter>(TargetedContentItem_get_Path), nullptr, nullptr, nullptr },
        { "properties", reinterpret_cast<getter>(TargetedContentItem_get_Properties), nullptr, nullptr, nullptr },
        { "state", reinterpret_cast<getter>(TargetedContentItem_get_State), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentItem[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentItem) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentItem) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentItem) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentItem) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentItem =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentItem",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentItem),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentItem
    };

    // ----- TargetedContentItemState class --------------------
    static constexpr const char* const type_name_TargetedContentItemState = "TargetedContentItemState";

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

    static void _dealloc_TargetedContentItemState(py::wrapper::Windows::Services::TargetedContent::TargetedContentItemState* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

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

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

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

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

    static PyObject* _from_TargetedContentItemState(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::Services::TargetedContent::TargetedContentItemState>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentItemState[] = {
        { "_assign_array_", _assign_array_TargetedContentItemState, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentItemState), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentItemState[] = {
        { "app_installation_state", reinterpret_cast<getter>(TargetedContentItemState_get_AppInstallationState), nullptr, nullptr, nullptr },
        { "should_display", reinterpret_cast<getter>(TargetedContentItemState_get_ShouldDisplay), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentItemState[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentItemState) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentItemState) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentItemState) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentItemState) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentItemState =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentItemState",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentItemState),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentItemState
    };

    // ----- TargetedContentObject class --------------------
    static constexpr const char* const type_name_TargetedContentObject = "TargetedContentObject";

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

    static void _dealloc_TargetedContentObject(py::wrapper::Windows::Services::TargetedContent::TargetedContentObject* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

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

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

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

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

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

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

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

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

    static PyObject* _from_TargetedContentObject(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::Services::TargetedContent::TargetedContentObject>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentObject[] = {
        { "_assign_array_", _assign_array_TargetedContentObject, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentObject), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentObject[] = {
        { "collection", reinterpret_cast<getter>(TargetedContentObject_get_Collection), nullptr, nullptr, nullptr },
        { "item", reinterpret_cast<getter>(TargetedContentObject_get_Item), nullptr, nullptr, nullptr },
        { "object_kind", reinterpret_cast<getter>(TargetedContentObject_get_ObjectKind), nullptr, nullptr, nullptr },
        { "value", reinterpret_cast<getter>(TargetedContentObject_get_Value), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentObject[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentObject) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentObject) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentObject) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentObject) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentObject =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentObject",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentObject),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentObject
    };

    // ----- TargetedContentStateChangedEventArgs class --------------------
    static constexpr const char* const type_name_TargetedContentStateChangedEventArgs = "TargetedContentStateChangedEventArgs";

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

    static void _dealloc_TargetedContentStateChangedEventArgs(py::wrapper::Windows::Services::TargetedContent::TargetedContentStateChangedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentStateChangedEventArgs_GetDeferral(py::wrapper::Windows::Services::TargetedContent::TargetedContentStateChangedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentStateChangedEventArgs", L"GetDeferral", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

    static PyObject* _from_TargetedContentStateChangedEventArgs(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::Services::TargetedContent::TargetedContentStateChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentStateChangedEventArgs[] = {
        { "get_deferral", reinterpret_cast<PyCFunction>(TargetedContentStateChangedEventArgs_GetDeferral), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentStateChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentStateChangedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentStateChangedEventArgs[] = {
        { }
    };

    static PyType_Slot _type_slots_TargetedContentStateChangedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentStateChangedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentStateChangedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentStateChangedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentStateChangedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentStateChangedEventArgs =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentStateChangedEventArgs",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentStateChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentStateChangedEventArgs
    };

    // ----- TargetedContentSubscription class --------------------
    static constexpr const char* const type_name_TargetedContentSubscription = "TargetedContentSubscription";

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

    static void _dealloc_TargetedContentSubscription(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"GetAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Services::TargetedContent::TargetedContentSubscription::GetAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* TargetedContentSubscription_GetContentContainerAsync(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"GetContentContainerAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"GetOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Services::TargetedContent::TargetedContentSubscription::GetOptions(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

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

    static PyObject* TargetedContentSubscription_add_AvailabilityChanged(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"AvailabilityChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Services::TargetedContent::TargetedContentSubscription, winrt::Windows::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs>>(arg);

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

    static PyObject* TargetedContentSubscription_remove_AvailabilityChanged(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"AvailabilityChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* TargetedContentSubscription_add_ContentChanged(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"ContentChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Services::TargetedContent::TargetedContentSubscription, winrt::Windows::Services::TargetedContent::TargetedContentChangedEventArgs>>(arg);

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

    static PyObject* TargetedContentSubscription_remove_ContentChanged(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"ContentChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* TargetedContentSubscription_add_StateChanged(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"StateChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Services::TargetedContent::TargetedContentSubscription, winrt::Windows::Services::TargetedContent::TargetedContentStateChangedEventArgs>>(arg);

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

    static PyObject* TargetedContentSubscription_remove_StateChanged(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Services.TargetedContent.TargetedContentSubscription", L"StateChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* _from_TargetedContentSubscription(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::Services::TargetedContent::TargetedContentSubscription>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentSubscription[] = {
        { "get_async", reinterpret_cast<PyCFunction>(TargetedContentSubscription_GetAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "get_content_container_async", reinterpret_cast<PyCFunction>(TargetedContentSubscription_GetContentContainerAsync), METH_VARARGS, nullptr },
        { "get_options", reinterpret_cast<PyCFunction>(TargetedContentSubscription_GetOptions), METH_VARARGS | METH_STATIC, nullptr },
        { "add_availability_changed", reinterpret_cast<PyCFunction>(TargetedContentSubscription_add_AvailabilityChanged), METH_O, nullptr },
        { "remove_availability_changed", reinterpret_cast<PyCFunction>(TargetedContentSubscription_remove_AvailabilityChanged), METH_O, nullptr },
        { "add_content_changed", reinterpret_cast<PyCFunction>(TargetedContentSubscription_add_ContentChanged), METH_O, nullptr },
        { "remove_content_changed", reinterpret_cast<PyCFunction>(TargetedContentSubscription_remove_ContentChanged), METH_O, nullptr },
        { "add_state_changed", reinterpret_cast<PyCFunction>(TargetedContentSubscription_add_StateChanged), METH_O, nullptr },
        { "remove_state_changed", reinterpret_cast<PyCFunction>(TargetedContentSubscription_remove_StateChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_TargetedContentSubscription, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentSubscription), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentSubscription[] = {
        { "id", reinterpret_cast<getter>(TargetedContentSubscription_get_Id), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentSubscription[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentSubscription) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentSubscription) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentSubscription) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentSubscription) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentSubscription =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentSubscription",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscription),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentSubscription
    };

    // ----- TargetedContentSubscriptionOptions class --------------------
    static constexpr const char* const type_name_TargetedContentSubscriptionOptions = "TargetedContentSubscriptionOptions";

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

    static void _dealloc_TargetedContentSubscriptionOptions(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TargetedContentSubscriptionOptions_Update(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.TargetedContent.TargetedContentSubscriptionOptions", L"Update", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

    static int TargetedContentSubscriptionOptions_put_AllowPartialContentAvailability(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.TargetedContent.TargetedContentSubscriptionOptions", L"AllowPartialContentAvailability"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

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

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

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

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

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

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

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

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

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

    static PyObject* _from_TargetedContentSubscriptionOptions(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::Services::TargetedContent::TargetedContentSubscriptionOptions>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentSubscriptionOptions[] = {
        { "update", reinterpret_cast<PyCFunction>(TargetedContentSubscriptionOptions_Update), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_TargetedContentSubscriptionOptions, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentSubscriptionOptions), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentSubscriptionOptions[] = {
        { "allow_partial_content_availability", reinterpret_cast<getter>(TargetedContentSubscriptionOptions_get_AllowPartialContentAvailability), reinterpret_cast<setter>(TargetedContentSubscriptionOptions_put_AllowPartialContentAvailability), nullptr, nullptr },
        { "cloud_query_parameters", reinterpret_cast<getter>(TargetedContentSubscriptionOptions_get_CloudQueryParameters), nullptr, nullptr, nullptr },
        { "local_filters", reinterpret_cast<getter>(TargetedContentSubscriptionOptions_get_LocalFilters), nullptr, nullptr, nullptr },
        { "subscription_id", reinterpret_cast<getter>(TargetedContentSubscriptionOptions_get_SubscriptionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentSubscriptionOptions[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentSubscriptionOptions) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentSubscriptionOptions) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentSubscriptionOptions) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentSubscriptionOptions) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentSubscriptionOptions =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentSubscriptionOptions",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentSubscriptionOptions
    };

    // ----- TargetedContentValue class --------------------
    static constexpr const char* const type_name_TargetedContentValue = "TargetedContentValue";

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

    static void _dealloc_TargetedContentValue(py::wrapper::Windows::Services::TargetedContent::TargetedContentValue* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_TargetedContentValue(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::Services::TargetedContent::TargetedContentValue>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TargetedContentValue[] = {
        { "_assign_array_", _assign_array_TargetedContentValue, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TargetedContentValue), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TargetedContentValue[] = {
        { "action", reinterpret_cast<getter>(TargetedContentValue_get_Action), nullptr, nullptr, nullptr },
        { "actions", reinterpret_cast<getter>(TargetedContentValue_get_Actions), nullptr, nullptr, nullptr },
        { "boolean", reinterpret_cast<getter>(TargetedContentValue_get_Boolean), nullptr, nullptr, nullptr },
        { "booleans", reinterpret_cast<getter>(TargetedContentValue_get_Booleans), nullptr, nullptr, nullptr },
        { "file", reinterpret_cast<getter>(TargetedContentValue_get_File), nullptr, nullptr, nullptr },
        { "files", reinterpret_cast<getter>(TargetedContentValue_get_Files), nullptr, nullptr, nullptr },
        { "image_file", reinterpret_cast<getter>(TargetedContentValue_get_ImageFile), nullptr, nullptr, nullptr },
        { "image_files", reinterpret_cast<getter>(TargetedContentValue_get_ImageFiles), nullptr, nullptr, nullptr },
        { "number", reinterpret_cast<getter>(TargetedContentValue_get_Number), nullptr, nullptr, nullptr },
        { "numbers", reinterpret_cast<getter>(TargetedContentValue_get_Numbers), nullptr, nullptr, nullptr },
        { "path", reinterpret_cast<getter>(TargetedContentValue_get_Path), nullptr, nullptr, nullptr },
        { "string", reinterpret_cast<getter>(TargetedContentValue_get_String), nullptr, nullptr, nullptr },
        { "strings", reinterpret_cast<getter>(TargetedContentValue_get_Strings), nullptr, nullptr, nullptr },
        { "uri", reinterpret_cast<getter>(TargetedContentValue_get_Uri), nullptr, nullptr, nullptr },
        { "uris", reinterpret_cast<getter>(TargetedContentValue_get_Uris), nullptr, nullptr, nullptr },
        { "value_kind", reinterpret_cast<getter>(TargetedContentValue_get_ValueKind), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TargetedContentValue[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TargetedContentValue) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TargetedContentValue) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TargetedContentValue) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TargetedContentValue) },
        { },
    };

    static PyType_Spec type_spec_TargetedContentValue =
    {
        "_winsdk_Windows_Services_TargetedContent.TargetedContentValue",
        sizeof(py::wrapper::Windows::Services::TargetedContent::TargetedContentValue),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TargetedContentValue
    };

    // ----- Windows.Services.TargetedContent Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Services::TargetedContent");

    static PyMethodDef module_methods[] = {
        {"_register_TargetedContentAppInstallationState", register_TargetedContentAppInstallationState, METH_O, "registers type"},
        {"_register_TargetedContentAvailability", register_TargetedContentAvailability, METH_O, "registers type"},
        {"_register_TargetedContentInteraction", register_TargetedContentInteraction, METH_O, "registers type"},
        {"_register_TargetedContentObjectKind", register_TargetedContentObjectKind, METH_O, "registers type"},
        {"_register_TargetedContentValueKind", register_TargetedContentValueKind, METH_O, "registers type"},
        {}};


    static int module_traverse(PyObject* module, visitproc visit, void* arg) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_TargetedContentAppInstallationState);
        Py_VISIT(state->type_TargetedContentAvailability);
        Py_VISIT(state->type_TargetedContentInteraction);
        Py_VISIT(state->type_TargetedContentObjectKind);
        Py_VISIT(state->type_TargetedContentValueKind);
        Py_VISIT(state->type_TargetedContentAction);
        Py_VISIT(state->type_TargetedContentAvailabilityChangedEventArgs);
        Py_VISIT(state->type_TargetedContentChangedEventArgs);
        Py_VISIT(state->type_TargetedContentCollection);
        Py_VISIT(state->type_TargetedContentContainer);
        Py_VISIT(state->type_TargetedContentFile);
        Py_VISIT(state->type_TargetedContentImage);
        Py_VISIT(state->type_TargetedContentItem);
        Py_VISIT(state->type_TargetedContentItemState);
        Py_VISIT(state->type_TargetedContentObject);
        Py_VISIT(state->type_TargetedContentStateChangedEventArgs);
        Py_VISIT(state->type_TargetedContentSubscription);
        Py_VISIT(state->type_TargetedContentSubscriptionOptions);
        Py_VISIT(state->type_TargetedContentValue);

        return 0;
    }

    static int module_clear(PyObject* module) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_TargetedContentAppInstallationState);
        Py_CLEAR(state->type_TargetedContentAvailability);
        Py_CLEAR(state->type_TargetedContentInteraction);
        Py_CLEAR(state->type_TargetedContentObjectKind);
        Py_CLEAR(state->type_TargetedContentValueKind);
        Py_CLEAR(state->type_TargetedContentAction);
        Py_CLEAR(state->type_TargetedContentAvailabilityChangedEventArgs);
        Py_CLEAR(state->type_TargetedContentChangedEventArgs);
        Py_CLEAR(state->type_TargetedContentCollection);
        Py_CLEAR(state->type_TargetedContentContainer);
        Py_CLEAR(state->type_TargetedContentFile);
        Py_CLEAR(state->type_TargetedContentImage);
        Py_CLEAR(state->type_TargetedContentItem);
        Py_CLEAR(state->type_TargetedContentItemState);
        Py_CLEAR(state->type_TargetedContentObject);
        Py_CLEAR(state->type_TargetedContentStateChangedEventArgs);
        Py_CLEAR(state->type_TargetedContentSubscription);
        Py_CLEAR(state->type_TargetedContentSubscriptionOptions);
        Py_CLEAR(state->type_TargetedContentValue);

        return 0;
    }


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

} // py::cpp::Windows::Services::TargetedContent

PyMODINIT_FUNC PyInit__winsdk_Windows_Services_TargetedContent(void) noexcept
{
    using namespace py::cpp::Windows::Services::TargetedContent;

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

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_python_type<py::Object>();
    if (!object_type)
    {
        return nullptr;
    }

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

    if (!bases)
    {
        return nullptr;
    }

    py::pyobj_handle collections_abc_module{PyImport_ImportModule("collections.abc")};

    if (!collections_abc_module)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "Sequence")};

    if (!sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_bases{PyTuple_Pack(2, object_type, sequence_type.get())};

    if (!sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableSequence")};

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_bases{PyTuple_Pack(2, object_type, mutable_sequence_type.get())};

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "Mapping")};

    if (!mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_bases{PyTuple_Pack(2, object_type, mapping_type.get())};

    if (!mapping_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableMapping")};

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_bases{PyTuple_Pack(2, object_type, mutable_mapping_type.get())};

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

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

    state->type_TargetedContentAction = py::register_python_type(module.get(), type_name_TargetedContentAction, &type_spec_TargetedContentAction, bases.get(), nullptr);
    if (!state->type_TargetedContentAction)
    {
        return nullptr;
    }

    state->type_TargetedContentAvailabilityChangedEventArgs = py::register_python_type(module.get(), type_name_TargetedContentAvailabilityChangedEventArgs, &type_spec_TargetedContentAvailabilityChangedEventArgs, bases.get(), nullptr);
    if (!state->type_TargetedContentAvailabilityChangedEventArgs)
    {
        return nullptr;
    }

    state->type_TargetedContentChangedEventArgs = py::register_python_type(module.get(), type_name_TargetedContentChangedEventArgs, &type_spec_TargetedContentChangedEventArgs, bases.get(), nullptr);
    if (!state->type_TargetedContentChangedEventArgs)
    {
        return nullptr;
    }

    state->type_TargetedContentCollection = py::register_python_type(module.get(), type_name_TargetedContentCollection, &type_spec_TargetedContentCollection, bases.get(), nullptr);
    if (!state->type_TargetedContentCollection)
    {
        return nullptr;
    }

    state->type_TargetedContentContainer = py::register_python_type(module.get(), type_name_TargetedContentContainer, &type_spec_TargetedContentContainer, bases.get(), nullptr);
    if (!state->type_TargetedContentContainer)
    {
        return nullptr;
    }

    state->type_TargetedContentFile = py::register_python_type(module.get(), type_name_TargetedContentFile, &type_spec_TargetedContentFile, bases.get(), nullptr);
    if (!state->type_TargetedContentFile)
    {
        return nullptr;
    }

    state->type_TargetedContentImage = py::register_python_type(module.get(), type_name_TargetedContentImage, &type_spec_TargetedContentImage, bases.get(), nullptr);
    if (!state->type_TargetedContentImage)
    {
        return nullptr;
    }

    state->type_TargetedContentItem = py::register_python_type(module.get(), type_name_TargetedContentItem, &type_spec_TargetedContentItem, bases.get(), nullptr);
    if (!state->type_TargetedContentItem)
    {
        return nullptr;
    }

    state->type_TargetedContentItemState = py::register_python_type(module.get(), type_name_TargetedContentItemState, &type_spec_TargetedContentItemState, bases.get(), nullptr);
    if (!state->type_TargetedContentItemState)
    {
        return nullptr;
    }

    state->type_TargetedContentObject = py::register_python_type(module.get(), type_name_TargetedContentObject, &type_spec_TargetedContentObject, bases.get(), nullptr);
    if (!state->type_TargetedContentObject)
    {
        return nullptr;
    }

    state->type_TargetedContentStateChangedEventArgs = py::register_python_type(module.get(), type_name_TargetedContentStateChangedEventArgs, &type_spec_TargetedContentStateChangedEventArgs, bases.get(), nullptr);
    if (!state->type_TargetedContentStateChangedEventArgs)
    {
        return nullptr;
    }

    state->type_TargetedContentSubscription = py::register_python_type(module.get(), type_name_TargetedContentSubscription, &type_spec_TargetedContentSubscription, bases.get(), nullptr);
    if (!state->type_TargetedContentSubscription)
    {
        return nullptr;
    }

    state->type_TargetedContentSubscriptionOptions = py::register_python_type(module.get(), type_name_TargetedContentSubscriptionOptions, &type_spec_TargetedContentSubscriptionOptions, bases.get(), nullptr);
    if (!state->type_TargetedContentSubscriptionOptions)
    {
        return nullptr;
    }

    state->type_TargetedContentValue = py::register_python_type(module.get(), type_name_TargetedContentValue, &type_spec_TargetedContentValue, bases.get(), nullptr);
    if (!state->type_TargetedContentValue)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Services::TargetedContent::TargetedContentAppInstallationState>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentAppInstallationState;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentAppInstallationState is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Services::TargetedContent::TargetedContentAvailability>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentAvailability;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentAvailability is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Services::TargetedContent::TargetedContentInteraction>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentInteraction;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentInteraction is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Services::TargetedContent::TargetedContentObjectKind>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentObjectKind;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentObjectKind is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Services::TargetedContent::TargetedContentValueKind>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentValueKind;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentValueKind is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentAction>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentAction;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentAction is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentAvailabilityChangedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentAvailabilityChangedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentChangedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentChangedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentChangedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentCollection>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentCollection;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentCollection is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentContainer>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentContainer;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentContainer is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentFile>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentFile;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentFile is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentImage>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentImage;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentImage is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentItem>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentItem;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentItem is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentItemState>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentItemState;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentItemState is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentObject>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentObject;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentObject is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentStateChangedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentStateChangedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentStateChangedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentSubscription>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentSubscription;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentSubscription is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentSubscriptionOptions;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Services::TargetedContent::TargetedContentValue>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Services::TargetedContent;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TargetedContentValue;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Services::TargetedContent::TargetedContentValue is not registered");
        return nullptr;
    }

    return python_type;
}
