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

#include "pybase.h"
#include "py.Windows.AI.MachineLearning.Preview.h"


namespace py::cpp::Windows::AI::MachineLearning::Preview
{
    struct module_state
    {
        PyObject* type_FeatureElementKindPreview;
        PyObject* type_LearningModelDeviceKindPreview;
        PyObject* type_LearningModelFeatureKindPreview;
        PyTypeObject* type_ImageVariableDescriptorPreview;
        PyTypeObject* type_InferencingOptionsPreview;
        PyTypeObject* type_LearningModelBindingPreview;
        PyTypeObject* type_LearningModelDescriptionPreview;
        PyTypeObject* type_LearningModelEvaluationResultPreview;
        PyTypeObject* type_LearningModelPreview;
        PyTypeObject* type_LearningModelVariableDescriptorPreview;
        PyTypeObject* type_MapVariableDescriptorPreview;
        PyTypeObject* type_SequenceVariableDescriptorPreview;
        PyTypeObject* type_TensorVariableDescriptorPreview;
        PyTypeObject* type_ILearningModelVariableDescriptorPreview;
    };

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

    // ----- ImageVariableDescriptorPreview class --------------------
    static constexpr const char* const type_name_ImageVariableDescriptorPreview = "ImageVariableDescriptorPreview";

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

