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

#include "pybase.h"
#include "py.Windows.Graphics.Printing.PrintTicket.h"


namespace py::cpp::Windows::Graphics::Printing::PrintTicket
{
    struct module_state
    {
        PyObject* type_PrintTicketFeatureSelectionType;
        PyObject* type_PrintTicketParameterDataType;
        PyObject* type_PrintTicketValueType;
        PyTypeObject* type_PrintTicketCapabilities;
        PyTypeObject* type_PrintTicketFeature;
        PyTypeObject* type_PrintTicketOption;
        PyTypeObject* type_PrintTicketParameterDefinition;
        PyTypeObject* type_PrintTicketParameterInitializer;
        PyTypeObject* type_PrintTicketValue;
        PyTypeObject* type_WorkflowPrintTicket;
        PyTypeObject* type_WorkflowPrintTicketValidationResult;
    };

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

    // ----- PrintTicketCapabilities class --------------------
    static constexpr const char* const type_name_PrintTicketCapabilities = "PrintTicketCapabilities";

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

    static void _dealloc_PrintTicketCapabilities(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* 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* PrintTicketCapabilities_GetFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"GetFeature", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketCapabilities_GetParameterDefinition(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"GetParameterDefinition", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketCapabilities_get_DocumentBindingFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentBindingFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_DocumentCollateFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentCollateFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_DocumentDuplexFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentDuplexFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_DocumentHolePunchFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentHolePunchFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_DocumentInputBinFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentInputBinFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_DocumentNUpFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentNUpFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_DocumentStapleFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"DocumentStapleFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_JobPasscodeFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"JobPasscodeFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* PrintTicketCapabilities_get_PageBorderlessFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageBorderlessFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_PageMediaSizeFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageMediaSizeFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_PageMediaTypeFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageMediaTypeFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_PageOrientationFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageOrientationFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_PageOutputColorFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageOutputColorFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_PageOutputQualityFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageOutputQualityFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_PageResolutionFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"PageResolutionFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_XmlNamespace(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"XmlNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketCapabilities_get_XmlNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketCapabilities", L"XmlNode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTicketCapabilities(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTicketCapabilities(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::Graphics::Printing::PrintTicket::PrintTicketCapabilities>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTicketCapabilities[] = {
        { "get_feature", reinterpret_cast<PyCFunction>(PrintTicketCapabilities_GetFeature), METH_VARARGS, nullptr },
        { "get_parameter_definition", reinterpret_cast<PyCFunction>(PrintTicketCapabilities_GetParameterDefinition), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintTicketCapabilities, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTicketCapabilities), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTicketCapabilities[] = {
        { "document_binding_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentBindingFeature), nullptr, nullptr, nullptr },
        { "document_collate_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentCollateFeature), nullptr, nullptr, nullptr },
        { "document_duplex_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentDuplexFeature), nullptr, nullptr, nullptr },
        { "document_hole_punch_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentHolePunchFeature), nullptr, nullptr, nullptr },
        { "document_input_bin_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentInputBinFeature), nullptr, nullptr, nullptr },
        { "document_n_up_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentNUpFeature), nullptr, nullptr, nullptr },
        { "document_staple_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_DocumentStapleFeature), nullptr, nullptr, nullptr },
        { "job_passcode_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_JobPasscodeFeature), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PrintTicketCapabilities_get_Name), nullptr, nullptr, nullptr },
        { "page_borderless_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageBorderlessFeature), nullptr, nullptr, nullptr },
        { "page_media_size_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageMediaSizeFeature), nullptr, nullptr, nullptr },
        { "page_media_type_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageMediaTypeFeature), nullptr, nullptr, nullptr },
        { "page_orientation_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageOrientationFeature), nullptr, nullptr, nullptr },
        { "page_output_color_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageOutputColorFeature), nullptr, nullptr, nullptr },
        { "page_output_quality_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageOutputQualityFeature), nullptr, nullptr, nullptr },
        { "page_resolution_feature", reinterpret_cast<getter>(PrintTicketCapabilities_get_PageResolutionFeature), nullptr, nullptr, nullptr },
        { "xml_namespace", reinterpret_cast<getter>(PrintTicketCapabilities_get_XmlNamespace), nullptr, nullptr, nullptr },
        { "xml_node", reinterpret_cast<getter>(PrintTicketCapabilities_get_XmlNode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTicketCapabilities[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTicketCapabilities) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTicketCapabilities) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTicketCapabilities) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTicketCapabilities) },
        { },
    };

    static PyType_Spec type_spec_PrintTicketCapabilities =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.PrintTicketCapabilities",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTicketCapabilities
    };

    // ----- PrintTicketFeature class --------------------
    static constexpr const char* const type_name_PrintTicketFeature = "PrintTicketFeature";

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

    static void _dealloc_PrintTicketFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* 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* PrintTicketFeature_GetOption(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"GetOption", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketFeature_GetSelectedOption(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"GetSelectedOption", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PrintTicketFeature_SetSelectedOption(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"SetSelectedOption", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketOption>(args, 0);

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

    static PyObject* PrintTicketFeature_get_DisplayName(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"DisplayName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* PrintTicketFeature_get_Options(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"Options"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketFeature_get_SelectionType(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"SelectionType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketFeature_get_XmlNamespace(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"XmlNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketFeature_get_XmlNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketFeature", L"XmlNode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTicketFeature(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTicketFeature(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::Graphics::Printing::PrintTicket::PrintTicketFeature>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTicketFeature[] = {
        { "get_option", reinterpret_cast<PyCFunction>(PrintTicketFeature_GetOption), METH_VARARGS, nullptr },
        { "get_selected_option", reinterpret_cast<PyCFunction>(PrintTicketFeature_GetSelectedOption), METH_VARARGS, nullptr },
        { "set_selected_option", reinterpret_cast<PyCFunction>(PrintTicketFeature_SetSelectedOption), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintTicketFeature, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTicketFeature), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTicketFeature[] = {
        { "display_name", reinterpret_cast<getter>(PrintTicketFeature_get_DisplayName), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PrintTicketFeature_get_Name), nullptr, nullptr, nullptr },
        { "options", reinterpret_cast<getter>(PrintTicketFeature_get_Options), nullptr, nullptr, nullptr },
        { "selection_type", reinterpret_cast<getter>(PrintTicketFeature_get_SelectionType), nullptr, nullptr, nullptr },
        { "xml_namespace", reinterpret_cast<getter>(PrintTicketFeature_get_XmlNamespace), nullptr, nullptr, nullptr },
        { "xml_node", reinterpret_cast<getter>(PrintTicketFeature_get_XmlNode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTicketFeature[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTicketFeature) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTicketFeature) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTicketFeature) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTicketFeature) },
        { },
    };

    static PyType_Spec type_spec_PrintTicketFeature =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.PrintTicketFeature",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTicketFeature
    };

    // ----- PrintTicketOption class --------------------
    static constexpr const char* const type_name_PrintTicketOption = "PrintTicketOption";

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

    static void _dealloc_PrintTicketOption(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* 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* PrintTicketOption_GetPropertyNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"GetPropertyNode", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketOption_GetPropertyValue(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"GetPropertyValue", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketOption_GetScoredPropertyNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"GetScoredPropertyNode", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketOption_GetScoredPropertyValue(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"GetScoredPropertyValue", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* PrintTicketOption_get_DisplayName(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"DisplayName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* PrintTicketOption_get_XmlNamespace(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"XmlNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketOption_get_XmlNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketOption", L"XmlNode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTicketOption(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketOption>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTicketOption(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::Graphics::Printing::PrintTicket::PrintTicketOption>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTicketOption[] = {
        { "get_property_node", reinterpret_cast<PyCFunction>(PrintTicketOption_GetPropertyNode), METH_VARARGS, nullptr },
        { "get_property_value", reinterpret_cast<PyCFunction>(PrintTicketOption_GetPropertyValue), METH_VARARGS, nullptr },
        { "get_scored_property_node", reinterpret_cast<PyCFunction>(PrintTicketOption_GetScoredPropertyNode), METH_VARARGS, nullptr },
        { "get_scored_property_value", reinterpret_cast<PyCFunction>(PrintTicketOption_GetScoredPropertyValue), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintTicketOption, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTicketOption), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTicketOption[] = {
        { "display_name", reinterpret_cast<getter>(PrintTicketOption_get_DisplayName), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PrintTicketOption_get_Name), nullptr, nullptr, nullptr },
        { "xml_namespace", reinterpret_cast<getter>(PrintTicketOption_get_XmlNamespace), nullptr, nullptr, nullptr },
        { "xml_node", reinterpret_cast<getter>(PrintTicketOption_get_XmlNode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTicketOption[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTicketOption) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTicketOption) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTicketOption) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTicketOption) },
        { },
    };

    static PyType_Spec type_spec_PrintTicketOption =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.PrintTicketOption",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketOption),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTicketOption
    };

    // ----- PrintTicketParameterDefinition class --------------------
    static constexpr const char* const type_name_PrintTicketParameterDefinition = "PrintTicketParameterDefinition";

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

    static void _dealloc_PrintTicketParameterDefinition(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* 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* PrintTicketParameterDefinition_get_DataType(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterDefinition", L"DataType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* PrintTicketParameterDefinition_get_RangeMax(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterDefinition", L"RangeMax"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketParameterDefinition_get_RangeMin(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterDefinition", L"RangeMin"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketParameterDefinition_get_UnitType(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterDefinition", L"UnitType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketParameterDefinition_get_XmlNamespace(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterDefinition", L"XmlNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketParameterDefinition_get_XmlNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterDefinition", L"XmlNode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTicketParameterDefinition(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTicketParameterDefinition(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::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTicketParameterDefinition[] = {
        { "_assign_array_", _assign_array_PrintTicketParameterDefinition, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTicketParameterDefinition), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTicketParameterDefinition[] = {
        { "data_type", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_DataType), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_Name), nullptr, nullptr, nullptr },
        { "range_max", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_RangeMax), nullptr, nullptr, nullptr },
        { "range_min", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_RangeMin), nullptr, nullptr, nullptr },
        { "unit_type", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_UnitType), nullptr, nullptr, nullptr },
        { "xml_namespace", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_XmlNamespace), nullptr, nullptr, nullptr },
        { "xml_node", reinterpret_cast<getter>(PrintTicketParameterDefinition_get_XmlNode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTicketParameterDefinition[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTicketParameterDefinition) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTicketParameterDefinition) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTicketParameterDefinition) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTicketParameterDefinition) },
        { },
    };

    static PyType_Spec type_spec_PrintTicketParameterDefinition =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.PrintTicketParameterDefinition",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTicketParameterDefinition
    };

    // ----- PrintTicketParameterInitializer class --------------------
    static constexpr const char* const type_name_PrintTicketParameterInitializer = "PrintTicketParameterInitializer";

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

    static void _dealloc_PrintTicketParameterInitializer(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer* 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* PrintTicketParameterInitializer_get_Value(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterInitializer", L"Value"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int PrintTicketParameterInitializer_put_Value(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterInitializer", L"Value"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketValue>(arg);

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

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

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

    static PyObject* PrintTicketParameterInitializer_get_XmlNamespace(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterInitializer", L"XmlNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PrintTicketParameterInitializer_get_XmlNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketParameterInitializer", L"XmlNode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTicketParameterInitializer(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTicketParameterInitializer(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::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTicketParameterInitializer[] = {
        { "_assign_array_", _assign_array_PrintTicketParameterInitializer, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTicketParameterInitializer), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTicketParameterInitializer[] = {
        { "value", reinterpret_cast<getter>(PrintTicketParameterInitializer_get_Value), reinterpret_cast<setter>(PrintTicketParameterInitializer_put_Value), nullptr, nullptr },
        { "name", reinterpret_cast<getter>(PrintTicketParameterInitializer_get_Name), nullptr, nullptr, nullptr },
        { "xml_namespace", reinterpret_cast<getter>(PrintTicketParameterInitializer_get_XmlNamespace), nullptr, nullptr, nullptr },
        { "xml_node", reinterpret_cast<getter>(PrintTicketParameterInitializer_get_XmlNode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTicketParameterInitializer[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTicketParameterInitializer) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTicketParameterInitializer) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTicketParameterInitializer) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTicketParameterInitializer) },
        { },
    };

    static PyType_Spec type_spec_PrintTicketParameterInitializer =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.PrintTicketParameterInitializer",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTicketParameterInitializer
    };

    // ----- PrintTicketValue class --------------------
    static constexpr const char* const type_name_PrintTicketValue = "PrintTicketValue";

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

    static void _dealloc_PrintTicketValue(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketValue* 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* PrintTicketValue_GetValueAsInteger(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketValue", L"GetValueAsInteger", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PrintTicketValue_GetValueAsString(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketValue", L"GetValueAsString", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* PrintTicketValue_get_Type(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketValue* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.PrintTicketValue", L"Type"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PrintTicketValue(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketValue>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PrintTicketValue(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::Graphics::Printing::PrintTicket::PrintTicketValue>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PrintTicketValue[] = {
        { "get_value_as_integer", reinterpret_cast<PyCFunction>(PrintTicketValue_GetValueAsInteger), METH_VARARGS, nullptr },
        { "get_value_as_string", reinterpret_cast<PyCFunction>(PrintTicketValue_GetValueAsString), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintTicketValue, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintTicketValue), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PrintTicketValue[] = {
        { "type", reinterpret_cast<getter>(PrintTicketValue_get_Type), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PrintTicketValue[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintTicketValue) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintTicketValue) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintTicketValue) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintTicketValue) },
        { },
    };

    static PyType_Spec type_spec_PrintTicketValue =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.PrintTicketValue",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::PrintTicketValue),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintTicketValue
    };

    // ----- WorkflowPrintTicket class --------------------
    static constexpr const char* const type_name_WorkflowPrintTicket = "WorkflowPrintTicket";

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

    static void _dealloc_WorkflowPrintTicket(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* 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* WorkflowPrintTicket_GetCapabilities(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"GetCapabilities", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* WorkflowPrintTicket_GetFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"GetFeature", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* WorkflowPrintTicket_GetParameterInitializer(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"GetParameterInitializer", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* WorkflowPrintTicket_MergeAndValidateTicket(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"MergeAndValidateTicket", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket>(args, 0);

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

    static PyObject* WorkflowPrintTicket_NotifyXmlChangedAsync(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"NotifyXmlChangedAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* WorkflowPrintTicket_SetParameterInitializerAsInteger(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"SetParameterInitializerAsInteger", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<int32_t>(args, 2);

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

    static PyObject* WorkflowPrintTicket_SetParameterInitializerAsString(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"SetParameterInitializerAsString", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

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

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

    static PyObject* WorkflowPrintTicket_ValidateAsync(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"ValidateAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* WorkflowPrintTicket_get_DocumentBindingFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentBindingFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_DocumentCollateFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentCollateFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_DocumentDuplexFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentDuplexFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_DocumentHolePunchFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentHolePunchFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_DocumentInputBinFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentInputBinFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_DocumentNUpFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentNUpFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_DocumentStapleFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"DocumentStapleFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_JobPasscodeFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"JobPasscodeFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* WorkflowPrintTicket_get_PageBorderlessFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageBorderlessFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_PageMediaSizeFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageMediaSizeFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_PageMediaTypeFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageMediaTypeFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_PageOrientationFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageOrientationFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_PageOutputColorFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageOutputColorFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_PageOutputQualityFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageOutputQualityFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_PageResolutionFeature(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"PageResolutionFeature"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_XmlNamespace(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"XmlNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicket_get_XmlNode(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicket", L"XmlNode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WorkflowPrintTicket(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WorkflowPrintTicket(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::Graphics::Printing::PrintTicket::WorkflowPrintTicket>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WorkflowPrintTicket[] = {
        { "get_capabilities", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_GetCapabilities), METH_VARARGS, nullptr },
        { "get_feature", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_GetFeature), METH_VARARGS, nullptr },
        { "get_parameter_initializer", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_GetParameterInitializer), METH_VARARGS, nullptr },
        { "merge_and_validate_ticket", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_MergeAndValidateTicket), METH_VARARGS, nullptr },
        { "notify_xml_changed_async", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_NotifyXmlChangedAsync), METH_VARARGS, nullptr },
        { "set_parameter_initializer_as_integer", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_SetParameterInitializerAsInteger), METH_VARARGS, nullptr },
        { "set_parameter_initializer_as_string", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_SetParameterInitializerAsString), METH_VARARGS, nullptr },
        { "validate_async", reinterpret_cast<PyCFunction>(WorkflowPrintTicket_ValidateAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_WorkflowPrintTicket, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WorkflowPrintTicket), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WorkflowPrintTicket[] = {
        { "document_binding_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentBindingFeature), nullptr, nullptr, nullptr },
        { "document_collate_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentCollateFeature), nullptr, nullptr, nullptr },
        { "document_duplex_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentDuplexFeature), nullptr, nullptr, nullptr },
        { "document_hole_punch_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentHolePunchFeature), nullptr, nullptr, nullptr },
        { "document_input_bin_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentInputBinFeature), nullptr, nullptr, nullptr },
        { "document_n_up_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentNUpFeature), nullptr, nullptr, nullptr },
        { "document_staple_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_DocumentStapleFeature), nullptr, nullptr, nullptr },
        { "job_passcode_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_JobPasscodeFeature), nullptr, nullptr, nullptr },
        { "name", reinterpret_cast<getter>(WorkflowPrintTicket_get_Name), nullptr, nullptr, nullptr },
        { "page_borderless_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageBorderlessFeature), nullptr, nullptr, nullptr },
        { "page_media_size_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageMediaSizeFeature), nullptr, nullptr, nullptr },
        { "page_media_type_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageMediaTypeFeature), nullptr, nullptr, nullptr },
        { "page_orientation_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageOrientationFeature), nullptr, nullptr, nullptr },
        { "page_output_color_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageOutputColorFeature), nullptr, nullptr, nullptr },
        { "page_output_quality_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageOutputQualityFeature), nullptr, nullptr, nullptr },
        { "page_resolution_feature", reinterpret_cast<getter>(WorkflowPrintTicket_get_PageResolutionFeature), nullptr, nullptr, nullptr },
        { "xml_namespace", reinterpret_cast<getter>(WorkflowPrintTicket_get_XmlNamespace), nullptr, nullptr, nullptr },
        { "xml_node", reinterpret_cast<getter>(WorkflowPrintTicket_get_XmlNode), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WorkflowPrintTicket[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WorkflowPrintTicket) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WorkflowPrintTicket) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WorkflowPrintTicket) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WorkflowPrintTicket) },
        { },
    };

    static PyType_Spec type_spec_WorkflowPrintTicket =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.WorkflowPrintTicket",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WorkflowPrintTicket
    };

    // ----- WorkflowPrintTicketValidationResult class --------------------
    static constexpr const char* const type_name_WorkflowPrintTicketValidationResult = "WorkflowPrintTicketValidationResult";

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

    static void _dealloc_WorkflowPrintTicketValidationResult(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult* 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* WorkflowPrintTicketValidationResult_get_ExtendedError(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicketValidationResult", L"ExtendedError"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WorkflowPrintTicketValidationResult_get_Validated(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.Printing.PrintTicket.WorkflowPrintTicketValidationResult", L"Validated"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WorkflowPrintTicketValidationResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WorkflowPrintTicketValidationResult(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::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WorkflowPrintTicketValidationResult[] = {
        { "_assign_array_", _assign_array_WorkflowPrintTicketValidationResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WorkflowPrintTicketValidationResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WorkflowPrintTicketValidationResult[] = {
        { "extended_error", reinterpret_cast<getter>(WorkflowPrintTicketValidationResult_get_ExtendedError), nullptr, nullptr, nullptr },
        { "validated", reinterpret_cast<getter>(WorkflowPrintTicketValidationResult_get_Validated), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WorkflowPrintTicketValidationResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WorkflowPrintTicketValidationResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WorkflowPrintTicketValidationResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WorkflowPrintTicketValidationResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WorkflowPrintTicketValidationResult) },
        { },
    };

    static PyType_Spec type_spec_WorkflowPrintTicketValidationResult =
    {
        "_winsdk_Windows_Graphics_Printing_PrintTicket.WorkflowPrintTicketValidationResult",
        sizeof(py::wrapper::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WorkflowPrintTicketValidationResult
    };

    // ----- Windows.Graphics.Printing.PrintTicket Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Graphics::Printing::PrintTicket");

    static PyMethodDef module_methods[] = {
        {"_register_PrintTicketFeatureSelectionType", register_PrintTicketFeatureSelectionType, METH_O, "registers type"},
        {"_register_PrintTicketParameterDataType", register_PrintTicketParameterDataType, METH_O, "registers type"},
        {"_register_PrintTicketValueType", register_PrintTicketValueType, 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_PrintTicketFeatureSelectionType);
        Py_VISIT(state->type_PrintTicketParameterDataType);
        Py_VISIT(state->type_PrintTicketValueType);
        Py_VISIT(state->type_PrintTicketCapabilities);
        Py_VISIT(state->type_PrintTicketFeature);
        Py_VISIT(state->type_PrintTicketOption);
        Py_VISIT(state->type_PrintTicketParameterDefinition);
        Py_VISIT(state->type_PrintTicketParameterInitializer);
        Py_VISIT(state->type_PrintTicketValue);
        Py_VISIT(state->type_WorkflowPrintTicket);
        Py_VISIT(state->type_WorkflowPrintTicketValidationResult);

        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_PrintTicketFeatureSelectionType);
        Py_CLEAR(state->type_PrintTicketParameterDataType);
        Py_CLEAR(state->type_PrintTicketValueType);
        Py_CLEAR(state->type_PrintTicketCapabilities);
        Py_CLEAR(state->type_PrintTicketFeature);
        Py_CLEAR(state->type_PrintTicketOption);
        Py_CLEAR(state->type_PrintTicketParameterDefinition);
        Py_CLEAR(state->type_PrintTicketParameterInitializer);
        Py_CLEAR(state->type_PrintTicketValue);
        Py_CLEAR(state->type_WorkflowPrintTicket);
        Py_CLEAR(state->type_WorkflowPrintTicketValidationResult);

        return 0;
    }


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

} // py::cpp::Windows::Graphics::Printing::PrintTicket

PyMODINIT_FUNC PyInit__winsdk_Windows_Graphics_Printing_PrintTicket(void) noexcept
{
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    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_PrintTicketCapabilities = py::register_python_type(module.get(), type_name_PrintTicketCapabilities, &type_spec_PrintTicketCapabilities, bases.get(), nullptr);
    if (!state->type_PrintTicketCapabilities)
    {
        return nullptr;
    }

    state->type_PrintTicketFeature = py::register_python_type(module.get(), type_name_PrintTicketFeature, &type_spec_PrintTicketFeature, bases.get(), nullptr);
    if (!state->type_PrintTicketFeature)
    {
        return nullptr;
    }

    state->type_PrintTicketOption = py::register_python_type(module.get(), type_name_PrintTicketOption, &type_spec_PrintTicketOption, bases.get(), nullptr);
    if (!state->type_PrintTicketOption)
    {
        return nullptr;
    }

    state->type_PrintTicketParameterDefinition = py::register_python_type(module.get(), type_name_PrintTicketParameterDefinition, &type_spec_PrintTicketParameterDefinition, bases.get(), nullptr);
    if (!state->type_PrintTicketParameterDefinition)
    {
        return nullptr;
    }

    state->type_PrintTicketParameterInitializer = py::register_python_type(module.get(), type_name_PrintTicketParameterInitializer, &type_spec_PrintTicketParameterInitializer, bases.get(), nullptr);
    if (!state->type_PrintTicketParameterInitializer)
    {
        return nullptr;
    }

    state->type_PrintTicketValue = py::register_python_type(module.get(), type_name_PrintTicketValue, &type_spec_PrintTicketValue, bases.get(), nullptr);
    if (!state->type_PrintTicketValue)
    {
        return nullptr;
    }

    state->type_WorkflowPrintTicket = py::register_python_type(module.get(), type_name_WorkflowPrintTicket, &type_spec_WorkflowPrintTicket, bases.get(), nullptr);
    if (!state->type_WorkflowPrintTicket)
    {
        return nullptr;
    }

    state->type_WorkflowPrintTicketValidationResult = py::register_python_type(module.get(), type_name_WorkflowPrintTicketValidationResult, &type_spec_WorkflowPrintTicketValidationResult, bases.get(), nullptr);
    if (!state->type_WorkflowPrintTicketValidationResult)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketFeatureSelectionType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketFeatureSelectionType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketFeatureSelectionType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDataType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketParameterDataType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDataType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketValueType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketValueType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketValueType is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketCapabilities;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketCapabilities is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketFeature;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketFeature is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketOption>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketOption;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketOption is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketParameterDefinition;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterDefinition is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketParameterInitializer;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketParameterInitializer is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketValue>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PrintTicketValue;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::PrintTicketValue is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WorkflowPrintTicket;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicket is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Graphics::Printing::PrintTicket;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WorkflowPrintTicketValidationResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Graphics::Printing::PrintTicket::WorkflowPrintTicketValidationResult is not registered");
        return nullptr;
    }

    return python_type;
}
