// WARNING: Please don't edit this file. It was generated by Python/WinRT v3.1.0

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

namespace py::cpp::Windows::Devices::Printers
{
    // ----- IppAttributeError class --------------------

    static PyObject* _new_IppAttributeError(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::IppAttributeError>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::IppAttributeError>::type_name);
        return nullptr;
    }

    static void _dealloc_IppAttributeError(py::wrapper::Windows::Devices::Printers::IppAttributeError* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppAttributeError_GetUnsupportedValues(py::wrapper::Windows::Devices::Printers::IppAttributeError* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeError", L"GetUnsupportedValues", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetUnsupportedValues();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeError_get_ExtendedError(py::wrapper::Windows::Devices::Printers::IppAttributeError* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppAttributeError", L"ExtendedError");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.ExtendedError();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppAttributeError_get_Reason(py::wrapper::Windows::Devices::Printers::IppAttributeError* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppAttributeError", L"Reason");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Reason();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppAttributeError[] = {
        { "get_unsupported_values", reinterpret_cast<PyCFunction>(IppAttributeError_GetUnsupportedValues), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IppAttributeError, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppAttributeError), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppAttributeError[] = {
        { "extended_error", reinterpret_cast<getter>(IppAttributeError_get_ExtendedError), nullptr, nullptr, nullptr },
        { "reason", reinterpret_cast<getter>(IppAttributeError_get_Reason), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppAttributeError[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppAttributeError) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppAttributeError) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppAttributeError) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppAttributeError) },
        { }};

    static PyType_Spec type_spec_IppAttributeError = {
        "winrt._winrt_windows_devices_printers.IppAttributeError",
        sizeof(py::wrapper::Windows::Devices::Printers::IppAttributeError),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppAttributeError};

    // ----- IppAttributeValue class --------------------

    static PyObject* _new_IppAttributeValue(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::IppAttributeValue>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::IppAttributeValue>::type_name);
        return nullptr;
    }

    static void _dealloc_IppAttributeValue(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppAttributeValue_CreateBoolean(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateBoolean", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateBoolean(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateBooleanArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateBooleanArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<bool>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateBooleanArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateCharset(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateCharset", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateCharset(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateCharsetArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateCharsetArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateCharsetArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateCollection(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateCollection", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Devices::Printers::IppAttributeValue>>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateCollection(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateCollectionArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateCollectionArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Devices::Printers::IppAttributeValue>>>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateCollectionArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateDateTime(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateDateTime", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateDateTime(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateDateTimeArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateDateTimeArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::DateTime>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateDateTimeArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateEnum(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateEnum", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<int32_t>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateEnum(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateEnumArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateEnumArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<int32_t>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateEnumArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateInteger(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateInteger", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<int32_t>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateInteger(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateIntegerArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateIntegerArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<int32_t>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateIntegerArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateKeyword(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateKeyword", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateKeyword(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateKeywordArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateKeywordArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateKeywordArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateMimeMedia(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateMimeMedia", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateMimeMedia(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateMimeMediaArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateMimeMediaArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateMimeMediaArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNameWithLanguage(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNameWithLanguage", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::IppTextWithLanguage>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNameWithLanguage(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNameWithLanguageArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNameWithLanguageArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Devices::Printers::IppTextWithLanguage>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNameWithLanguageArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNameWithoutLanguage(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNameWithoutLanguage", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNameWithoutLanguage(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNameWithoutLanguageArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNameWithoutLanguageArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNameWithoutLanguageArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNaturalLanguage(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNaturalLanguage", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNaturalLanguage(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNaturalLanguageArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNaturalLanguageArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNaturalLanguageArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateNoValue(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateNoValue", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateNoValue();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateOctetString(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateOctetString", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateOctetString(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateOctetStringArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateOctetStringArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Storage::Streams::IBuffer>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateOctetStringArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateRangeOfInteger(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateRangeOfInteger", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::IppIntegerRange>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateRangeOfInteger(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateRangeOfIntegerArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateRangeOfIntegerArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Devices::Printers::IppIntegerRange>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateRangeOfIntegerArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateResolution(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateResolution", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::IppResolution>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateResolution(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateResolutionArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateResolutionArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Devices::Printers::IppResolution>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateResolutionArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateTextWithLanguage(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateTextWithLanguage", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::IppTextWithLanguage>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateTextWithLanguage(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateTextWithLanguageArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateTextWithLanguageArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Devices::Printers::IppTextWithLanguage>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateTextWithLanguageArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateTextWithoutLanguage(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateTextWithoutLanguage", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateTextWithoutLanguage(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateTextWithoutLanguageArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateTextWithoutLanguageArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateTextWithoutLanguageArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateUnknown(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateUnknown", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateUnknown();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateUnsupported(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateUnsupported", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateUnsupported();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateUri(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateUri", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateUri(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateUriArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateUriArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Uri>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateUriArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateUriSchema(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateUriSchema", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateUriSchema(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_CreateUriSchemaArray(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"CreateUriSchemaArray", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppAttributeValue::CreateUriSchemaArray(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetBooleanArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetBooleanArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetBooleanArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetCharsetArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetCharsetArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetCharsetArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetCollectionArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetCollectionArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetCollectionArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetDateTimeArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetDateTimeArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetDateTimeArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetEnumArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetEnumArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetEnumArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetIntegerArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetIntegerArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetIntegerArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetKeywordArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetKeywordArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetKeywordArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetMimeMediaTypeArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetMimeMediaTypeArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetMimeMediaTypeArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetNameWithLanguageArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetNameWithLanguageArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetNameWithLanguageArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetNameWithoutLanguageArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetNameWithoutLanguageArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetNameWithoutLanguageArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetNaturalLanguageArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetNaturalLanguageArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetNaturalLanguageArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetOctetStringArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetOctetStringArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetOctetStringArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetRangeOfIntegerArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetRangeOfIntegerArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetRangeOfIntegerArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetResolutionArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetResolutionArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetResolutionArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetTextWithLanguageArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetTextWithLanguageArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetTextWithLanguageArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetTextWithoutLanguageArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetTextWithoutLanguageArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetTextWithoutLanguageArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetUriArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetUriArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetUriArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_GetUriSchemaArray(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppAttributeValue", L"GetUriSchemaArray", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetUriSchemaArray();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppAttributeValue_get_Kind(py::wrapper::Windows::Devices::Printers::IppAttributeValue* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppAttributeValue", L"Kind");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Kind();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppAttributeValue[] = {
        { "get_boolean_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetBooleanArray), METH_VARARGS, nullptr },
        { "get_charset_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetCharsetArray), METH_VARARGS, nullptr },
        { "get_collection_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetCollectionArray), METH_VARARGS, nullptr },
        { "get_date_time_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetDateTimeArray), METH_VARARGS, nullptr },
        { "get_enum_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetEnumArray), METH_VARARGS, nullptr },
        { "get_integer_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetIntegerArray), METH_VARARGS, nullptr },
        { "get_keyword_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetKeywordArray), METH_VARARGS, nullptr },
        { "get_mime_media_type_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetMimeMediaTypeArray), METH_VARARGS, nullptr },
        { "get_name_with_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetNameWithLanguageArray), METH_VARARGS, nullptr },
        { "get_name_without_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetNameWithoutLanguageArray), METH_VARARGS, nullptr },
        { "get_natural_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetNaturalLanguageArray), METH_VARARGS, nullptr },
        { "get_octet_string_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetOctetStringArray), METH_VARARGS, nullptr },
        { "get_range_of_integer_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetRangeOfIntegerArray), METH_VARARGS, nullptr },
        { "get_resolution_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetResolutionArray), METH_VARARGS, nullptr },
        { "get_text_with_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetTextWithLanguageArray), METH_VARARGS, nullptr },
        { "get_text_without_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetTextWithoutLanguageArray), METH_VARARGS, nullptr },
        { "get_uri_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetUriArray), METH_VARARGS, nullptr },
        { "get_uri_schema_array", reinterpret_cast<PyCFunction>(IppAttributeValue_GetUriSchemaArray), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IppAttributeValue, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppAttributeValue), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppAttributeValue[] = {
        { "kind", reinterpret_cast<getter>(IppAttributeValue_get_Kind), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppAttributeValue[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppAttributeValue) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppAttributeValue) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppAttributeValue) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppAttributeValue) },
        { }};

    static PyType_Spec type_spec_IppAttributeValue = {
        "winrt._winrt_windows_devices_printers.IppAttributeValue",
        sizeof(py::wrapper::Windows::Devices::Printers::IppAttributeValue),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppAttributeValue};

    static PyGetSetDef getset_IppAttributeValue_Static[] = {
        { }};

    static PyMethodDef methods_IppAttributeValue_Static[] = {
        { "create_boolean", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateBoolean), METH_VARARGS, nullptr },
        { "create_boolean_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateBooleanArray), METH_VARARGS, nullptr },
        { "create_charset", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateCharset), METH_VARARGS, nullptr },
        { "create_charset_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateCharsetArray), METH_VARARGS, nullptr },
        { "create_collection", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateCollection), METH_VARARGS, nullptr },
        { "create_collection_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateCollectionArray), METH_VARARGS, nullptr },
        { "create_date_time", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateDateTime), METH_VARARGS, nullptr },
        { "create_date_time_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateDateTimeArray), METH_VARARGS, nullptr },
        { "create_enum", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateEnum), METH_VARARGS, nullptr },
        { "create_enum_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateEnumArray), METH_VARARGS, nullptr },
        { "create_integer", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateInteger), METH_VARARGS, nullptr },
        { "create_integer_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateIntegerArray), METH_VARARGS, nullptr },
        { "create_keyword", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateKeyword), METH_VARARGS, nullptr },
        { "create_keyword_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateKeywordArray), METH_VARARGS, nullptr },
        { "create_mime_media", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateMimeMedia), METH_VARARGS, nullptr },
        { "create_mime_media_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateMimeMediaArray), METH_VARARGS, nullptr },
        { "create_name_with_language", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNameWithLanguage), METH_VARARGS, nullptr },
        { "create_name_with_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNameWithLanguageArray), METH_VARARGS, nullptr },
        { "create_name_without_language", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNameWithoutLanguage), METH_VARARGS, nullptr },
        { "create_name_without_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNameWithoutLanguageArray), METH_VARARGS, nullptr },
        { "create_natural_language", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNaturalLanguage), METH_VARARGS, nullptr },
        { "create_natural_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNaturalLanguageArray), METH_VARARGS, nullptr },
        { "create_no_value", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateNoValue), METH_VARARGS, nullptr },
        { "create_octet_string", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateOctetString), METH_VARARGS, nullptr },
        { "create_octet_string_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateOctetStringArray), METH_VARARGS, nullptr },
        { "create_range_of_integer", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateRangeOfInteger), METH_VARARGS, nullptr },
        { "create_range_of_integer_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateRangeOfIntegerArray), METH_VARARGS, nullptr },
        { "create_resolution", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateResolution), METH_VARARGS, nullptr },
        { "create_resolution_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateResolutionArray), METH_VARARGS, nullptr },
        { "create_text_with_language", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateTextWithLanguage), METH_VARARGS, nullptr },
        { "create_text_with_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateTextWithLanguageArray), METH_VARARGS, nullptr },
        { "create_text_without_language", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateTextWithoutLanguage), METH_VARARGS, nullptr },
        { "create_text_without_language_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateTextWithoutLanguageArray), METH_VARARGS, nullptr },
        { "create_unknown", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateUnknown), METH_VARARGS, nullptr },
        { "create_unsupported", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateUnsupported), METH_VARARGS, nullptr },
        { "create_uri", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateUri), METH_VARARGS, nullptr },
        { "create_uri_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateUriArray), METH_VARARGS, nullptr },
        { "create_uri_schema", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateUriSchema), METH_VARARGS, nullptr },
        { "create_uri_schema_array", reinterpret_cast<PyCFunction>(IppAttributeValue_CreateUriSchemaArray), METH_VARARGS, nullptr },
        { }};

    static PyType_Slot type_slots_IppAttributeValue_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_IppAttributeValue_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_IppAttributeValue_Static) },
        { }
    };

    static PyType_Spec type_spec_IppAttributeValue_Static = {
        "winrt._winrt_windows_devices_printers.IppAttributeValue_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_IppAttributeValue_Static};

    // ----- IppIntegerRange class --------------------

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

        auto arg_count = PyTuple_GET_SIZE(args);
        if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<int32_t>(args, 0);
                auto param1 = py::convert_to<int32_t>(args, 1);

                winrt::Windows::Devices::Printers::IppIntegerRange instance{param0, param1};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_IppIntegerRange(py::wrapper::Windows::Devices::Printers::IppIntegerRange* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppIntegerRange_get_End(py::wrapper::Windows::Devices::Printers::IppIntegerRange* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppIntegerRange", L"End");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.End();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppIntegerRange_get_Start(py::wrapper::Windows::Devices::Printers::IppIntegerRange* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppIntegerRange", L"Start");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Start();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppIntegerRange[] = {
        { "_assign_array_", _assign_array_IppIntegerRange, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppIntegerRange), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppIntegerRange[] = {
        { "end", reinterpret_cast<getter>(IppIntegerRange_get_End), nullptr, nullptr, nullptr },
        { "start", reinterpret_cast<getter>(IppIntegerRange_get_Start), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppIntegerRange[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppIntegerRange) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppIntegerRange) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppIntegerRange) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppIntegerRange) },
        { }};

    static PyType_Spec type_spec_IppIntegerRange = {
        "winrt._winrt_windows_devices_printers.IppIntegerRange",
        sizeof(py::wrapper::Windows::Devices::Printers::IppIntegerRange),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppIntegerRange};

    // ----- IppPrintDevice class --------------------

    static PyObject* _new_IppPrintDevice(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::IppPrintDevice>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::IppPrintDevice>::type_name);
        return nullptr;
    }

    static void _dealloc_IppPrintDevice(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppPrintDevice_FromId(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"FromId", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppPrintDevice::FromId(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_FromPrinterName(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"FromPrinterName", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppPrintDevice::FromPrinterName(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetDeviceSelector(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetDeviceSelector", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppPrintDevice::GetDeviceSelector();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetMaxSupportedPdfSize(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetMaxSupportedPdfSize", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetMaxSupportedPdfSize();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetMaxSupportedPdfVersion(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetMaxSupportedPdfVersion", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetMaxSupportedPdfVersion();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetMaxSupportedPdlVersion(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetMaxSupportedPdlVersion", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetMaxSupportedPdlVersion(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetPdlPassthroughProvider(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetPdlPassthroughProvider", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetPdlPassthroughProvider();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetPrinterAttributes(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetPrinterAttributes", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetPrinterAttributes(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_GetPrinterAttributesAsBuffer(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"GetPrinterAttributesAsBuffer", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetPrinterAttributesAsBuffer(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_IsIppPrinter(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"IsIppPrinter", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::IppPrintDevice::IsIppPrinter(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_IsPdlPassthroughSupported(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"IsPdlPassthroughSupported", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.IsPdlPassthroughSupported(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_RefreshPrintDeviceCapabilities(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"RefreshPrintDeviceCapabilities", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                {
                    auto _gil = release_gil();
                    self->obj.RefreshPrintDeviceCapabilities();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_SetPrinterAttributes(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"SetPrinterAttributes", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::Windows::Devices::Printers::IppAttributeValue>>>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.SetPrinterAttributes(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_SetPrinterAttributesFromBuffer(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.IppPrintDevice", L"SetPrinterAttributesFromBuffer", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.SetPrinterAttributesFromBuffer(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_get_PrinterName(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"PrinterName");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrinterName();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_get_PrinterUri(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"PrinterUri");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrinterUri();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_get_IsIppFaxOutPrinter(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"IsIppFaxOutPrinter");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.IsIppFaxOutPrinter();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_get_UserDefaultPrintTicket(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"UserDefaultPrintTicket");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.UserDefaultPrintTicket();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IppPrintDevice_put_UserDefaultPrintTicket(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"UserDefaultPrintTicket");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.UserDefaultPrintTicket(param0);
            }

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

    static PyObject* IppPrintDevice_get_CanModifyUserDefaultPrintTicket(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"CanModifyUserDefaultPrintTicket");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.CanModifyUserDefaultPrintTicket();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppPrintDevice_get_DeviceKind(py::wrapper::Windows::Devices::Printers::IppPrintDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppPrintDevice", L"DeviceKind");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.DeviceKind();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppPrintDevice[] = {
        { "get_max_supported_pdf_size", reinterpret_cast<PyCFunction>(IppPrintDevice_GetMaxSupportedPdfSize), METH_VARARGS, nullptr },
        { "get_max_supported_pdf_version", reinterpret_cast<PyCFunction>(IppPrintDevice_GetMaxSupportedPdfVersion), METH_VARARGS, nullptr },
        { "get_max_supported_pdl_version", reinterpret_cast<PyCFunction>(IppPrintDevice_GetMaxSupportedPdlVersion), METH_VARARGS, nullptr },
        { "get_pdl_passthrough_provider", reinterpret_cast<PyCFunction>(IppPrintDevice_GetPdlPassthroughProvider), METH_VARARGS, nullptr },
        { "get_printer_attributes", reinterpret_cast<PyCFunction>(IppPrintDevice_GetPrinterAttributes), METH_VARARGS, nullptr },
        { "get_printer_attributes_as_buffer", reinterpret_cast<PyCFunction>(IppPrintDevice_GetPrinterAttributesAsBuffer), METH_VARARGS, nullptr },
        { "is_pdl_passthrough_supported", reinterpret_cast<PyCFunction>(IppPrintDevice_IsPdlPassthroughSupported), METH_VARARGS, nullptr },
        { "refresh_print_device_capabilities", reinterpret_cast<PyCFunction>(IppPrintDevice_RefreshPrintDeviceCapabilities), METH_VARARGS, nullptr },
        { "set_printer_attributes", reinterpret_cast<PyCFunction>(IppPrintDevice_SetPrinterAttributes), METH_VARARGS, nullptr },
        { "set_printer_attributes_from_buffer", reinterpret_cast<PyCFunction>(IppPrintDevice_SetPrinterAttributesFromBuffer), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IppPrintDevice, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppPrintDevice), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppPrintDevice[] = {
        { "printer_name", reinterpret_cast<getter>(IppPrintDevice_get_PrinterName), nullptr, nullptr, nullptr },
        { "printer_uri", reinterpret_cast<getter>(IppPrintDevice_get_PrinterUri), nullptr, nullptr, nullptr },
        { "is_ipp_fax_out_printer", reinterpret_cast<getter>(IppPrintDevice_get_IsIppFaxOutPrinter), nullptr, nullptr, nullptr },
        { "user_default_print_ticket", reinterpret_cast<getter>(IppPrintDevice_get_UserDefaultPrintTicket), reinterpret_cast<setter>(IppPrintDevice_put_UserDefaultPrintTicket), nullptr, nullptr },
        { "can_modify_user_default_print_ticket", reinterpret_cast<getter>(IppPrintDevice_get_CanModifyUserDefaultPrintTicket), nullptr, nullptr, nullptr },
        { "device_kind", reinterpret_cast<getter>(IppPrintDevice_get_DeviceKind), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppPrintDevice[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppPrintDevice) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppPrintDevice) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppPrintDevice) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppPrintDevice) },
        { }};

    static PyType_Spec type_spec_IppPrintDevice = {
        "winrt._winrt_windows_devices_printers.IppPrintDevice",
        sizeof(py::wrapper::Windows::Devices::Printers::IppPrintDevice),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppPrintDevice};

    static PyGetSetDef getset_IppPrintDevice_Static[] = {
        { }};

    static PyMethodDef methods_IppPrintDevice_Static[] = {
        { "from_id", reinterpret_cast<PyCFunction>(IppPrintDevice_FromId), METH_VARARGS, nullptr },
        { "from_printer_name", reinterpret_cast<PyCFunction>(IppPrintDevice_FromPrinterName), METH_VARARGS, nullptr },
        { "get_device_selector", reinterpret_cast<PyCFunction>(IppPrintDevice_GetDeviceSelector), METH_VARARGS, nullptr },
        { "is_ipp_printer", reinterpret_cast<PyCFunction>(IppPrintDevice_IsIppPrinter), METH_VARARGS, nullptr },
        { }};

    static PyType_Slot type_slots_IppPrintDevice_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_IppPrintDevice_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_IppPrintDevice_Static) },
        { }
    };

    static PyType_Spec type_spec_IppPrintDevice_Static = {
        "winrt._winrt_windows_devices_printers.IppPrintDevice_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_IppPrintDevice_Static};

    // ----- IppResolution class --------------------

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

        auto arg_count = PyTuple_GET_SIZE(args);
        if (arg_count == 3)
        {
            try
            {
                auto param0 = py::convert_to<int32_t>(args, 0);
                auto param1 = py::convert_to<int32_t>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Devices::Printers::IppResolutionUnit>(args, 2);

                winrt::Windows::Devices::Printers::IppResolution instance{param0, param1, param2};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_IppResolution(py::wrapper::Windows::Devices::Printers::IppResolution* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppResolution_get_Height(py::wrapper::Windows::Devices::Printers::IppResolution* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppResolution", L"Height");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Height();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppResolution_get_Unit(py::wrapper::Windows::Devices::Printers::IppResolution* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppResolution", L"Unit");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Unit();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppResolution_get_Width(py::wrapper::Windows::Devices::Printers::IppResolution* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppResolution", L"Width");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Width();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppResolution[] = {
        { "_assign_array_", _assign_array_IppResolution, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppResolution), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppResolution[] = {
        { "height", reinterpret_cast<getter>(IppResolution_get_Height), nullptr, nullptr, nullptr },
        { "unit", reinterpret_cast<getter>(IppResolution_get_Unit), nullptr, nullptr, nullptr },
        { "width", reinterpret_cast<getter>(IppResolution_get_Width), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppResolution[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppResolution) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppResolution) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppResolution) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppResolution) },
        { }};

    static PyType_Spec type_spec_IppResolution = {
        "winrt._winrt_windows_devices_printers.IppResolution",
        sizeof(py::wrapper::Windows::Devices::Printers::IppResolution),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppResolution};

    // ----- IppSetAttributesResult class --------------------

    static PyObject* _new_IppSetAttributesResult(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::IppSetAttributesResult>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::IppSetAttributesResult>::type_name);
        return nullptr;
    }

    static void _dealloc_IppSetAttributesResult(py::wrapper::Windows::Devices::Printers::IppSetAttributesResult* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppSetAttributesResult_get_AttributeErrors(py::wrapper::Windows::Devices::Printers::IppSetAttributesResult* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppSetAttributesResult", L"AttributeErrors");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.AttributeErrors();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppSetAttributesResult_get_Succeeded(py::wrapper::Windows::Devices::Printers::IppSetAttributesResult* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppSetAttributesResult", L"Succeeded");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Succeeded();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppSetAttributesResult[] = {
        { "_assign_array_", _assign_array_IppSetAttributesResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppSetAttributesResult), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppSetAttributesResult[] = {
        { "attribute_errors", reinterpret_cast<getter>(IppSetAttributesResult_get_AttributeErrors), nullptr, nullptr, nullptr },
        { "succeeded", reinterpret_cast<getter>(IppSetAttributesResult_get_Succeeded), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppSetAttributesResult[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppSetAttributesResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppSetAttributesResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppSetAttributesResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppSetAttributesResult) },
        { }};

    static PyType_Spec type_spec_IppSetAttributesResult = {
        "winrt._winrt_windows_devices_printers.IppSetAttributesResult",
        sizeof(py::wrapper::Windows::Devices::Printers::IppSetAttributesResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppSetAttributesResult};

    // ----- IppTextWithLanguage class --------------------

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

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

                winrt::Windows::Devices::Printers::IppTextWithLanguage instance{param0, param1};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_IppTextWithLanguage(py::wrapper::Windows::Devices::Printers::IppTextWithLanguage* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IppTextWithLanguage_get_Language(py::wrapper::Windows::Devices::Printers::IppTextWithLanguage* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppTextWithLanguage", L"Language");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Language();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IppTextWithLanguage_get_Value(py::wrapper::Windows::Devices::Printers::IppTextWithLanguage* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.IppTextWithLanguage", L"Value");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Value();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_IppTextWithLanguage[] = {
        { "_assign_array_", _assign_array_IppTextWithLanguage, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IppTextWithLanguage), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_IppTextWithLanguage[] = {
        { "language", reinterpret_cast<getter>(IppTextWithLanguage_get_Language), nullptr, nullptr, nullptr },
        { "value", reinterpret_cast<getter>(IppTextWithLanguage_get_Value), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_IppTextWithLanguage[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IppTextWithLanguage) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IppTextWithLanguage) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IppTextWithLanguage) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IppTextWithLanguage) },
        { }};

    static PyType_Spec type_spec_IppTextWithLanguage = {
        "winrt._winrt_windows_devices_printers.IppTextWithLanguage",
        sizeof(py::wrapper::Windows::Devices::Printers::IppTextWithLanguage),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IppTextWithLanguage};

    // ----- PageConfigurationSettings class --------------------

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

        auto arg_count = PyTuple_GET_SIZE(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Printers::PageConfigurationSettings instance{};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_PageConfigurationSettings(py::wrapper::Windows::Devices::Printers::PageConfigurationSettings* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PageConfigurationSettings_get_SizeSource(py::wrapper::Windows::Devices::Printers::PageConfigurationSettings* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.PageConfigurationSettings", L"SizeSource");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SizeSource();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PageConfigurationSettings_put_SizeSource(py::wrapper::Windows::Devices::Printers::PageConfigurationSettings* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.PageConfigurationSettings", L"SizeSource");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::Devices::Printers::PageConfigurationSource>(arg);

            {
                auto _gil = release_gil();
                self->obj.SizeSource(param0);
            }

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

    static PyObject* PageConfigurationSettings_get_OrientationSource(py::wrapper::Windows::Devices::Printers::PageConfigurationSettings* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.PageConfigurationSettings", L"OrientationSource");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.OrientationSource();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int PageConfigurationSettings_put_OrientationSource(py::wrapper::Windows::Devices::Printers::PageConfigurationSettings* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.PageConfigurationSettings", L"OrientationSource");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::Devices::Printers::PageConfigurationSource>(arg);

            {
                auto _gil = release_gil();
                self->obj.OrientationSource(param0);
            }

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

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

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

    static PyMethodDef _methods_PageConfigurationSettings[] = {
        { "_assign_array_", _assign_array_PageConfigurationSettings, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PageConfigurationSettings), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_PageConfigurationSettings[] = {
        { "size_source", reinterpret_cast<getter>(PageConfigurationSettings_get_SizeSource), reinterpret_cast<setter>(PageConfigurationSettings_put_SizeSource), nullptr, nullptr },
        { "orientation_source", reinterpret_cast<getter>(PageConfigurationSettings_get_OrientationSource), reinterpret_cast<setter>(PageConfigurationSettings_put_OrientationSource), nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_PageConfigurationSettings[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_PageConfigurationSettings) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PageConfigurationSettings) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PageConfigurationSettings) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PageConfigurationSettings) },
        { }};

    static PyType_Spec type_spec_PageConfigurationSettings = {
        "winrt._winrt_windows_devices_printers.PageConfigurationSettings",
        sizeof(py::wrapper::Windows::Devices::Printers::PageConfigurationSettings),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PageConfigurationSettings};

    // ----- PdlPassthroughProvider class --------------------

    static PyObject* _new_PdlPassthroughProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::PdlPassthroughProvider>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::PdlPassthroughProvider>::type_name);
        return nullptr;
    }

    static void _dealloc_PdlPassthroughProvider(py::wrapper::Windows::Devices::Printers::PdlPassthroughProvider* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PdlPassthroughProvider_StartPrintJobWithPrintTicket(py::wrapper::Windows::Devices::Printers::PdlPassthroughProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 4)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PdlPassthroughProvider", L"StartPrintJobWithPrintTicket", 4);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(4);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Storage::Streams::IInputStream>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::Devices::Printers::PageConfigurationSettings>(args, 3);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.StartPrintJobWithPrintTicket(param0, param1, param2, param3);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PdlPassthroughProvider_StartPrintJobWithTaskOptions(py::wrapper::Windows::Devices::Printers::PdlPassthroughProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 4)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PdlPassthroughProvider", L"StartPrintJobWithTaskOptions", 4);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(4);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Graphics::Printing::PrintTaskOptions>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::Devices::Printers::PageConfigurationSettings>(args, 3);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.StartPrintJobWithTaskOptions(param0, param1, param2, param3);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PdlPassthroughProvider_get_SupportedPdlContentTypes(py::wrapper::Windows::Devices::Printers::PdlPassthroughProvider* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.PdlPassthroughProvider", L"SupportedPdlContentTypes");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SupportedPdlContentTypes();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_PdlPassthroughProvider[] = {
        { "start_print_job_with_print_ticket", reinterpret_cast<PyCFunction>(PdlPassthroughProvider_StartPrintJobWithPrintTicket), METH_VARARGS, nullptr },
        { "start_print_job_with_task_options", reinterpret_cast<PyCFunction>(PdlPassthroughProvider_StartPrintJobWithTaskOptions), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PdlPassthroughProvider, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PdlPassthroughProvider), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_PdlPassthroughProvider[] = {
        { "supported_pdl_content_types", reinterpret_cast<getter>(PdlPassthroughProvider_get_SupportedPdlContentTypes), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_PdlPassthroughProvider[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_PdlPassthroughProvider) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PdlPassthroughProvider) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PdlPassthroughProvider) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PdlPassthroughProvider) },
        { }};

    static PyType_Spec type_spec_PdlPassthroughProvider = {
        "winrt._winrt_windows_devices_printers.PdlPassthroughProvider",
        sizeof(py::wrapper::Windows::Devices::Printers::PdlPassthroughProvider),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PdlPassthroughProvider};

    // ----- PdlPassthroughTarget class --------------------

    static PyObject* _new_PdlPassthroughTarget(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::PdlPassthroughTarget>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::PdlPassthroughTarget>::type_name);
        return nullptr;
    }

    static void _dealloc_PdlPassthroughTarget(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PdlPassthroughTarget_Close(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PdlPassthroughTarget", L"Close", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                {
                    auto _gil = release_gil();
                    self->obj.Close();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PdlPassthroughTarget_GetOutputStream(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PdlPassthroughTarget", L"GetOutputStream", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetOutputStream();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PdlPassthroughTarget_Submit(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PdlPassthroughTarget", L"Submit", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                {
                    auto _gil = release_gil();
                    self->obj.Submit();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PdlPassthroughTarget_get_PrintJobId(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.PdlPassthroughTarget", L"PrintJobId");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrintJobId();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyObject* _enter_PdlPassthroughTarget(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self, PyObject* /*unused*/) noexcept
    {
        return Py_NewRef(self);
    }

    static PyObject* _exit_PdlPassthroughTarget(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget* self, PyObject* /*unused*/) noexcept
    {
        try
        {
            {
                auto _gil = py::release_gil();
                self->obj.Close();
            }

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

    static PyMethodDef _methods_PdlPassthroughTarget[] = {
        { "close", reinterpret_cast<PyCFunction>(PdlPassthroughTarget_Close), METH_VARARGS, nullptr },
        { "get_output_stream", reinterpret_cast<PyCFunction>(PdlPassthroughTarget_GetOutputStream), METH_VARARGS, nullptr },
        { "submit", reinterpret_cast<PyCFunction>(PdlPassthroughTarget_Submit), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PdlPassthroughTarget, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PdlPassthroughTarget), METH_O | METH_STATIC, nullptr },
        { "__enter__", reinterpret_cast<PyCFunction>(_enter_PdlPassthroughTarget), METH_NOARGS, nullptr },
        { "__exit__", reinterpret_cast<PyCFunction>(_exit_PdlPassthroughTarget), METH_VARARGS, nullptr },
        { }};

    static PyGetSetDef _getset_PdlPassthroughTarget[] = {
        { "print_job_id", reinterpret_cast<getter>(PdlPassthroughTarget_get_PrintJobId), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_PdlPassthroughTarget[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_PdlPassthroughTarget) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PdlPassthroughTarget) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PdlPassthroughTarget) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PdlPassthroughTarget) },
        { }};

    static PyType_Spec type_spec_PdlPassthroughTarget = {
        "winrt._winrt_windows_devices_printers.PdlPassthroughTarget",
        sizeof(py::wrapper::Windows::Devices::Printers::PdlPassthroughTarget),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PdlPassthroughTarget};

    // ----- Print3DDevice class --------------------

    static PyObject* _new_Print3DDevice(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::Print3DDevice>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::Print3DDevice>::type_name);
        return nullptr;
    }

    static void _dealloc_Print3DDevice(py::wrapper::Windows::Devices::Printers::Print3DDevice* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* Print3DDevice_FromIdAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Print3DDevice", L"FromIdAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::Print3DDevice::FromIdAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* Print3DDevice_GetDeviceSelector(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.Print3DDevice", L"GetDeviceSelector", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::Print3DDevice::GetDeviceSelector();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* Print3DDevice_get_PrintSchema(py::wrapper::Windows::Devices::Printers::Print3DDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.Print3DDevice", L"PrintSchema");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrintSchema();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_Print3DDevice[] = {
        { "_assign_array_", _assign_array_Print3DDevice, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_Print3DDevice), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_Print3DDevice[] = {
        { "print_schema", reinterpret_cast<getter>(Print3DDevice_get_PrintSchema), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_Print3DDevice[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_Print3DDevice) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Print3DDevice) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_Print3DDevice) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_Print3DDevice) },
        { }};

    static PyType_Spec type_spec_Print3DDevice = {
        "winrt._winrt_windows_devices_printers.Print3DDevice",
        sizeof(py::wrapper::Windows::Devices::Printers::Print3DDevice),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_Print3DDevice};

    static PyGetSetDef getset_Print3DDevice_Static[] = {
        { }};

    static PyMethodDef methods_Print3DDevice_Static[] = {
        { "from_id_async", reinterpret_cast<PyCFunction>(Print3DDevice_FromIdAsync), METH_VARARGS, nullptr },
        { "get_device_selector", reinterpret_cast<PyCFunction>(Print3DDevice_GetDeviceSelector), METH_VARARGS, nullptr },
        { }};

    static PyType_Slot type_slots_Print3DDevice_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_Print3DDevice_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_Print3DDevice_Static) },
        { }
    };

    static PyType_Spec type_spec_Print3DDevice_Static = {
        "winrt._winrt_windows_devices_printers.Print3DDevice_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_Print3DDevice_Static};

    // ----- PrintSchema class --------------------

    static PyObject* _new_PrintSchema(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::PrintSchema>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::PrintSchema>::type_name);
        return nullptr;
    }

    static void _dealloc_PrintSchema(py::wrapper::Windows::Devices::Printers::PrintSchema* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PrintSchema_GetCapabilitiesAsync(py::wrapper::Windows::Devices::Printers::PrintSchema* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PrintSchema", L"GetCapabilitiesAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetCapabilitiesAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PrintSchema_GetDefaultPrintTicketAsync(py::wrapper::Windows::Devices::Printers::PrintSchema* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PrintSchema", L"GetDefaultPrintTicketAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetDefaultPrintTicketAsync();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PrintSchema_MergeAndValidateWithDefaultPrintTicketAsync(py::wrapper::Windows::Devices::Printers::PrintSchema* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.PrintSchema", L"MergeAndValidateWithDefaultPrintTicketAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.MergeAndValidateWithDefaultPrintTicketAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_PrintSchema[] = {
        { "get_capabilities_async", reinterpret_cast<PyCFunction>(PrintSchema_GetCapabilitiesAsync), METH_VARARGS, nullptr },
        { "get_default_print_ticket_async", reinterpret_cast<PyCFunction>(PrintSchema_GetDefaultPrintTicketAsync), METH_VARARGS, nullptr },
        { "merge_and_validate_with_default_print_ticket_async", reinterpret_cast<PyCFunction>(PrintSchema_MergeAndValidateWithDefaultPrintTicketAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PrintSchema, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PrintSchema), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_PrintSchema[] = {
        { }};

    static PyType_Slot _type_slots_PrintSchema[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_PrintSchema) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrintSchema) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PrintSchema) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PrintSchema) },
        { }};

    static PyType_Spec type_spec_PrintSchema = {
        "winrt._winrt_windows_devices_printers.PrintSchema",
        sizeof(py::wrapper::Windows::Devices::Printers::PrintSchema),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PrintSchema};

    // ----- VirtualPrinterInstallationParameters class --------------------

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

        auto arg_count = PyTuple_GET_SIZE(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Devices::Printers::VirtualPrinterInstallationParameters instance{};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_VirtualPrinterInstallationParameters(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* VirtualPrinterInstallationParameters_get_PrinterUri(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrinterUri");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrinterUri();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterInstallationParameters_put_PrinterUri(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrinterUri");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(arg);

            {
                auto _gil = release_gil();
                self->obj.PrinterUri(param0);
            }

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

    static PyObject* VirtualPrinterInstallationParameters_get_PrinterName(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrinterName");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrinterName();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterInstallationParameters_put_PrinterName(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrinterName");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.PrinterName(param0);
            }

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

    static PyObject* VirtualPrinterInstallationParameters_get_PrintDeviceResourcesPackageRelativeFilePath(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrintDeviceResourcesPackageRelativeFilePath");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrintDeviceResourcesPackageRelativeFilePath();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterInstallationParameters_put_PrintDeviceResourcesPackageRelativeFilePath(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrintDeviceResourcesPackageRelativeFilePath");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.PrintDeviceResourcesPackageRelativeFilePath(param0);
            }

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

    static PyObject* VirtualPrinterInstallationParameters_get_PrintDeviceCapabilitiesPackageRelativeFilePath(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrintDeviceCapabilitiesPackageRelativeFilePath");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PrintDeviceCapabilitiesPackageRelativeFilePath();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterInstallationParameters_put_PrintDeviceCapabilitiesPackageRelativeFilePath(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PrintDeviceCapabilitiesPackageRelativeFilePath");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.PrintDeviceCapabilitiesPackageRelativeFilePath(param0);
            }

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

    static PyObject* VirtualPrinterInstallationParameters_get_PreferredInputFormat(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PreferredInputFormat");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.PreferredInputFormat();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterInstallationParameters_put_PreferredInputFormat(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"PreferredInputFormat");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

            auto param0 = py::convert_to<winrt::Windows::Devices::Printers::VirtualPrinterPreferredInputFormat>(arg);

            {
                auto _gil = release_gil();
                self->obj.PreferredInputFormat(param0);
            }

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

    static PyObject* VirtualPrinterInstallationParameters_get_EntryPoint(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"EntryPoint");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.EntryPoint();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterInstallationParameters_put_EntryPoint(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"EntryPoint");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.EntryPoint(param0);
            }

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

    static PyObject* VirtualPrinterInstallationParameters_get_OutputFileExtensions(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"OutputFileExtensions");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.OutputFileExtensions();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterInstallationParameters_get_SupportedInputFormats(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationParameters", L"SupportedInputFormats");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SupportedInputFormats();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_VirtualPrinterInstallationParameters[] = {
        { "_assign_array_", _assign_array_VirtualPrinterInstallationParameters, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_VirtualPrinterInstallationParameters), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_VirtualPrinterInstallationParameters[] = {
        { "printer_uri", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_PrinterUri), reinterpret_cast<setter>(VirtualPrinterInstallationParameters_put_PrinterUri), nullptr, nullptr },
        { "printer_name", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_PrinterName), reinterpret_cast<setter>(VirtualPrinterInstallationParameters_put_PrinterName), nullptr, nullptr },
        { "print_device_resources_package_relative_file_path", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_PrintDeviceResourcesPackageRelativeFilePath), reinterpret_cast<setter>(VirtualPrinterInstallationParameters_put_PrintDeviceResourcesPackageRelativeFilePath), nullptr, nullptr },
        { "print_device_capabilities_package_relative_file_path", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_PrintDeviceCapabilitiesPackageRelativeFilePath), reinterpret_cast<setter>(VirtualPrinterInstallationParameters_put_PrintDeviceCapabilitiesPackageRelativeFilePath), nullptr, nullptr },
        { "preferred_input_format", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_PreferredInputFormat), reinterpret_cast<setter>(VirtualPrinterInstallationParameters_put_PreferredInputFormat), nullptr, nullptr },
        { "entry_point", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_EntryPoint), reinterpret_cast<setter>(VirtualPrinterInstallationParameters_put_EntryPoint), nullptr, nullptr },
        { "output_file_extensions", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_OutputFileExtensions), nullptr, nullptr, nullptr },
        { "supported_input_formats", reinterpret_cast<getter>(VirtualPrinterInstallationParameters_get_SupportedInputFormats), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_VirtualPrinterInstallationParameters[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_VirtualPrinterInstallationParameters) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_VirtualPrinterInstallationParameters) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_VirtualPrinterInstallationParameters) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_VirtualPrinterInstallationParameters) },
        { }};

    static PyType_Spec type_spec_VirtualPrinterInstallationParameters = {
        "winrt._winrt_windows_devices_printers.VirtualPrinterInstallationParameters",
        sizeof(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationParameters),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VirtualPrinterInstallationParameters};

    // ----- VirtualPrinterInstallationResult class --------------------

    static PyObject* _new_VirtualPrinterInstallationResult(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::VirtualPrinterInstallationResult>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::VirtualPrinterInstallationResult>::type_name);
        return nullptr;
    }

    static void _dealloc_VirtualPrinterInstallationResult(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationResult* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* VirtualPrinterInstallationResult_get_ExtendedError(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationResult* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationResult", L"ExtendedError");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.ExtendedError();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterInstallationResult_get_Status(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationResult* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterInstallationResult", L"Status");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Status();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_VirtualPrinterInstallationResult[] = {
        { "_assign_array_", _assign_array_VirtualPrinterInstallationResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_VirtualPrinterInstallationResult), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_VirtualPrinterInstallationResult[] = {
        { "extended_error", reinterpret_cast<getter>(VirtualPrinterInstallationResult_get_ExtendedError), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(VirtualPrinterInstallationResult_get_Status), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_VirtualPrinterInstallationResult[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_VirtualPrinterInstallationResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_VirtualPrinterInstallationResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_VirtualPrinterInstallationResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_VirtualPrinterInstallationResult) },
        { }};

    static PyType_Spec type_spec_VirtualPrinterInstallationResult = {
        "winrt._winrt_windows_devices_printers.VirtualPrinterInstallationResult",
        sizeof(py::wrapper::Windows::Devices::Printers::VirtualPrinterInstallationResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VirtualPrinterInstallationResult};

    // ----- VirtualPrinterManager class --------------------

    static PyObject* _new_VirtualPrinterManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Printers::VirtualPrinterManager>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Printers::VirtualPrinterManager>::type_name);
        return nullptr;
    }

    static PyObject* VirtualPrinterManager_FindAllVirtualPrinters(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"FindAllVirtualPrinters", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::FindAllVirtualPrinters();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_FindAllVirtualPrinters2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"FindAllVirtualPrinters", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::FindAllVirtualPrinters(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_InstallVirtualPrinterAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"InstallVirtualPrinterAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::VirtualPrinterInstallationParameters>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::InstallVirtualPrinterAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_InstallVirtualPrinterAsync2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 2)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"InstallVirtualPrinterAsync", 2);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::VirtualPrinterInstallationParameters>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::InstallVirtualPrinterAsync(param0, param1);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_InstallVirtualPrinterForAllUsersAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"InstallVirtualPrinterForAllUsersAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::VirtualPrinterInstallationParameters>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::InstallVirtualPrinterForAllUsersAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_InstallVirtualPrinterForAllUsersAsync2(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 2)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"InstallVirtualPrinterForAllUsersAsync", 2);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Printers::VirtualPrinterInstallationParameters>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::InstallVirtualPrinterForAllUsersAsync(param0, param1);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_RemoveVirtualPrinterAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"RemoveVirtualPrinterAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::RemoveVirtualPrinterAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VirtualPrinterManager_RemoveVirtualPrinterForAllUsersAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Printers.VirtualPrinterManager", L"RemoveVirtualPrinterForAllUsersAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Printers::VirtualPrinterManager::RemoveVirtualPrinterForAllUsersAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_VirtualPrinterManager[] = {
        { }};

    static PyGetSetDef _getset_VirtualPrinterManager[] = {
        { }};

    static PyType_Slot _type_slots_VirtualPrinterManager[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_VirtualPrinterManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_VirtualPrinterManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_VirtualPrinterManager) },
        { }};

    static PyType_Spec type_spec_VirtualPrinterManager = {
        "winrt._winrt_windows_devices_printers.VirtualPrinterManager",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VirtualPrinterManager};

    static PyGetSetDef getset_VirtualPrinterManager_Static[] = {
        { }};

    static PyMethodDef methods_VirtualPrinterManager_Static[] = {
        { "find_all_virtual_printers", reinterpret_cast<PyCFunction>(VirtualPrinterManager_FindAllVirtualPrinters), METH_VARARGS, nullptr },
        { "find_all_virtual_printers2", reinterpret_cast<PyCFunction>(VirtualPrinterManager_FindAllVirtualPrinters2), METH_VARARGS, nullptr },
        { "install_virtual_printer_async", reinterpret_cast<PyCFunction>(VirtualPrinterManager_InstallVirtualPrinterAsync), METH_VARARGS, nullptr },
        { "install_virtual_printer_async2", reinterpret_cast<PyCFunction>(VirtualPrinterManager_InstallVirtualPrinterAsync2), METH_VARARGS, nullptr },
        { "install_virtual_printer_for_all_users_async", reinterpret_cast<PyCFunction>(VirtualPrinterManager_InstallVirtualPrinterForAllUsersAsync), METH_VARARGS, nullptr },
        { "install_virtual_printer_for_all_users_async2", reinterpret_cast<PyCFunction>(VirtualPrinterManager_InstallVirtualPrinterForAllUsersAsync2), METH_VARARGS, nullptr },
        { "remove_virtual_printer_async", reinterpret_cast<PyCFunction>(VirtualPrinterManager_RemoveVirtualPrinterAsync), METH_VARARGS, nullptr },
        { "remove_virtual_printer_for_all_users_async", reinterpret_cast<PyCFunction>(VirtualPrinterManager_RemoveVirtualPrinterForAllUsersAsync), METH_VARARGS, nullptr },
        { }};

    static PyType_Slot type_slots_VirtualPrinterManager_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_VirtualPrinterManager_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_VirtualPrinterManager_Static) },
        { }
    };

    static PyType_Spec type_spec_VirtualPrinterManager_Static = {
        "winrt._winrt_windows_devices_printers.VirtualPrinterManager_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_VirtualPrinterManager_Static};

    // ----- VirtualPrinterSupportedFormat class --------------------

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

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

                winrt::Windows::Devices::Printers::VirtualPrinterSupportedFormat instance{param0, param1};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_VirtualPrinterSupportedFormat(py::wrapper::Windows::Devices::Printers::VirtualPrinterSupportedFormat* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* VirtualPrinterSupportedFormat_get_MaxSupportedVersion(py::wrapper::Windows::Devices::Printers::VirtualPrinterSupportedFormat* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterSupportedFormat", L"MaxSupportedVersion");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.MaxSupportedVersion();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterSupportedFormat_put_MaxSupportedVersion(py::wrapper::Windows::Devices::Printers::VirtualPrinterSupportedFormat* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterSupportedFormat", L"MaxSupportedVersion");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.MaxSupportedVersion(param0);
            }

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

    static PyObject* VirtualPrinterSupportedFormat_get_ContentType(py::wrapper::Windows::Devices::Printers::VirtualPrinterSupportedFormat* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterSupportedFormat", L"ContentType");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.ContentType();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int VirtualPrinterSupportedFormat_put_ContentType(py::wrapper::Windows::Devices::Printers::VirtualPrinterSupportedFormat* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Printers.VirtualPrinterSupportedFormat", L"ContentType");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return -1;
            }

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

            {
                auto _gil = release_gil();
                self->obj.ContentType(param0);
            }

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

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

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

    static PyMethodDef _methods_VirtualPrinterSupportedFormat[] = {
        { "_assign_array_", _assign_array_VirtualPrinterSupportedFormat, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_VirtualPrinterSupportedFormat), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_VirtualPrinterSupportedFormat[] = {
        { "max_supported_version", reinterpret_cast<getter>(VirtualPrinterSupportedFormat_get_MaxSupportedVersion), reinterpret_cast<setter>(VirtualPrinterSupportedFormat_put_MaxSupportedVersion), nullptr, nullptr },
        { "content_type", reinterpret_cast<getter>(VirtualPrinterSupportedFormat_get_ContentType), reinterpret_cast<setter>(VirtualPrinterSupportedFormat_put_ContentType), nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_VirtualPrinterSupportedFormat[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_VirtualPrinterSupportedFormat) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_VirtualPrinterSupportedFormat) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_VirtualPrinterSupportedFormat) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_VirtualPrinterSupportedFormat) },
        { }};

    static PyType_Spec type_spec_VirtualPrinterSupportedFormat = {
        "winrt._winrt_windows_devices_printers.VirtualPrinterSupportedFormat",
        sizeof(py::wrapper::Windows::Devices::Printers::VirtualPrinterSupportedFormat),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VirtualPrinterSupportedFormat};

    // ----- Windows.Devices.Printers Initialization --------------------

    PyDoc_STRVAR(module_doc, "Windows.Devices.Printers");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_windows_devices_printers",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Windows::Devices::Printers

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

    if (py::import_winrt_runtime() == -1)
    {
        return nullptr;
    }

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

    if (!module)
    {
        return nullptr;
    }

    auto inspectable_meta_type = py::get_inspectable_meta_type();
    if (!inspectable_meta_type)
    {
        return nullptr;
    }

    auto object_type = py::get_object_type();
    if (!object_type)
    {
        return nullptr;
    }

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

    if (!object_bases)
    {
        return nullptr;
    }

    py::pytype_handle IppAttributeError_type{py::register_python_type(module.get(), &type_spec_IppAttributeError, object_bases.get(), inspectable_meta_type)};
    if (!IppAttributeError_type)
    {
        return nullptr;
    }

    py::pyobj_handle IppAttributeValue_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!IppAttributeValue_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_IppAttributeValue_Static{PyType_FromSpecWithBases(&type_spec_IppAttributeValue_Static, IppAttributeValue_Static_bases.get())};
    if (!type_IppAttributeValue_Static)
    {
        return nullptr;
    }

    py::pytype_handle IppAttributeValue_type{py::register_python_type(module.get(), &type_spec_IppAttributeValue, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_IppAttributeValue_Static.get()))};
    if (!IppAttributeValue_type)
    {
        return nullptr;
    }

    py::pytype_handle IppIntegerRange_type{py::register_python_type(module.get(), &type_spec_IppIntegerRange, object_bases.get(), inspectable_meta_type)};
    if (!IppIntegerRange_type)
    {
        return nullptr;
    }

    py::pyobj_handle IppPrintDevice_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!IppPrintDevice_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_IppPrintDevice_Static{PyType_FromSpecWithBases(&type_spec_IppPrintDevice_Static, IppPrintDevice_Static_bases.get())};
    if (!type_IppPrintDevice_Static)
    {
        return nullptr;
    }

    py::pytype_handle IppPrintDevice_type{py::register_python_type(module.get(), &type_spec_IppPrintDevice, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_IppPrintDevice_Static.get()))};
    if (!IppPrintDevice_type)
    {
        return nullptr;
    }

    py::pytype_handle IppResolution_type{py::register_python_type(module.get(), &type_spec_IppResolution, object_bases.get(), inspectable_meta_type)};
    if (!IppResolution_type)
    {
        return nullptr;
    }

    py::pytype_handle IppSetAttributesResult_type{py::register_python_type(module.get(), &type_spec_IppSetAttributesResult, object_bases.get(), inspectable_meta_type)};
    if (!IppSetAttributesResult_type)
    {
        return nullptr;
    }

    py::pytype_handle IppTextWithLanguage_type{py::register_python_type(module.get(), &type_spec_IppTextWithLanguage, object_bases.get(), inspectable_meta_type)};
    if (!IppTextWithLanguage_type)
    {
        return nullptr;
    }

    py::pytype_handle PageConfigurationSettings_type{py::register_python_type(module.get(), &type_spec_PageConfigurationSettings, object_bases.get(), inspectable_meta_type)};
    if (!PageConfigurationSettings_type)
    {
        return nullptr;
    }

    py::pytype_handle PdlPassthroughProvider_type{py::register_python_type(module.get(), &type_spec_PdlPassthroughProvider, object_bases.get(), inspectable_meta_type)};
    if (!PdlPassthroughProvider_type)
    {
        return nullptr;
    }

    py::pytype_handle PdlPassthroughTarget_type{py::register_python_type(module.get(), &type_spec_PdlPassthroughTarget, object_bases.get(), inspectable_meta_type)};
    if (!PdlPassthroughTarget_type)
    {
        return nullptr;
    }

    py::pyobj_handle Print3DDevice_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!Print3DDevice_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_Print3DDevice_Static{PyType_FromSpecWithBases(&type_spec_Print3DDevice_Static, Print3DDevice_Static_bases.get())};
    if (!type_Print3DDevice_Static)
    {
        return nullptr;
    }

    py::pytype_handle Print3DDevice_type{py::register_python_type(module.get(), &type_spec_Print3DDevice, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_Print3DDevice_Static.get()))};
    if (!Print3DDevice_type)
    {
        return nullptr;
    }

    py::pytype_handle PrintSchema_type{py::register_python_type(module.get(), &type_spec_PrintSchema, object_bases.get(), inspectable_meta_type)};
    if (!PrintSchema_type)
    {
        return nullptr;
    }

    py::pytype_handle VirtualPrinterInstallationParameters_type{py::register_python_type(module.get(), &type_spec_VirtualPrinterInstallationParameters, object_bases.get(), inspectable_meta_type)};
    if (!VirtualPrinterInstallationParameters_type)
    {
        return nullptr;
    }

    py::pytype_handle VirtualPrinterInstallationResult_type{py::register_python_type(module.get(), &type_spec_VirtualPrinterInstallationResult, object_bases.get(), inspectable_meta_type)};
    if (!VirtualPrinterInstallationResult_type)
    {
        return nullptr;
    }

    py::pyobj_handle VirtualPrinterManager_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!VirtualPrinterManager_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_VirtualPrinterManager_Static{PyType_FromSpecWithBases(&type_spec_VirtualPrinterManager_Static, VirtualPrinterManager_Static_bases.get())};
    if (!type_VirtualPrinterManager_Static)
    {
        return nullptr;
    }

    py::pytype_handle VirtualPrinterManager_type{py::register_python_type(module.get(), &type_spec_VirtualPrinterManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_VirtualPrinterManager_Static.get()))};
    if (!VirtualPrinterManager_type)
    {
        return nullptr;
    }

    py::pytype_handle VirtualPrinterSupportedFormat_type{py::register_python_type(module.get(), &type_spec_VirtualPrinterSupportedFormat, object_bases.get(), inspectable_meta_type)};
    if (!VirtualPrinterSupportedFormat_type)
    {
        return nullptr;
    }


    return module.detach();
}