    static void _dealloc_ImageVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* 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* ImageVariableDescriptorPreview_get_BitmapPixelFormat(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ImageVariableDescriptorPreview", L"BitmapPixelFormat"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ImageVariableDescriptorPreview_get_Height(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ImageVariableDescriptorPreview", 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* ImageVariableDescriptorPreview_get_Width(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ImageVariableDescriptorPreview", 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* ImageVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ImageVariableDescriptorPreview", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ImageVariableDescriptorPreview_get_IsRequired(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ImageVariableDescriptorPreview", L"IsRequired"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ImageVariableDescriptorPreview_get_ModelFeatureKind(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ImageVariableDescriptorPreview", L"ModelFeatureKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* _assign_array_ImageVariableDescriptorPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ImageVariableDescriptorPreview(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::AI::MachineLearning::Preview::ImageVariableDescriptorPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ImageVariableDescriptorPreview[] = {
        { "_assign_array_", _assign_array_ImageVariableDescriptorPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ImageVariableDescriptorPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ImageVariableDescriptorPreview[] = {
        { "bitmap_pixel_format", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_BitmapPixelFormat), nullptr, nullptr, nullptr },
        { "height", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_Height), nullptr, nullptr, nullptr },
        { "width", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_Width), nullptr, nullptr, nullptr },
        { "description", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_Description), nullptr, nullptr, nullptr },
        { "is_required", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_IsRequired), nullptr, nullptr, nullptr },
        { "model_feature_kind", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_ModelFeatureKind), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(ImageVariableDescriptorPreview_get_Name), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ImageVariableDescriptorPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ImageVariableDescriptorPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ImageVariableDescriptorPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ImageVariableDescriptorPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ImageVariableDescriptorPreview) },
        { },
    };

    static PyType_Spec type_spec_ImageVariableDescriptorPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.ImageVariableDescriptorPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ImageVariableDescriptorPreview
    };

    // ----- InferencingOptionsPreview class --------------------
    static constexpr const char* const type_name_InferencingOptionsPreview = "InferencingOptionsPreview";

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

    static void _dealloc_InferencingOptionsPreview(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* 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* InferencingOptionsPreview_get_ReclaimMemoryAfterEvaluation(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"ReclaimMemoryAfterEvaluation"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* InferencingOptionsPreview_get_PreferredDeviceKind(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"PreferredDeviceKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int InferencingOptionsPreview_put_PreferredDeviceKind(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"PreferredDeviceKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::AI::MachineLearning::Preview::LearningModelDeviceKindPreview>(arg);

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

    static PyObject* InferencingOptionsPreview_get_MinimizeMemoryAllocation(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"MinimizeMemoryAllocation"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* InferencingOptionsPreview_get_MaxBatchSize(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"MaxBatchSize"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int InferencingOptionsPreview_put_MaxBatchSize(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"MaxBatchSize"))
        {
            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<int32_t>(arg);

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

    static PyObject* InferencingOptionsPreview_get_IsTracingEnabled(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.InferencingOptionsPreview", L"IsTracingEnabled"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _assign_array_InferencingOptionsPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_InferencingOptionsPreview(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::AI::MachineLearning::Preview::InferencingOptionsPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_InferencingOptionsPreview[] = {
        { "_assign_array_", _assign_array_InferencingOptionsPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_InferencingOptionsPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_InferencingOptionsPreview[] = {
        { "reclaim_memory_after_evaluation", reinterpret_cast<getter>(InferencingOptionsPreview_get_ReclaimMemoryAfterEvaluation), reinterpret_cast<setter>(InferencingOptionsPreview_put_ReclaimMemoryAfterEvaluation), nullptr, nullptr },
        { "preferred_device_kind", reinterpret_cast<getter>(InferencingOptionsPreview_get_PreferredDeviceKind), reinterpret_cast<setter>(InferencingOptionsPreview_put_PreferredDeviceKind), nullptr, nullptr },
        { "minimize_memory_allocation", reinterpret_cast<getter>(InferencingOptionsPreview_get_MinimizeMemoryAllocation), reinterpret_cast<setter>(InferencingOptionsPreview_put_MinimizeMemoryAllocation), nullptr, nullptr },
        { "max_batch_size", reinterpret_cast<getter>(InferencingOptionsPreview_get_MaxBatchSize), reinterpret_cast<setter>(InferencingOptionsPreview_put_MaxBatchSize), nullptr, nullptr },
        { "is_tracing_enabled", reinterpret_cast<getter>(InferencingOptionsPreview_get_IsTracingEnabled), reinterpret_cast<setter>(InferencingOptionsPreview_put_IsTracingEnabled), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_InferencingOptionsPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_InferencingOptionsPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_InferencingOptionsPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_InferencingOptionsPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_InferencingOptionsPreview) },
        { },
    };

    static PyType_Spec type_spec_InferencingOptionsPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.InferencingOptionsPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_InferencingOptionsPreview
    };

    // ----- LearningModelBindingPreview class --------------------
    static constexpr const char* const type_name_LearningModelBindingPreview = "LearningModelBindingPreview";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview>(args, 0);

                winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_LearningModelBindingPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* 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* LearningModelBindingPreview_Bind(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"Bind", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                self->obj.Bind(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"Bind", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* LearningModelBindingPreview_Clear(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"Clear", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* LearningModelBindingPreview_First(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"First", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* LearningModelBindingPreview_HasKey(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"HasKey", 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.HasKey(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* LearningModelBindingPreview_Lookup(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"Lookup", 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.Lookup(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* LearningModelBindingPreview_Split(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"Split", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                winrt::Windows::Foundation::Collections::IMapView<winrt::hstring, winrt::Windows::Foundation::IInspectable> param0 { nullptr };
                winrt::Windows::Foundation::Collections::IMapView<winrt::hstring, winrt::Windows::Foundation::IInspectable> param1 { nullptr };

                self->obj.Split(param0, param1);

                py::pyobj_handle out0{ py::convert(param0) };
                if (!out0)
                {
                    return nullptr;
                }
                py::pyobj_handle out1{ py::convert(param1) };
                if (!out1)
                {
                    return nullptr;
                }
                return PyTuple_Pack(2, out0.get(), out1.get());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* LearningModelBindingPreview_get_Size(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelBindingPreview", L"Size"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_LearningModelBindingPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LearningModelBindingPreview(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::AI::MachineLearning::Preview::LearningModelBindingPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _iterator_LearningModelBindingPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self) noexcept
    {
        try
        {
            py::pyobj_handle iter{py::convert(self->obj.First())};
            return py::wrap_mapping_iter(iter.get());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int _map_contains_LearningModelBindingPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* key) noexcept
    {
        try
        {
            return static_cast<int>(self->obj.HasKey(py::convert_to<winrt::hstring>(key)));
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static Py_ssize_t _map_length_LearningModelBindingPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self) noexcept
    {
        try
        {
            return static_cast<Py_ssize_t>(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _map_subscript_LearningModelBindingPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview* self, PyObject* key) noexcept
    {
        try
        {
            auto value = self->obj.TryLookup(py::convert_to<winrt::hstring>(key));

            if (!value) {
                PyErr_SetObject(PyExc_KeyError, key);
                return nullptr;
            }

            return py::convert(value);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LearningModelBindingPreview[] = {
        { "bind", reinterpret_cast<PyCFunction>(LearningModelBindingPreview_Bind), METH_VARARGS, nullptr },
        { "clear", reinterpret_cast<PyCFunction>(LearningModelBindingPreview_Clear), METH_VARARGS, nullptr },
        { "first", reinterpret_cast<PyCFunction>(LearningModelBindingPreview_First), METH_VARARGS, nullptr },
        { "has_key", reinterpret_cast<PyCFunction>(LearningModelBindingPreview_HasKey), METH_VARARGS, nullptr },
        { "lookup", reinterpret_cast<PyCFunction>(LearningModelBindingPreview_Lookup), METH_VARARGS, nullptr },
        { "split", reinterpret_cast<PyCFunction>(LearningModelBindingPreview_Split), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_LearningModelBindingPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LearningModelBindingPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LearningModelBindingPreview[] = {
        { "size", reinterpret_cast<getter>(LearningModelBindingPreview_get_Size), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LearningModelBindingPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LearningModelBindingPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LearningModelBindingPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LearningModelBindingPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LearningModelBindingPreview) },
        { Py_tp_iter, reinterpret_cast<void*>(_iterator_LearningModelBindingPreview) },
        { Py_sq_contains, reinterpret_cast<void*>(_map_contains_LearningModelBindingPreview) },
        { Py_mp_length, reinterpret_cast<void*>(_map_length_LearningModelBindingPreview) },
        { Py_mp_subscript, reinterpret_cast<void*>(_map_subscript_LearningModelBindingPreview) },
        { },
    };

    static PyType_Spec type_spec_LearningModelBindingPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.LearningModelBindingPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LearningModelBindingPreview
    };

    // ----- LearningModelDescriptionPreview class --------------------
    static constexpr const char* const type_name_LearningModelDescriptionPreview = "LearningModelDescriptionPreview";

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

    static void _dealloc_LearningModelDescriptionPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* 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* LearningModelDescriptionPreview_get_Author(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelDescriptionPreview", L"Author"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* LearningModelDescriptionPreview_get_Domain(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelDescriptionPreview", L"Domain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* LearningModelDescriptionPreview_get_InputFeatures(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelDescriptionPreview", L"InputFeatures"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

    static PyObject* LearningModelDescriptionPreview_get_OutputFeatures(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelDescriptionPreview", L"OutputFeatures"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* LearningModelDescriptionPreview_get_Version(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelDescriptionPreview", L"Version"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_LearningModelDescriptionPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LearningModelDescriptionPreview(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::AI::MachineLearning::Preview::LearningModelDescriptionPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LearningModelDescriptionPreview[] = {
        { "_assign_array_", _assign_array_LearningModelDescriptionPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LearningModelDescriptionPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LearningModelDescriptionPreview[] = {
        { "author", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_Author), nullptr, nullptr, nullptr },
        { "description", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_Description), nullptr, nullptr, nullptr },
        { "domain", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_Domain), nullptr, nullptr, nullptr },
        { "input_features", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_InputFeatures), nullptr, nullptr, nullptr },
        { "metadata", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_Metadata), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_Name), nullptr, nullptr, nullptr },
        { "output_features", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_OutputFeatures), nullptr, nullptr, nullptr },
        { "version", reinterpret_cast<getter>(LearningModelDescriptionPreview_get_Version), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LearningModelDescriptionPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LearningModelDescriptionPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LearningModelDescriptionPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LearningModelDescriptionPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LearningModelDescriptionPreview) },
        { },
    };

    static PyType_Spec type_spec_LearningModelDescriptionPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.LearningModelDescriptionPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LearningModelDescriptionPreview
    };

    // ----- LearningModelEvaluationResultPreview class --------------------
    static constexpr const char* const type_name_LearningModelEvaluationResultPreview = "LearningModelEvaluationResultPreview";

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

    static void _dealloc_LearningModelEvaluationResultPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview* 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* LearningModelEvaluationResultPreview_get_CorrelationId(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelEvaluationResultPreview", L"CorrelationId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* LearningModelEvaluationResultPreview_get_Outputs(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelEvaluationResultPreview", L"Outputs"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_LearningModelEvaluationResultPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LearningModelEvaluationResultPreview(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::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LearningModelEvaluationResultPreview[] = {
        { "_assign_array_", _assign_array_LearningModelEvaluationResultPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LearningModelEvaluationResultPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LearningModelEvaluationResultPreview[] = {
        { "correlation_id", reinterpret_cast<getter>(LearningModelEvaluationResultPreview_get_CorrelationId), nullptr, nullptr, nullptr },
        { "outputs", reinterpret_cast<getter>(LearningModelEvaluationResultPreview_get_Outputs), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LearningModelEvaluationResultPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LearningModelEvaluationResultPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LearningModelEvaluationResultPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LearningModelEvaluationResultPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LearningModelEvaluationResultPreview) },
        { },
    };

    static PyType_Spec type_spec_LearningModelEvaluationResultPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.LearningModelEvaluationResultPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LearningModelEvaluationResultPreview
    };

    // ----- LearningModelPreview class --------------------
    static constexpr const char* const type_name_LearningModelPreview = "LearningModelPreview";

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

    static void _dealloc_LearningModelPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelPreview* 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* LearningModelPreview_EvaluateAsync(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelPreview", L"EvaluateAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* LearningModelPreview_EvaluateFeaturesAsync(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelPreview* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelPreview", L"EvaluateFeaturesAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelPreview", L"LoadModelFromStorageFileAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview::LoadModelFromStorageFileAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.MachineLearning.Preview.LearningModelPreview", L"LoadModelFromStreamAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview::LoadModelFromStreamAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* LearningModelPreview_get_InferencingOptions(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelPreview", L"InferencingOptions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int LearningModelPreview_put_InferencingOptions(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelPreview* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelPreview", L"InferencingOptions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview>(arg);

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

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

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

    static PyObject* _assign_array_LearningModelPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LearningModelPreview(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::AI::MachineLearning::Preview::LearningModelPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LearningModelPreview[] = {
        { "evaluate_async", reinterpret_cast<PyCFunction>(LearningModelPreview_EvaluateAsync), METH_VARARGS, nullptr },
        { "evaluate_features_async", reinterpret_cast<PyCFunction>(LearningModelPreview_EvaluateFeaturesAsync), METH_VARARGS, nullptr },
        { "load_model_from_storage_file_async", reinterpret_cast<PyCFunction>(LearningModelPreview_LoadModelFromStorageFileAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "load_model_from_stream_async", reinterpret_cast<PyCFunction>(LearningModelPreview_LoadModelFromStreamAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "_assign_array_", _assign_array_LearningModelPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LearningModelPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LearningModelPreview[] = {
        { "inferencing_options", reinterpret_cast<getter>(LearningModelPreview_get_InferencingOptions), reinterpret_cast<setter>(LearningModelPreview_put_InferencingOptions), nullptr, nullptr },
        { "description", reinterpret_cast<getter>(LearningModelPreview_get_Description), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LearningModelPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LearningModelPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LearningModelPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LearningModelPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LearningModelPreview) },
        { },
    };

    static PyType_Spec type_spec_LearningModelPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.LearningModelPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LearningModelPreview
    };

    // ----- LearningModelVariableDescriptorPreview class --------------------
    static constexpr const char* const type_name_LearningModelVariableDescriptorPreview = "LearningModelVariableDescriptorPreview";

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

    static void _dealloc_LearningModelVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview* 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* LearningModelVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelVariableDescriptorPreview", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* LearningModelVariableDescriptorPreview_get_IsRequired(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelVariableDescriptorPreview", L"IsRequired"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* LearningModelVariableDescriptorPreview_get_ModelFeatureKind(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.LearningModelVariableDescriptorPreview", L"ModelFeatureKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* _assign_array_LearningModelVariableDescriptorPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LearningModelVariableDescriptorPreview(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::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LearningModelVariableDescriptorPreview[] = {
        { "_assign_array_", _assign_array_LearningModelVariableDescriptorPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LearningModelVariableDescriptorPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LearningModelVariableDescriptorPreview[] = {
        { "description", reinterpret_cast<getter>(LearningModelVariableDescriptorPreview_get_Description), nullptr, nullptr, nullptr },
        { "is_required", reinterpret_cast<getter>(LearningModelVariableDescriptorPreview_get_IsRequired), nullptr, nullptr, nullptr },
        { "model_feature_kind", reinterpret_cast<getter>(LearningModelVariableDescriptorPreview_get_ModelFeatureKind), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(LearningModelVariableDescriptorPreview_get_Name), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LearningModelVariableDescriptorPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LearningModelVariableDescriptorPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LearningModelVariableDescriptorPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LearningModelVariableDescriptorPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LearningModelVariableDescriptorPreview) },
        { },
    };

    static PyType_Spec type_spec_LearningModelVariableDescriptorPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.LearningModelVariableDescriptorPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LearningModelVariableDescriptorPreview
    };

    // ----- MapVariableDescriptorPreview class --------------------
    static constexpr const char* const type_name_MapVariableDescriptorPreview = "MapVariableDescriptorPreview";

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

    static void _dealloc_MapVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* 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* MapVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* MapVariableDescriptorPreview_get_IsRequired(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"IsRequired"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* MapVariableDescriptorPreview_get_ModelFeatureKind(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"ModelFeatureKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* MapVariableDescriptorPreview_get_Fields(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"Fields"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* MapVariableDescriptorPreview_get_KeyKind(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"KeyKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* MapVariableDescriptorPreview_get_ValidIntegerKeys(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"ValidIntegerKeys"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* MapVariableDescriptorPreview_get_ValidStringKeys(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.MapVariableDescriptorPreview", L"ValidStringKeys"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_MapVariableDescriptorPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_MapVariableDescriptorPreview(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::AI::MachineLearning::Preview::MapVariableDescriptorPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_MapVariableDescriptorPreview[] = {
        { "_assign_array_", _assign_array_MapVariableDescriptorPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MapVariableDescriptorPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MapVariableDescriptorPreview[] = {
        { "description", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_Description), nullptr, nullptr, nullptr },
        { "is_required", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_IsRequired), nullptr, nullptr, nullptr },
        { "model_feature_kind", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_ModelFeatureKind), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_Name), nullptr, nullptr, nullptr },
        { "fields", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_Fields), nullptr, nullptr, nullptr },
        { "key_kind", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_KeyKind), nullptr, nullptr, nullptr },
        { "valid_integer_keys", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_ValidIntegerKeys), nullptr, nullptr, nullptr },
        { "valid_string_keys", reinterpret_cast<getter>(MapVariableDescriptorPreview_get_ValidStringKeys), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_MapVariableDescriptorPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_MapVariableDescriptorPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MapVariableDescriptorPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MapVariableDescriptorPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MapVariableDescriptorPreview) },
        { },
    };

    static PyType_Spec type_spec_MapVariableDescriptorPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.MapVariableDescriptorPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MapVariableDescriptorPreview
    };

    // ----- SequenceVariableDescriptorPreview class --------------------
    static constexpr const char* const type_name_SequenceVariableDescriptorPreview = "SequenceVariableDescriptorPreview";

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

    static void _dealloc_SequenceVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview* 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* SequenceVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.SequenceVariableDescriptorPreview", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* SequenceVariableDescriptorPreview_get_IsRequired(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.SequenceVariableDescriptorPreview", L"IsRequired"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* SequenceVariableDescriptorPreview_get_ModelFeatureKind(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.SequenceVariableDescriptorPreview", L"ModelFeatureKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* SequenceVariableDescriptorPreview_get_ElementType(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.SequenceVariableDescriptorPreview", L"ElementType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_SequenceVariableDescriptorPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_SequenceVariableDescriptorPreview(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::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SequenceVariableDescriptorPreview[] = {
        { "_assign_array_", _assign_array_SequenceVariableDescriptorPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SequenceVariableDescriptorPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SequenceVariableDescriptorPreview[] = {
        { "description", reinterpret_cast<getter>(SequenceVariableDescriptorPreview_get_Description), nullptr, nullptr, nullptr },
        { "is_required", reinterpret_cast<getter>(SequenceVariableDescriptorPreview_get_IsRequired), nullptr, nullptr, nullptr },
        { "model_feature_kind", reinterpret_cast<getter>(SequenceVariableDescriptorPreview_get_ModelFeatureKind), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(SequenceVariableDescriptorPreview_get_Name), nullptr, nullptr, nullptr },
        { "element_type", reinterpret_cast<getter>(SequenceVariableDescriptorPreview_get_ElementType), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SequenceVariableDescriptorPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SequenceVariableDescriptorPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SequenceVariableDescriptorPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SequenceVariableDescriptorPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SequenceVariableDescriptorPreview) },
        { },
    };

    static PyType_Spec type_spec_SequenceVariableDescriptorPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.SequenceVariableDescriptorPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SequenceVariableDescriptorPreview
    };

    // ----- TensorVariableDescriptorPreview class --------------------
    static constexpr const char* const type_name_TensorVariableDescriptorPreview = "TensorVariableDescriptorPreview";

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

    static void _dealloc_TensorVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* 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* TensorVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TensorVariableDescriptorPreview_get_IsRequired(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview", L"IsRequired"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TensorVariableDescriptorPreview_get_ModelFeatureKind(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview", L"ModelFeatureKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* TensorVariableDescriptorPreview_get_DataType(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview", L"DataType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TensorVariableDescriptorPreview_get_Shape(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview", L"Shape"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_TensorVariableDescriptorPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_TensorVariableDescriptorPreview(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::AI::MachineLearning::Preview::TensorVariableDescriptorPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TensorVariableDescriptorPreview[] = {
        { "_assign_array_", _assign_array_TensorVariableDescriptorPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TensorVariableDescriptorPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TensorVariableDescriptorPreview[] = {
        { "description", reinterpret_cast<getter>(TensorVariableDescriptorPreview_get_Description), nullptr, nullptr, nullptr },
        { "is_required", reinterpret_cast<getter>(TensorVariableDescriptorPreview_get_IsRequired), nullptr, nullptr, nullptr },
        { "model_feature_kind", reinterpret_cast<getter>(TensorVariableDescriptorPreview_get_ModelFeatureKind), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(TensorVariableDescriptorPreview_get_Name), nullptr, nullptr, nullptr },
        { "data_type", reinterpret_cast<getter>(TensorVariableDescriptorPreview_get_DataType), nullptr, nullptr, nullptr },
        { "shape", reinterpret_cast<getter>(TensorVariableDescriptorPreview_get_Shape), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TensorVariableDescriptorPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TensorVariableDescriptorPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TensorVariableDescriptorPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TensorVariableDescriptorPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TensorVariableDescriptorPreview) },
        { },
    };

    static PyType_Spec type_spec_TensorVariableDescriptorPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.TensorVariableDescriptorPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TensorVariableDescriptorPreview
    };

    // ----- ILearningModelVariableDescriptorPreview interface --------------------
    static constexpr const char* const type_name_ILearningModelVariableDescriptorPreview = "ILearningModelVariableDescriptorPreview";

    static PyObject* _new_ILearningModelVariableDescriptorPreview(PyTypeObject* /* unused */, PyObject* /* unused */, PyObject* /* unused */) noexcept
    {
        py::set_invalid_activation_error(type_name_ILearningModelVariableDescriptorPreview);
        return nullptr;
    }

    static void _dealloc_ILearningModelVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview* 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* ILearningModelVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ILearningModelVariableDescriptorPreview", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ILearningModelVariableDescriptorPreview_get_IsRequired(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ILearningModelVariableDescriptorPreview", L"IsRequired"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ILearningModelVariableDescriptorPreview_get_ModelFeatureKind(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.AI.MachineLearning.Preview.ILearningModelVariableDescriptorPreview", L"ModelFeatureKind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* _assign_array_ILearningModelVariableDescriptorPreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ILearningModelVariableDescriptorPreview(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::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ILearningModelVariableDescriptorPreview[] = {
        { "_assign_array_", _assign_array_ILearningModelVariableDescriptorPreview, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ILearningModelVariableDescriptorPreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ILearningModelVariableDescriptorPreview[] = {
        { "description", reinterpret_cast<getter>(ILearningModelVariableDescriptorPreview_get_Description), nullptr, nullptr, nullptr },
        { "is_required", reinterpret_cast<getter>(ILearningModelVariableDescriptorPreview_get_IsRequired), nullptr, nullptr, nullptr },
        { "model_feature_kind", reinterpret_cast<getter>(ILearningModelVariableDescriptorPreview_get_ModelFeatureKind), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(ILearningModelVariableDescriptorPreview_get_Name), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ILearningModelVariableDescriptorPreview[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ILearningModelVariableDescriptorPreview) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ILearningModelVariableDescriptorPreview) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ILearningModelVariableDescriptorPreview) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ILearningModelVariableDescriptorPreview) },
        { },
    };

    static PyType_Spec type_spec_ILearningModelVariableDescriptorPreview =
    {
        "_winsdk_Windows_AI_MachineLearning_Preview.ILearningModelVariableDescriptorPreview",
        sizeof(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ILearningModelVariableDescriptorPreview
    };

    // ----- Windows.AI.MachineLearning.Preview Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::AI::MachineLearning::Preview");

    static PyMethodDef module_methods[] = {
        {"_register_FeatureElementKindPreview", register_FeatureElementKindPreview, METH_O, "registers type"},
        {"_register_LearningModelDeviceKindPreview", register_LearningModelDeviceKindPreview, METH_O, "registers type"},
        {"_register_LearningModelFeatureKindPreview", register_LearningModelFeatureKindPreview, 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_FeatureElementKindPreview);
        Py_VISIT(state->type_LearningModelDeviceKindPreview);
        Py_VISIT(state->type_LearningModelFeatureKindPreview);
        Py_VISIT(state->type_ImageVariableDescriptorPreview);
        Py_VISIT(state->type_InferencingOptionsPreview);
        Py_VISIT(state->type_LearningModelBindingPreview);
        Py_VISIT(state->type_LearningModelDescriptionPreview);
        Py_VISIT(state->type_LearningModelEvaluationResultPreview);
        Py_VISIT(state->type_LearningModelPreview);
        Py_VISIT(state->type_LearningModelVariableDescriptorPreview);
        Py_VISIT(state->type_MapVariableDescriptorPreview);
        Py_VISIT(state->type_SequenceVariableDescriptorPreview);
        Py_VISIT(state->type_TensorVariableDescriptorPreview);
        Py_VISIT(state->type_ILearningModelVariableDescriptorPreview);

        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_FeatureElementKindPreview);
        Py_CLEAR(state->type_LearningModelDeviceKindPreview);
        Py_CLEAR(state->type_LearningModelFeatureKindPreview);
        Py_CLEAR(state->type_ImageVariableDescriptorPreview);
        Py_CLEAR(state->type_InferencingOptionsPreview);
        Py_CLEAR(state->type_LearningModelBindingPreview);
        Py_CLEAR(state->type_LearningModelDescriptionPreview);
        Py_CLEAR(state->type_LearningModelEvaluationResultPreview);
        Py_CLEAR(state->type_LearningModelPreview);
        Py_CLEAR(state->type_LearningModelVariableDescriptorPreview);
        Py_CLEAR(state->type_MapVariableDescriptorPreview);
        Py_CLEAR(state->type_SequenceVariableDescriptorPreview);
        Py_CLEAR(state->type_TensorVariableDescriptorPreview);
        Py_CLEAR(state->type_ILearningModelVariableDescriptorPreview);

        return 0;
    }


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

} // py::cpp::Windows::AI::MachineLearning::Preview

PyMODINIT_FUNC PyInit__winsdk_Windows_AI_MachineLearning_Preview(void) noexcept
{
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    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_ImageVariableDescriptorPreview = py::register_python_type(module.get(), type_name_ImageVariableDescriptorPreview, &type_spec_ImageVariableDescriptorPreview, bases.get(), nullptr);
    if (!state->type_ImageVariableDescriptorPreview)
    {
        return nullptr;
    }

    state->type_InferencingOptionsPreview = py::register_python_type(module.get(), type_name_InferencingOptionsPreview, &type_spec_InferencingOptionsPreview, bases.get(), nullptr);
    if (!state->type_InferencingOptionsPreview)
    {
        return nullptr;
    }

    state->type_LearningModelBindingPreview = py::register_python_type(module.get(), type_name_LearningModelBindingPreview, &type_spec_LearningModelBindingPreview, mapping_bases.get(), nullptr);
    if (!state->type_LearningModelBindingPreview)
    {
        return nullptr;
    }

    state->type_LearningModelDescriptionPreview = py::register_python_type(module.get(), type_name_LearningModelDescriptionPreview, &type_spec_LearningModelDescriptionPreview, bases.get(), nullptr);
    if (!state->type_LearningModelDescriptionPreview)
    {
        return nullptr;
    }

    state->type_LearningModelEvaluationResultPreview = py::register_python_type(module.get(), type_name_LearningModelEvaluationResultPreview, &type_spec_LearningModelEvaluationResultPreview, bases.get(), nullptr);
    if (!state->type_LearningModelEvaluationResultPreview)
    {
        return nullptr;
    }

    state->type_LearningModelPreview = py::register_python_type(module.get(), type_name_LearningModelPreview, &type_spec_LearningModelPreview, bases.get(), nullptr);
    if (!state->type_LearningModelPreview)
    {
        return nullptr;
    }

    state->type_LearningModelVariableDescriptorPreview = py::register_python_type(module.get(), type_name_LearningModelVariableDescriptorPreview, &type_spec_LearningModelVariableDescriptorPreview, bases.get(), nullptr);
    if (!state->type_LearningModelVariableDescriptorPreview)
    {
        return nullptr;
    }

    state->type_MapVariableDescriptorPreview = py::register_python_type(module.get(), type_name_MapVariableDescriptorPreview, &type_spec_MapVariableDescriptorPreview, bases.get(), nullptr);
    if (!state->type_MapVariableDescriptorPreview)
    {
        return nullptr;
    }

    state->type_SequenceVariableDescriptorPreview = py::register_python_type(module.get(), type_name_SequenceVariableDescriptorPreview, &type_spec_SequenceVariableDescriptorPreview, bases.get(), nullptr);
    if (!state->type_SequenceVariableDescriptorPreview)
    {
        return nullptr;
    }

    state->type_TensorVariableDescriptorPreview = py::register_python_type(module.get(), type_name_TensorVariableDescriptorPreview, &type_spec_TensorVariableDescriptorPreview, bases.get(), nullptr);
    if (!state->type_TensorVariableDescriptorPreview)
    {
        return nullptr;
    }

    state->type_ILearningModelVariableDescriptorPreview = py::register_python_type(module.get(), type_name_ILearningModelVariableDescriptorPreview, &type_spec_ILearningModelVariableDescriptorPreview, bases.get(), nullptr);
    if (!state->type_ILearningModelVariableDescriptorPreview)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::AI::MachineLearning::Preview::FeatureElementKindPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_FeatureElementKindPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::FeatureElementKindPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelDeviceKindPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelDeviceKindPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelDeviceKindPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelFeatureKindPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelFeatureKindPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelFeatureKindPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ImageVariableDescriptorPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_InferencingOptionsPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelBindingPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelDescriptionPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelEvaluationResultPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_LearningModelVariableDescriptorPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MapVariableDescriptorPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SequenceVariableDescriptorPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TensorVariableDescriptorPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview>::get_python_type() noexcept {
    using namespace py::cpp::Windows::AI::MachineLearning::Preview;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ILearningModelVariableDescriptorPreview;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview is not registered");
        return nullptr;
    }

    return python_type;
}
