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

#include "pybase.h"
#include "py.Windows.Devices.Printers.Extensions.h"


namespace py::cpp::Windows::Devices::Printers::Extensions
{
    struct module_state
    {
        PyObject* type_Print3DWorkflowDetail;
        PyObject* type_Print3DWorkflowStatus;
        PyTypeObject* type_Print3DWorkflow;
        PyTypeObject* type_Print3DWorkflowPrintRequestedEventArgs;
        PyTypeObject* type_Print3DWorkflowPrinterChangedEventArgs;
        PyTypeObject* type_PrintExtensionContext;
        PyTypeObject* type_PrintNotificationEventDetails;
        PyTypeObject* type_PrintTaskConfiguration;
        PyTypeObject* type_PrintTaskConfigurationSaveRequest;
        PyTypeObject* type_PrintTaskConfigurationSaveRequestedDeferral;
        PyTypeObject* type_PrintTaskConfigurationSaveRequestedEventArgs;
    };

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

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

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

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


        Py_RETURN_NONE;
    }

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

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

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

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


        Py_RETURN_NONE;
    }

    // ----- Print3DWorkflow class --------------------
    static constexpr const char* const type_name_Print3DWorkflow = "Print3DWorkflow";

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

    static void _dealloc_Print3DWorkflow(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* Print3DWorkflow_GetPrintModelPackage(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"GetPrintModelPackage", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* Print3DWorkflow_get_IsPrintReady(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"IsPrintReady"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int Print3DWorkflow_put_IsPrintReady(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"IsPrintReady"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* Print3DWorkflow_get_DeviceID(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"DeviceID"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* Print3DWorkflow_add_PrintRequested(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"PrintRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflow, winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs>>(arg);

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

    static PyObject* Print3DWorkflow_remove_PrintRequested(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"PrintRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* Print3DWorkflow_add_PrinterChanged(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"PrinterChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflow, winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs>>(arg);

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

    static PyObject* Print3DWorkflow_remove_PrinterChanged(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflow", L"PrinterChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _assign_array_Print3DWorkflow(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflow>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_Print3DWorkflow(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::Devices::Printers::Extensions::Print3DWorkflow>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_Print3DWorkflow[] = {
        { "get_print_model_package", reinterpret_cast<PyCFunction>(Print3DWorkflow_GetPrintModelPackage), METH_VARARGS, nullptr },
        { "add_print_requested", reinterpret_cast<PyCFunction>(Print3DWorkflow_add_PrintRequested), METH_O, nullptr },
        { "remove_print_requested", reinterpret_cast<PyCFunction>(Print3DWorkflow_remove_PrintRequested), METH_O, nullptr },
        { "add_printer_changed", reinterpret_cast<PyCFunction>(Print3DWorkflow_add_PrinterChanged), METH_O, nullptr },
        { "remove_printer_changed", reinterpret_cast<PyCFunction>(Print3DWorkflow_remove_PrinterChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_Print3DWorkflow, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_Print3DWorkflow), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_Print3DWorkflow[] = {
        { "is_print_ready", reinterpret_cast<getter>(Print3DWorkflow_get_IsPrintReady), reinterpret_cast<setter>(Print3DWorkflow_put_IsPrintReady), nullptr, nullptr },
        { "device_i_d", reinterpret_cast<getter>(Print3DWorkflow_get_DeviceID), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_Print3DWorkflow[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_Print3DWorkflow) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Print3DWorkflow) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_Print3DWorkflow) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_Print3DWorkflow) },
        { },
    };

    static PyType_Spec type_spec_Print3DWorkflow =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.Print3DWorkflow",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflow),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_Print3DWorkflow
    };

    // ----- Print3DWorkflowPrintRequestedEventArgs class --------------------
    static constexpr const char* const type_name_Print3DWorkflowPrintRequestedEventArgs = "Print3DWorkflowPrintRequestedEventArgs";

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

    static void _dealloc_Print3DWorkflowPrintRequestedEventArgs(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* Print3DWorkflowPrintRequestedEventArgs_SetExtendedStatus(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflowPrintRequestedEventArgs", L"SetExtendedStatus", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowDetail>(args, 0);

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

    static PyObject* Print3DWorkflowPrintRequestedEventArgs_SetSource(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflowPrintRequestedEventArgs", L"SetSource", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* Print3DWorkflowPrintRequestedEventArgs_SetSourceChanged(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflowPrintRequestedEventArgs", L"SetSourceChanged", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* Print3DWorkflowPrintRequestedEventArgs_get_Status(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflowPrintRequestedEventArgs", L"Status"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_Print3DWorkflowPrintRequestedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_Print3DWorkflowPrintRequestedEventArgs(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::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_Print3DWorkflowPrintRequestedEventArgs[] = {
        { "set_extended_status", reinterpret_cast<PyCFunction>(Print3DWorkflowPrintRequestedEventArgs_SetExtendedStatus), METH_VARARGS, nullptr },
        { "set_source", reinterpret_cast<PyCFunction>(Print3DWorkflowPrintRequestedEventArgs_SetSource), METH_VARARGS, nullptr },
        { "set_source_changed", reinterpret_cast<PyCFunction>(Print3DWorkflowPrintRequestedEventArgs_SetSourceChanged), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_Print3DWorkflowPrintRequestedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_Print3DWorkflowPrintRequestedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_Print3DWorkflowPrintRequestedEventArgs[] = {
        { "status", reinterpret_cast<getter>(Print3DWorkflowPrintRequestedEventArgs_get_Status), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_Print3DWorkflowPrintRequestedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_Print3DWorkflowPrintRequestedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Print3DWorkflowPrintRequestedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_Print3DWorkflowPrintRequestedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_Print3DWorkflowPrintRequestedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_Print3DWorkflowPrintRequestedEventArgs =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.Print3DWorkflowPrintRequestedEventArgs",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_Print3DWorkflowPrintRequestedEventArgs
    };

    // ----- Print3DWorkflowPrinterChangedEventArgs class --------------------
    static constexpr const char* const type_name_Print3DWorkflowPrinterChangedEventArgs = "Print3DWorkflowPrinterChangedEventArgs";

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

    static void _dealloc_Print3DWorkflowPrinterChangedEventArgs(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* Print3DWorkflowPrinterChangedEventArgs_get_NewDeviceId(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.Print3DWorkflowPrinterChangedEventArgs", L"NewDeviceId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_Print3DWorkflowPrinterChangedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_Print3DWorkflowPrinterChangedEventArgs(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::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_Print3DWorkflowPrinterChangedEventArgs[] = {
        { "_assign_array_", _assign_array_Print3DWorkflowPrinterChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_Print3DWorkflowPrinterChangedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_Print3DWorkflowPrinterChangedEventArgs[] = {
        { "new_device_id", reinterpret_cast<getter>(Print3DWorkflowPrinterChangedEventArgs_get_NewDeviceId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_Print3DWorkflowPrinterChangedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_Print3DWorkflowPrinterChangedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Print3DWorkflowPrinterChangedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_Print3DWorkflowPrinterChangedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_Print3DWorkflowPrinterChangedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_Print3DWorkflowPrinterChangedEventArgs =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.Print3DWorkflowPrinterChangedEventArgs",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_Print3DWorkflowPrinterChangedEventArgs
    };

    // ----- PrintExtensionContext class --------------------
    static constexpr const char* const type_name_PrintExtensionContext = "PrintExtensionContext";

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

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.PrintExtensionContext", L"FromDeviceId", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Devices::Printers::Extensions::PrintExtensionContext::FromDeviceId(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintExtensionContext[] = {
        { "from_device_id", reinterpret_cast<PyCFunction>(PrintExtensionContext_FromDeviceId), METH_VARARGS | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintExtensionContext[] = {
        { }
    };

    static PyType_Slot _type_slots_PrintExtensionContext[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintExtensionContext) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintExtensionContext) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintExtensionContext) },
        { },
    };

    static PyType_Spec type_spec_PrintExtensionContext =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.PrintExtensionContext",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintExtensionContext
    };

    // ----- PrintNotificationEventDetails class --------------------
    static constexpr const char* const type_name_PrintNotificationEventDetails = "PrintNotificationEventDetails";

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

    static void _dealloc_PrintNotificationEventDetails(py::wrapper::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* PrintNotificationEventDetails_get_EventData(py::wrapper::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.PrintNotificationEventDetails", L"EventData"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int PrintNotificationEventDetails_put_EventData(py::wrapper::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.PrintNotificationEventDetails", L"EventData"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* PrintNotificationEventDetails_get_PrinterName(py::wrapper::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.PrintNotificationEventDetails", L"PrinterName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintNotificationEventDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintNotificationEventDetails(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::Devices::Printers::Extensions::PrintNotificationEventDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintNotificationEventDetails[] = {
        { "_assign_array_", _assign_array_PrintNotificationEventDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintNotificationEventDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintNotificationEventDetails[] = {
        { "event_data", reinterpret_cast<getter>(PrintNotificationEventDetails_get_EventData), reinterpret_cast<setter>(PrintNotificationEventDetails_put_EventData), nullptr, nullptr },
        { "printer_name", reinterpret_cast<getter>(PrintNotificationEventDetails_get_PrinterName), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintNotificationEventDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintNotificationEventDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintNotificationEventDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintNotificationEventDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintNotificationEventDetails) },
        { },
    };

    static PyType_Spec type_spec_PrintNotificationEventDetails =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.PrintNotificationEventDetails",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintNotificationEventDetails
    };

    // ----- PrintTaskConfiguration class --------------------
    static constexpr const char* const type_name_PrintTaskConfiguration = "PrintTaskConfiguration";

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

    static void _dealloc_PrintTaskConfiguration(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfiguration* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* PrintTaskConfiguration_get_PrinterExtensionContext(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfiguration* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfiguration", L"PrinterExtensionContext"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTaskConfiguration_add_SaveRequested(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfiguration* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfiguration", L"SaveRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfiguration, winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs>>(arg);

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

    static PyObject* PrintTaskConfiguration_remove_SaveRequested(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfiguration* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfiguration", L"SaveRequested"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _assign_array_PrintTaskConfiguration(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfiguration>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTaskConfiguration(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::Devices::Printers::Extensions::PrintTaskConfiguration>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTaskConfiguration[] = {
        { "add_save_requested", reinterpret_cast<PyCFunction>(PrintTaskConfiguration_add_SaveRequested), METH_O, nullptr },
        { "remove_save_requested", reinterpret_cast<PyCFunction>(PrintTaskConfiguration_remove_SaveRequested), METH_O, nullptr },
        { "_assign_array_", _assign_array_PrintTaskConfiguration, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTaskConfiguration), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTaskConfiguration[] = {
        { "printer_extension_context", reinterpret_cast<getter>(PrintTaskConfiguration_get_PrinterExtensionContext), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTaskConfiguration[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTaskConfiguration) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTaskConfiguration) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTaskConfiguration) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTaskConfiguration) },
        { },
    };

    static PyType_Spec type_spec_PrintTaskConfiguration =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.PrintTaskConfiguration",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfiguration),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTaskConfiguration
    };

    // ----- PrintTaskConfigurationSaveRequest class --------------------
    static constexpr const char* const type_name_PrintTaskConfigurationSaveRequest = "PrintTaskConfigurationSaveRequest";

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

    static void _dealloc_PrintTaskConfigurationSaveRequest(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* PrintTaskConfigurationSaveRequest_Cancel(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequest", L"Cancel", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PrintTaskConfigurationSaveRequest_GetDeferral(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequest", L"GetDeferral", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PrintTaskConfigurationSaveRequest_Save(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequest", L"Save", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* PrintTaskConfigurationSaveRequest_get_Deadline(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequest", L"Deadline"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTaskConfigurationSaveRequest(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTaskConfigurationSaveRequest(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::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTaskConfigurationSaveRequest[] = {
        { "cancel", reinterpret_cast<PyCFunction>(PrintTaskConfigurationSaveRequest_Cancel), METH_VARARGS, nullptr },
        { "get_deferral", reinterpret_cast<PyCFunction>(PrintTaskConfigurationSaveRequest_GetDeferral), METH_VARARGS, nullptr },
        { "save", reinterpret_cast<PyCFunction>(PrintTaskConfigurationSaveRequest_Save), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintTaskConfigurationSaveRequest, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTaskConfigurationSaveRequest), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTaskConfigurationSaveRequest[] = {
        { "deadline", reinterpret_cast<getter>(PrintTaskConfigurationSaveRequest_get_Deadline), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTaskConfigurationSaveRequest[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTaskConfigurationSaveRequest) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTaskConfigurationSaveRequest) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTaskConfigurationSaveRequest) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTaskConfigurationSaveRequest) },
        { },
    };

    static PyType_Spec type_spec_PrintTaskConfigurationSaveRequest =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.PrintTaskConfigurationSaveRequest",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTaskConfigurationSaveRequest
    };

    // ----- PrintTaskConfigurationSaveRequestedDeferral class --------------------
    static constexpr const char* const type_name_PrintTaskConfigurationSaveRequestedDeferral = "PrintTaskConfigurationSaveRequestedDeferral";

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

    static void _dealloc_PrintTaskConfigurationSaveRequestedDeferral(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* PrintTaskConfigurationSaveRequestedDeferral_Complete(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequestedDeferral", L"Complete", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* _assign_array_PrintTaskConfigurationSaveRequestedDeferral(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTaskConfigurationSaveRequestedDeferral(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::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTaskConfigurationSaveRequestedDeferral[] = {
        { "complete", reinterpret_cast<PyCFunction>(PrintTaskConfigurationSaveRequestedDeferral_Complete), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintTaskConfigurationSaveRequestedDeferral, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTaskConfigurationSaveRequestedDeferral), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTaskConfigurationSaveRequestedDeferral[] = {
        { }
    };

    static PyType_Slot _type_slots_PrintTaskConfigurationSaveRequestedDeferral[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTaskConfigurationSaveRequestedDeferral) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTaskConfigurationSaveRequestedDeferral) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTaskConfigurationSaveRequestedDeferral) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTaskConfigurationSaveRequestedDeferral) },
        { },
    };

    static PyType_Spec type_spec_PrintTaskConfigurationSaveRequestedDeferral =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.PrintTaskConfigurationSaveRequestedDeferral",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTaskConfigurationSaveRequestedDeferral
    };

    // ----- PrintTaskConfigurationSaveRequestedEventArgs class --------------------
    static constexpr const char* const type_name_PrintTaskConfigurationSaveRequestedEventArgs = "PrintTaskConfigurationSaveRequestedEventArgs";

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

    static void _dealloc_PrintTaskConfigurationSaveRequestedEventArgs(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* PrintTaskConfigurationSaveRequestedEventArgs_get_Request(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequestedEventArgs", L"Request"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTaskConfigurationSaveRequestedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTaskConfigurationSaveRequestedEventArgs(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::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTaskConfigurationSaveRequestedEventArgs[] = {
        { "_assign_array_", _assign_array_PrintTaskConfigurationSaveRequestedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTaskConfigurationSaveRequestedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTaskConfigurationSaveRequestedEventArgs[] = {
        { "request", reinterpret_cast<getter>(PrintTaskConfigurationSaveRequestedEventArgs_get_Request), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTaskConfigurationSaveRequestedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTaskConfigurationSaveRequestedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTaskConfigurationSaveRequestedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTaskConfigurationSaveRequestedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTaskConfigurationSaveRequestedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_PrintTaskConfigurationSaveRequestedEventArgs =
    {
        "_winsdk_Windows_Devices_Printers_Extensions.PrintTaskConfigurationSaveRequestedEventArgs",
        sizeof(py::wrapper::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTaskConfigurationSaveRequestedEventArgs
    };

    // ----- Windows.Devices.Printers.Extensions Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Devices::Printers::Extensions");

    static PyMethodDef module_methods[] = {
        {"_register_Print3DWorkflowDetail", register_Print3DWorkflowDetail, METH_O, "registers type"},
        {"_register_Print3DWorkflowStatus", register_Print3DWorkflowStatus, METH_O, "registers type"},
        {}};


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

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_Print3DWorkflowDetail);
        Py_VISIT(state->type_Print3DWorkflowStatus);
        Py_VISIT(state->type_Print3DWorkflow);
        Py_VISIT(state->type_Print3DWorkflowPrintRequestedEventArgs);
        Py_VISIT(state->type_Print3DWorkflowPrinterChangedEventArgs);
        Py_VISIT(state->type_PrintExtensionContext);
        Py_VISIT(state->type_PrintNotificationEventDetails);
        Py_VISIT(state->type_PrintTaskConfiguration);
        Py_VISIT(state->type_PrintTaskConfigurationSaveRequest);
        Py_VISIT(state->type_PrintTaskConfigurationSaveRequestedDeferral);
        Py_VISIT(state->type_PrintTaskConfigurationSaveRequestedEventArgs);

        return 0;
    }

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

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_Print3DWorkflowDetail);
        Py_CLEAR(state->type_Print3DWorkflowStatus);
        Py_CLEAR(state->type_Print3DWorkflow);
        Py_CLEAR(state->type_Print3DWorkflowPrintRequestedEventArgs);
        Py_CLEAR(state->type_Print3DWorkflowPrinterChangedEventArgs);
        Py_CLEAR(state->type_PrintExtensionContext);
        Py_CLEAR(state->type_PrintNotificationEventDetails);
        Py_CLEAR(state->type_PrintTaskConfiguration);
        Py_CLEAR(state->type_PrintTaskConfigurationSaveRequest);
        Py_CLEAR(state->type_PrintTaskConfigurationSaveRequestedDeferral);
        Py_CLEAR(state->type_PrintTaskConfigurationSaveRequestedEventArgs);

        return 0;
    }


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

} // py::cpp::Windows::Devices::Printers::Extensions

PyMODINIT_FUNC PyInit__winsdk_Windows_Devices_Printers_Extensions(void) noexcept
{
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!bases)
    {
        return nullptr;
    }

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

    if (!collections_abc_module)
    {
        return nullptr;
    }

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

    if (!sequence_type)
    {
        return nullptr;
    }

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

    if (!sequence_bases)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

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

    if (!mapping_type)
    {
        return nullptr;
    }

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

    if (!mapping_bases)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

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

    state->type_Print3DWorkflow = py::register_python_type(module.get(), type_name_Print3DWorkflow, &type_spec_Print3DWorkflow, bases.get(), nullptr);
    if (!state->type_Print3DWorkflow)
    {
        return nullptr;
    }

    state->type_Print3DWorkflowPrintRequestedEventArgs = py::register_python_type(module.get(), type_name_Print3DWorkflowPrintRequestedEventArgs, &type_spec_Print3DWorkflowPrintRequestedEventArgs, bases.get(), nullptr);
    if (!state->type_Print3DWorkflowPrintRequestedEventArgs)
    {
        return nullptr;
    }

    state->type_Print3DWorkflowPrinterChangedEventArgs = py::register_python_type(module.get(), type_name_Print3DWorkflowPrinterChangedEventArgs, &type_spec_Print3DWorkflowPrinterChangedEventArgs, bases.get(), nullptr);
    if (!state->type_Print3DWorkflowPrinterChangedEventArgs)
    {
        return nullptr;
    }

    state->type_PrintExtensionContext = py::register_python_type(module.get(), type_name_PrintExtensionContext, &type_spec_PrintExtensionContext, nullptr, nullptr);
    if (!state->type_PrintExtensionContext)
    {
        return nullptr;
    }

    state->type_PrintNotificationEventDetails = py::register_python_type(module.get(), type_name_PrintNotificationEventDetails, &type_spec_PrintNotificationEventDetails, bases.get(), nullptr);
    if (!state->type_PrintNotificationEventDetails)
    {
        return nullptr;
    }

    state->type_PrintTaskConfiguration = py::register_python_type(module.get(), type_name_PrintTaskConfiguration, &type_spec_PrintTaskConfiguration, bases.get(), nullptr);
    if (!state->type_PrintTaskConfiguration)
    {
        return nullptr;
    }

    state->type_PrintTaskConfigurationSaveRequest = py::register_python_type(module.get(), type_name_PrintTaskConfigurationSaveRequest, &type_spec_PrintTaskConfigurationSaveRequest, bases.get(), nullptr);
    if (!state->type_PrintTaskConfigurationSaveRequest)
    {
        return nullptr;
    }

    state->type_PrintTaskConfigurationSaveRequestedDeferral = py::register_python_type(module.get(), type_name_PrintTaskConfigurationSaveRequestedDeferral, &type_spec_PrintTaskConfigurationSaveRequestedDeferral, bases.get(), nullptr);
    if (!state->type_PrintTaskConfigurationSaveRequestedDeferral)
    {
        return nullptr;
    }

    state->type_PrintTaskConfigurationSaveRequestedEventArgs = py::register_python_type(module.get(), type_name_PrintTaskConfigurationSaveRequestedEventArgs, &type_spec_PrintTaskConfigurationSaveRequestedEventArgs, bases.get(), nullptr);
    if (!state->type_PrintTaskConfigurationSaveRequestedEventArgs)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowDetail>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_Print3DWorkflowDetail;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowDetail is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowStatus>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_Print3DWorkflowStatus;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowStatus is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflow>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_Print3DWorkflow;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::Print3DWorkflow is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_Print3DWorkflowPrintRequestedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_Print3DWorkflowPrinterChangedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::PrintExtensionContext>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintExtensionContext;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::PrintExtensionContext is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintNotificationEventDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfiguration>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTaskConfiguration;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::PrintTaskConfiguration is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTaskConfigurationSaveRequest;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTaskConfigurationSaveRequestedDeferral;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Printers::Extensions;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTaskConfigurationSaveRequestedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}
