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

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

PyTypeObject* py::winrt_type<winrt::Windows::Services::Cortana::CortanaActionableInsights>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Services::Cortana::CortanaPermissionsManager>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Services::Cortana::CortanaSettings>::python_type;

namespace py::cpp::Windows::Services::Cortana
{
    // ----- CortanaActionableInsights class --------------------
    constexpr const char* const _type_name_CortanaActionableInsights = "CortanaActionableInsights";

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

    static void _dealloc_CortanaActionableInsights(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* CortanaActionableInsights_GetDefault(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(winrt::Windows::Services::Cortana::CortanaActionableInsights::GetDefault());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* CortanaActionableInsights_GetForUser(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::System::User>(args, 0);

                return py::convert(winrt::Windows::Services::Cortana::CortanaActionableInsights::GetForUser(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* CortanaActionableInsights_IsAvailableAsync(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

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

    static PyObject* CortanaActionableInsights_ShowInsightsAsync(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DataPackage>(args, 0);

                return py::convert(self->obj.ShowInsightsAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::ApplicationModel::DataTransfer::DataPackage>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions>(args, 1);

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

    static PyObject* CortanaActionableInsights_ShowInsightsForImageAsync(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights* self, 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(self->obj.ShowInsightsForImageAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IRandomAccessStreamReference>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions>(args, 1);

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

    static PyObject* CortanaActionableInsights_ShowInsightsForTextAsync(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights* 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.ShowInsightsForTextAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions>(args, 1);

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

    static PyObject* CortanaActionableInsights_get_User(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.User());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_CortanaActionableInsights(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Cortana::CortanaActionableInsights>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CortanaActionableInsights[] = {
        { "get_default", reinterpret_cast<PyCFunction>(CortanaActionableInsights_GetDefault), METH_VARARGS | METH_STATIC, nullptr },
        { "get_for_user", reinterpret_cast<PyCFunction>(CortanaActionableInsights_GetForUser), METH_VARARGS | METH_STATIC, nullptr },
        { "is_available_async", reinterpret_cast<PyCFunction>(CortanaActionableInsights_IsAvailableAsync), METH_VARARGS, nullptr },
        { "show_insights_async", reinterpret_cast<PyCFunction>(CortanaActionableInsights_ShowInsightsAsync), METH_VARARGS, nullptr },
        { "show_insights_for_image_async", reinterpret_cast<PyCFunction>(CortanaActionableInsights_ShowInsightsForImageAsync), METH_VARARGS, nullptr },
        { "show_insights_for_text_async", reinterpret_cast<PyCFunction>(CortanaActionableInsights_ShowInsightsForTextAsync), METH_VARARGS, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CortanaActionableInsights), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CortanaActionableInsights[] = {
        { "user", reinterpret_cast<getter>(CortanaActionableInsights_get_User), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CortanaActionableInsights[] = 
    {
        { Py_tp_new, _new_CortanaActionableInsights },
        { Py_tp_dealloc, _dealloc_CortanaActionableInsights },
        { Py_tp_methods, _methods_CortanaActionableInsights },
        { Py_tp_getset, _getset_CortanaActionableInsights },
        { },
    };

    static PyType_Spec _type_spec_CortanaActionableInsights =
    {
        "_winsdk_Windows_Services_Cortana.CortanaActionableInsights",
        sizeof(py::wrapper::Windows::Services::Cortana::CortanaActionableInsights),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CortanaActionableInsights
    };

    // ----- CortanaActionableInsightsOptions class --------------------
    constexpr const char* const _type_name_CortanaActionableInsightsOptions = "CortanaActionableInsightsOptions";

    static PyObject* _new_CortanaActionableInsightsOptions(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 == 0)
        {
            try
            {
                winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions instance{  };
                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_CortanaActionableInsightsOptions(py::wrapper::Windows::Services::Cortana::CortanaActionableInsightsOptions* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* CortanaActionableInsightsOptions_get_SurroundingText(py::wrapper::Windows::Services::Cortana::CortanaActionableInsightsOptions* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.SurroundingText());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int CortanaActionableInsightsOptions_put_SurroundingText(py::wrapper::Windows::Services::Cortana::CortanaActionableInsightsOptions* 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::hstring>(arg);

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

    static PyObject* CortanaActionableInsightsOptions_get_ContentSourceWebLink(py::wrapper::Windows::Services::Cortana::CortanaActionableInsightsOptions* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.ContentSourceWebLink());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int CortanaActionableInsightsOptions_put_ContentSourceWebLink(py::wrapper::Windows::Services::Cortana::CortanaActionableInsightsOptions* 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::Foundation::Uri>(arg);

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

    static PyObject* _from_CortanaActionableInsightsOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CortanaActionableInsightsOptions[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_CortanaActionableInsightsOptions), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CortanaActionableInsightsOptions[] = {
        { "surrounding_text", reinterpret_cast<getter>(CortanaActionableInsightsOptions_get_SurroundingText), reinterpret_cast<setter>(CortanaActionableInsightsOptions_put_SurroundingText), nullptr, nullptr },
        { "content_source_web_link", reinterpret_cast<getter>(CortanaActionableInsightsOptions_get_ContentSourceWebLink), reinterpret_cast<setter>(CortanaActionableInsightsOptions_put_ContentSourceWebLink), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CortanaActionableInsightsOptions[] = 
    {
        { Py_tp_new, _new_CortanaActionableInsightsOptions },
        { Py_tp_dealloc, _dealloc_CortanaActionableInsightsOptions },
        { Py_tp_methods, _methods_CortanaActionableInsightsOptions },
        { Py_tp_getset, _getset_CortanaActionableInsightsOptions },
        { },
    };

    static PyType_Spec _type_spec_CortanaActionableInsightsOptions =
    {
        "_winsdk_Windows_Services_Cortana.CortanaActionableInsightsOptions",
        sizeof(py::wrapper::Windows::Services::Cortana::CortanaActionableInsightsOptions),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CortanaActionableInsightsOptions
    };

    // ----- CortanaPermissionsManager class --------------------
    constexpr const char* const _type_name_CortanaPermissionsManager = "CortanaPermissionsManager";

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

    static void _dealloc_CortanaPermissionsManager(py::wrapper::Windows::Services::Cortana::CortanaPermissionsManager* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* CortanaPermissionsManager_ArePermissionsGrantedAsync(py::wrapper::Windows::Services::Cortana::CortanaPermissionsManager* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Services::Cortana::CortanaPermission>>(args, 0);

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

    static PyObject* CortanaPermissionsManager_GetDefault(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(winrt::Windows::Services::Cortana::CortanaPermissionsManager::GetDefault());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* CortanaPermissionsManager_GrantPermissionsAsync(py::wrapper::Windows::Services::Cortana::CortanaPermissionsManager* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Services::Cortana::CortanaPermission>>(args, 0);

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

    static PyObject* CortanaPermissionsManager_IsSupported(py::wrapper::Windows::Services::Cortana::CortanaPermissionsManager* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

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

    static PyObject* CortanaPermissionsManager_RevokePermissionsAsync(py::wrapper::Windows::Services::Cortana::CortanaPermissionsManager* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Services::Cortana::CortanaPermission>>(args, 0);

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

    static PyObject* _from_CortanaPermissionsManager(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Cortana::CortanaPermissionsManager>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CortanaPermissionsManager[] = {
        { "are_permissions_granted_async", reinterpret_cast<PyCFunction>(CortanaPermissionsManager_ArePermissionsGrantedAsync), METH_VARARGS, nullptr },
        { "get_default", reinterpret_cast<PyCFunction>(CortanaPermissionsManager_GetDefault), METH_VARARGS | METH_STATIC, nullptr },
        { "grant_permissions_async", reinterpret_cast<PyCFunction>(CortanaPermissionsManager_GrantPermissionsAsync), METH_VARARGS, nullptr },
        { "is_supported", reinterpret_cast<PyCFunction>(CortanaPermissionsManager_IsSupported), METH_VARARGS, nullptr },
        { "revoke_permissions_async", reinterpret_cast<PyCFunction>(CortanaPermissionsManager_RevokePermissionsAsync), METH_VARARGS, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CortanaPermissionsManager), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CortanaPermissionsManager[] = {
        { }
    };

    static PyType_Slot _type_slots_CortanaPermissionsManager[] = 
    {
        { Py_tp_new, _new_CortanaPermissionsManager },
        { Py_tp_dealloc, _dealloc_CortanaPermissionsManager },
        { Py_tp_methods, _methods_CortanaPermissionsManager },
        { Py_tp_getset, _getset_CortanaPermissionsManager },
        { },
    };

    static PyType_Spec _type_spec_CortanaPermissionsManager =
    {
        "_winsdk_Windows_Services_Cortana.CortanaPermissionsManager",
        sizeof(py::wrapper::Windows::Services::Cortana::CortanaPermissionsManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CortanaPermissionsManager
    };

    // ----- CortanaSettings class --------------------
    constexpr const char* const _type_name_CortanaSettings = "CortanaSettings";

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

    static void _dealloc_CortanaSettings(py::wrapper::Windows::Services::Cortana::CortanaSettings* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* CortanaSettings_GetDefault(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(winrt::Windows::Services::Cortana::CortanaSettings::GetDefault());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* CortanaSettings_IsSupported(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(winrt::Windows::Services::Cortana::CortanaSettings::IsSupported());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* CortanaSettings_get_IsVoiceActivationEnabled(py::wrapper::Windows::Services::Cortana::CortanaSettings* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.IsVoiceActivationEnabled());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int CortanaSettings_put_IsVoiceActivationEnabled(py::wrapper::Windows::Services::Cortana::CortanaSettings* 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.IsVoiceActivationEnabled(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* CortanaSettings_get_HasUserConsentToVoiceActivation(py::wrapper::Windows::Services::Cortana::CortanaSettings* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.HasUserConsentToVoiceActivation());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_CortanaSettings(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Cortana::CortanaSettings>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CortanaSettings[] = {
        { "get_default", reinterpret_cast<PyCFunction>(CortanaSettings_GetDefault), METH_VARARGS | METH_STATIC, nullptr },
        { "is_supported", reinterpret_cast<PyCFunction>(CortanaSettings_IsSupported), METH_VARARGS | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CortanaSettings), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CortanaSettings[] = {
        { "is_voice_activation_enabled", reinterpret_cast<getter>(CortanaSettings_get_IsVoiceActivationEnabled), reinterpret_cast<setter>(CortanaSettings_put_IsVoiceActivationEnabled), nullptr, nullptr },
        { "has_user_consent_to_voice_activation", reinterpret_cast<getter>(CortanaSettings_get_HasUserConsentToVoiceActivation), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CortanaSettings[] = 
    {
        { Py_tp_new, _new_CortanaSettings },
        { Py_tp_dealloc, _dealloc_CortanaSettings },
        { Py_tp_methods, _methods_CortanaSettings },
        { Py_tp_getset, _getset_CortanaSettings },
        { },
    };

    static PyType_Spec _type_spec_CortanaSettings =
    {
        "_winsdk_Windows_Services_Cortana.CortanaSettings",
        sizeof(py::wrapper::Windows::Services::Cortana::CortanaSettings),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CortanaSettings
    };

    // ----- Windows.Services.Cortana 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::Services::Cortana::CortanaActionableInsights>::python_type = py::register_python_type(module, _type_name_CortanaActionableInsights, &_type_spec_CortanaActionableInsights, bases.get());
            py::winrt_type<winrt::Windows::Services::Cortana::CortanaActionableInsightsOptions>::python_type = py::register_python_type(module, _type_name_CortanaActionableInsightsOptions, &_type_spec_CortanaActionableInsightsOptions, bases.get());
            py::winrt_type<winrt::Windows::Services::Cortana::CortanaPermissionsManager>::python_type = py::register_python_type(module, _type_name_CortanaPermissionsManager, &_type_spec_CortanaPermissionsManager, bases.get());
            py::winrt_type<winrt::Windows::Services::Cortana::CortanaSettings>::python_type = py::register_python_type(module, _type_name_CortanaSettings, &_type_spec_CortanaSettings, 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.Services.Cortana");

    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_Services_Cortana",
           module_doc,
           0,
           nullptr,
           module_slots,
           nullptr,
           nullptr,
           nullptr};
} // py::cpp::Windows::Services::Cortana

PyMODINIT_FUNC
PyInit__winsdk_Windows_Services_Cortana (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::Services::Cortana::module_def);
}
