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

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

PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview>::python_type;

namespace py::cpp::Windows::AI::MachineLearning::Preview
{
    // ----- ImageVariableDescriptorPreview class --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* ImageVariableDescriptorPreview_get_BitmapPixelFormat(py::wrapper::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.Name());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_ImageVariableDescriptorPreview },
        { Py_tp_dealloc, _dealloc_ImageVariableDescriptorPreview },
        { Py_tp_methods, _methods_ImageVariableDescriptorPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* InferencingOptionsPreview_get_ReclaimMemoryAfterEvaluation(py::wrapper::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview* self, void* /*unused*/) noexcept
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            return -1;
        }

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

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

    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[] = {
        { "_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, _new_InferencingOptionsPreview },
        { Py_tp_dealloc, _dealloc_InferencingOptionsPreview },
        { Py_tp_methods, _methods_InferencingOptionsPreview },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 2)
        {
            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)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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
        {
            return py::convert(self->obj.First());
        }
        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
        {
            return py::convert(self->obj.Lookup(py::convert_to<winrt::hstring>(key)));
        }
        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 },
        { "_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, _new_LearningModelBindingPreview },
        { Py_tp_dealloc, _dealloc_LearningModelBindingPreview },
        { Py_tp_methods, _methods_LearningModelBindingPreview },
        { Py_tp_getset, _getset_LearningModelBindingPreview },
        { Py_tp_iter, _iterator_LearningModelBindingPreview },
        { Py_sq_contains, _map_contains_LearningModelBindingPreview },
        { Py_mp_length, _map_length_LearningModelBindingPreview },
        { Py_mp_subscript, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* LearningModelDescriptionPreview_get_Author(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.Version());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_LearningModelDescriptionPreview },
        { Py_tp_dealloc, _dealloc_LearningModelDescriptionPreview },
        { Py_tp_methods, _methods_LearningModelDescriptionPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* LearningModelEvaluationResultPreview_get_CorrelationId(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        try
        {
            return py::convert(self->obj.Outputs());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_LearningModelEvaluationResultPreview },
        { Py_tp_dealloc, _dealloc_LearningModelEvaluationResultPreview },
        { Py_tp_methods, _methods_LearningModelEvaluationResultPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        try
        {
            return py::convert(self->obj.Description());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 },
        { "_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, _new_LearningModelPreview },
        { Py_tp_dealloc, _dealloc_LearningModelPreview },
        { Py_tp_methods, _methods_LearningModelPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* LearningModelVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.Name());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_LearningModelVariableDescriptorPreview },
        { Py_tp_dealloc, _dealloc_LearningModelVariableDescriptorPreview },
        { Py_tp_methods, _methods_LearningModelVariableDescriptorPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* MapVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.ValidStringKeys());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_MapVariableDescriptorPreview },
        { Py_tp_dealloc, _dealloc_MapVariableDescriptorPreview },
        { Py_tp_methods, _methods_MapVariableDescriptorPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* SequenceVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.ElementType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_SequenceVariableDescriptorPreview },
        { Py_tp_dealloc, _dealloc_SequenceVariableDescriptorPreview },
        { Py_tp_methods, _methods_SequenceVariableDescriptorPreview },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* TensorVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.Shape());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_TensorVariableDescriptorPreview },
        { Py_tp_dealloc, _dealloc_TensorVariableDescriptorPreview },
        { Py_tp_methods, _methods_TensorVariableDescriptorPreview },
        { Py_tp_getset, _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 --------------------
    constexpr const char* const _type_name_ILearningModelVariableDescriptorPreview = "ILearningModelVariableDescriptorPreview";

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

    static void _dealloc_ILearningModelVariableDescriptorPreview(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* ILearningModelVariableDescriptorPreview_get_Description(py::wrapper::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview* self, void* /*unused*/) noexcept
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.Name());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_ILearningModelVariableDescriptorPreview },
        { Py_tp_dealloc, _dealloc_ILearningModelVariableDescriptorPreview },
        { Py_tp_methods, _methods_ILearningModelVariableDescriptorPreview },
        { Py_tp_getset, _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 --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::Object>::python_type) };

            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview>::python_type = py::register_python_type(module, _type_name_ImageVariableDescriptorPreview, &_type_spec_ImageVariableDescriptorPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview>::python_type = py::register_python_type(module, _type_name_InferencingOptionsPreview, &_type_spec_InferencingOptionsPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview>::python_type = py::register_python_type(module, _type_name_LearningModelBindingPreview, &_type_spec_LearningModelBindingPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview>::python_type = py::register_python_type(module, _type_name_LearningModelDescriptionPreview, &_type_spec_LearningModelDescriptionPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelEvaluationResultPreview>::python_type = py::register_python_type(module, _type_name_LearningModelEvaluationResultPreview, &_type_spec_LearningModelEvaluationResultPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview>::python_type = py::register_python_type(module, _type_name_LearningModelPreview, &_type_spec_LearningModelPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::LearningModelVariableDescriptorPreview>::python_type = py::register_python_type(module, _type_name_LearningModelVariableDescriptorPreview, &_type_spec_LearningModelVariableDescriptorPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::MapVariableDescriptorPreview>::python_type = py::register_python_type(module, _type_name_MapVariableDescriptorPreview, &_type_spec_MapVariableDescriptorPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::SequenceVariableDescriptorPreview>::python_type = py::register_python_type(module, _type_name_SequenceVariableDescriptorPreview, &_type_spec_SequenceVariableDescriptorPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::TensorVariableDescriptorPreview>::python_type = py::register_python_type(module, _type_name_TensorVariableDescriptorPreview, &_type_spec_TensorVariableDescriptorPreview, bases.get());
            py::winrt_type<winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview>::python_type = py::register_python_type(module, _type_name_ILearningModelVariableDescriptorPreview, &_type_spec_ILearningModelVariableDescriptorPreview, bases.get());

            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyModuleDef_Slot module_slots[] = {{Py_mod_exec, module_exec}, {}};

    PyDoc_STRVAR(module_doc, "Windows.AI.MachineLearning.Preview");

    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_AI_MachineLearning_Preview",
           module_doc,
           0,
           nullptr,
           module_slots,
           nullptr,
           nullptr,
           nullptr};
} // py::cpp::Windows::AI::MachineLearning::Preview

PyMODINIT_FUNC
PyInit__winsdk_Windows_AI_MachineLearning_Preview (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::AI::MachineLearning::Preview::module_def);
}
