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

#include "py.Windows.Web.AtomPub.h"


namespace py::cpp::Windows::Web::AtomPub
{
    // ----- AtomPubClient class --------------------

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::PasswordCredential>(args, 0);

                winrt::Windows::Web::AtomPub::AtomPubClient instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Web::AtomPub::AtomPubClient 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_AtomPubClient(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AtomPubClient_CancelAsyncOperations(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"CancelAsyncOperations", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* AtomPubClient_CreateMediaResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"CreateMediaResourceAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::Storage::Streams::IInputStream>(args, 3);

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

    static PyObject* AtomPubClient_CreateResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"CreateResourceAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationItem>(args, 2);

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

    static PyObject* AtomPubClient_DeleteResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"DeleteResourceAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AtomPubClient_DeleteResourceItemAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"DeleteResourceItemAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationItem>(args, 0);

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

    static PyObject* AtomPubClient_RetrieveFeedAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"RetrieveFeedAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AtomPubClient_RetrieveMediaResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"RetrieveMediaResourceAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AtomPubClient_RetrieveResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"RetrieveResourceAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AtomPubClient_RetrieveServiceDocumentAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"RetrieveServiceDocumentAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

    static PyObject* AtomPubClient_SetRequestHeader(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"SetRequestHeader", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

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

    static PyObject* AtomPubClient_UpdateMediaResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"UpdateMediaResourceAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Storage::Streams::IInputStream>(args, 2);

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

    static PyObject* AtomPubClient_UpdateResourceAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"UpdateResourceAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationItem>(args, 1);

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

    static PyObject* AtomPubClient_UpdateResourceItemAsync(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.AtomPubClient", L"UpdateResourceItemAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationItem>(args, 0);

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

    static PyObject* AtomPubClient_get_Timeout(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"Timeout"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AtomPubClient_put_Timeout(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"Timeout"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* AtomPubClient_get_ServerCredential(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"ServerCredential"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AtomPubClient_put_ServerCredential(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"ServerCredential"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Security::Credentials::PasswordCredential>(arg);

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

    static PyObject* AtomPubClient_get_ProxyCredential(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"ProxyCredential"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AtomPubClient_put_ProxyCredential(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"ProxyCredential"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Security::Credentials::PasswordCredential>(arg);

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

    static PyObject* AtomPubClient_get_MaxResponseBufferSize(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"MaxResponseBufferSize"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AtomPubClient_put_MaxResponseBufferSize(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"MaxResponseBufferSize"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* AtomPubClient_get_BypassCacheOnRetrieve(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"BypassCacheOnRetrieve"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int AtomPubClient_put_BypassCacheOnRetrieve(py::wrapper::Windows::Web::AtomPub::AtomPubClient* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.AtomPubClient", L"BypassCacheOnRetrieve"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

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

    static PyObject* _from_AtomPubClient(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::Web::AtomPub::AtomPubClient>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AtomPubClient[] = {
        { "cancel_async_operations", reinterpret_cast<PyCFunction>(AtomPubClient_CancelAsyncOperations), METH_VARARGS, nullptr },
        { "create_media_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_CreateMediaResourceAsync), METH_VARARGS, nullptr },
        { "create_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_CreateResourceAsync), METH_VARARGS, nullptr },
        { "delete_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_DeleteResourceAsync), METH_VARARGS, nullptr },
        { "delete_resource_item_async", reinterpret_cast<PyCFunction>(AtomPubClient_DeleteResourceItemAsync), METH_VARARGS, nullptr },
        { "retrieve_feed_async", reinterpret_cast<PyCFunction>(AtomPubClient_RetrieveFeedAsync), METH_VARARGS, nullptr },
        { "retrieve_media_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_RetrieveMediaResourceAsync), METH_VARARGS, nullptr },
        { "retrieve_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_RetrieveResourceAsync), METH_VARARGS, nullptr },
        { "retrieve_service_document_async", reinterpret_cast<PyCFunction>(AtomPubClient_RetrieveServiceDocumentAsync), METH_VARARGS, nullptr },
        { "set_request_header", reinterpret_cast<PyCFunction>(AtomPubClient_SetRequestHeader), METH_VARARGS, nullptr },
        { "update_media_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_UpdateMediaResourceAsync), METH_VARARGS, nullptr },
        { "update_resource_async", reinterpret_cast<PyCFunction>(AtomPubClient_UpdateResourceAsync), METH_VARARGS, nullptr },
        { "update_resource_item_async", reinterpret_cast<PyCFunction>(AtomPubClient_UpdateResourceItemAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_AtomPubClient, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AtomPubClient), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AtomPubClient[] = {
        { "timeout", reinterpret_cast<getter>(AtomPubClient_get_Timeout), reinterpret_cast<setter>(AtomPubClient_put_Timeout), nullptr, nullptr },
        { "server_credential", reinterpret_cast<getter>(AtomPubClient_get_ServerCredential), reinterpret_cast<setter>(AtomPubClient_put_ServerCredential), nullptr, nullptr },
        { "proxy_credential", reinterpret_cast<getter>(AtomPubClient_get_ProxyCredential), reinterpret_cast<setter>(AtomPubClient_put_ProxyCredential), nullptr, nullptr },
        { "max_response_buffer_size", reinterpret_cast<getter>(AtomPubClient_get_MaxResponseBufferSize), reinterpret_cast<setter>(AtomPubClient_put_MaxResponseBufferSize), nullptr, nullptr },
        { "bypass_cache_on_retrieve", reinterpret_cast<getter>(AtomPubClient_get_BypassCacheOnRetrieve), reinterpret_cast<setter>(AtomPubClient_put_BypassCacheOnRetrieve), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AtomPubClient[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AtomPubClient) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AtomPubClient) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AtomPubClient) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AtomPubClient) },
        { },
    };

    static PyType_Spec type_spec_AtomPubClient =
    {
        "winrt._winrt_windows_web_atompub.AtomPubClient",
        sizeof(py::wrapper::Windows::Web::AtomPub::AtomPubClient),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AtomPubClient
    };

    // ----- ResourceCollection class --------------------

    static PyObject* _new_ResourceCollection(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Web::AtomPub::ResourceCollection>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Web::AtomPub::ResourceCollection>::type_name);
        return nullptr;
    }

    static void _dealloc_ResourceCollection(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ResourceCollection_GetXmlDocument(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.ResourceCollection", L"GetXmlDocument", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationFormat>(args, 0);

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

    static PyObject* ResourceCollection_get_Accepts(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"Accepts"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ResourceCollection_get_Categories(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"Categories"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ResourceCollection_get_Title(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"Title"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ResourceCollection_get_Uri(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"Uri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ResourceCollection_get_BaseUri(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"BaseUri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ResourceCollection_put_BaseUri(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"BaseUri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ResourceCollection_get_NodeValue(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"NodeValue"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ResourceCollection_put_NodeValue(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"NodeValue"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ResourceCollection_get_NodeNamespace(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"NodeNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ResourceCollection_put_NodeNamespace(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"NodeNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ResourceCollection_get_NodeName(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"NodeName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ResourceCollection_put_NodeName(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"NodeName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ResourceCollection_get_Language(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ResourceCollection_put_Language(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ResourceCollection_get_AttributeExtensions(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"AttributeExtensions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ResourceCollection_get_ElementExtensions(py::wrapper::Windows::Web::AtomPub::ResourceCollection* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ResourceCollection", L"ElementExtensions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_ResourceCollection(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::Web::AtomPub::ResourceCollection>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ResourceCollection[] = {
        { "get_xml_document", reinterpret_cast<PyCFunction>(ResourceCollection_GetXmlDocument), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ResourceCollection, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ResourceCollection), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ResourceCollection[] = {
        { "accepts", reinterpret_cast<getter>(ResourceCollection_get_Accepts), nullptr, nullptr, nullptr },
        { "categories", reinterpret_cast<getter>(ResourceCollection_get_Categories), nullptr, nullptr, nullptr },
        { "title", reinterpret_cast<getter>(ResourceCollection_get_Title), nullptr, nullptr, nullptr },
        { "uri", reinterpret_cast<getter>(ResourceCollection_get_Uri), nullptr, nullptr, nullptr },
        { "base_uri", reinterpret_cast<getter>(ResourceCollection_get_BaseUri), reinterpret_cast<setter>(ResourceCollection_put_BaseUri), nullptr, nullptr },
        { "node_value", reinterpret_cast<getter>(ResourceCollection_get_NodeValue), reinterpret_cast<setter>(ResourceCollection_put_NodeValue), nullptr, nullptr },
        { "node_namespace", reinterpret_cast<getter>(ResourceCollection_get_NodeNamespace), reinterpret_cast<setter>(ResourceCollection_put_NodeNamespace), nullptr, nullptr },
        { "node_name", reinterpret_cast<getter>(ResourceCollection_get_NodeName), reinterpret_cast<setter>(ResourceCollection_put_NodeName), nullptr, nullptr },
        { "language", reinterpret_cast<getter>(ResourceCollection_get_Language), reinterpret_cast<setter>(ResourceCollection_put_Language), nullptr, nullptr },
        { "attribute_extensions", reinterpret_cast<getter>(ResourceCollection_get_AttributeExtensions), nullptr, nullptr, nullptr },
        { "element_extensions", reinterpret_cast<getter>(ResourceCollection_get_ElementExtensions), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ResourceCollection[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ResourceCollection) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ResourceCollection) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ResourceCollection) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ResourceCollection) },
        { },
    };

    static PyType_Spec type_spec_ResourceCollection =
    {
        "winrt._winrt_windows_web_atompub.ResourceCollection",
        sizeof(py::wrapper::Windows::Web::AtomPub::ResourceCollection),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ResourceCollection
    };

    // ----- ServiceDocument class --------------------

    static PyObject* _new_ServiceDocument(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Web::AtomPub::ServiceDocument>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Web::AtomPub::ServiceDocument>::type_name);
        return nullptr;
    }

    static void _dealloc_ServiceDocument(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ServiceDocument_GetXmlDocument(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.ServiceDocument", L"GetXmlDocument", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationFormat>(args, 0);

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

    static PyObject* ServiceDocument_get_Workspaces(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"Workspaces"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ServiceDocument_get_NodeValue(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"NodeValue"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ServiceDocument_put_NodeValue(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"NodeValue"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ServiceDocument_get_NodeNamespace(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"NodeNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ServiceDocument_put_NodeNamespace(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"NodeNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ServiceDocument_get_NodeName(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"NodeName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ServiceDocument_put_NodeName(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"NodeName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ServiceDocument_get_Language(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ServiceDocument_put_Language(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ServiceDocument_get_BaseUri(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"BaseUri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ServiceDocument_put_BaseUri(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"BaseUri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ServiceDocument_get_AttributeExtensions(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"AttributeExtensions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ServiceDocument_get_ElementExtensions(py::wrapper::Windows::Web::AtomPub::ServiceDocument* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.ServiceDocument", L"ElementExtensions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_ServiceDocument(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::Web::AtomPub::ServiceDocument>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ServiceDocument[] = {
        { "get_xml_document", reinterpret_cast<PyCFunction>(ServiceDocument_GetXmlDocument), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ServiceDocument, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ServiceDocument), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ServiceDocument[] = {
        { "workspaces", reinterpret_cast<getter>(ServiceDocument_get_Workspaces), nullptr, nullptr, nullptr },
        { "node_value", reinterpret_cast<getter>(ServiceDocument_get_NodeValue), reinterpret_cast<setter>(ServiceDocument_put_NodeValue), nullptr, nullptr },
        { "node_namespace", reinterpret_cast<getter>(ServiceDocument_get_NodeNamespace), reinterpret_cast<setter>(ServiceDocument_put_NodeNamespace), nullptr, nullptr },
        { "node_name", reinterpret_cast<getter>(ServiceDocument_get_NodeName), reinterpret_cast<setter>(ServiceDocument_put_NodeName), nullptr, nullptr },
        { "language", reinterpret_cast<getter>(ServiceDocument_get_Language), reinterpret_cast<setter>(ServiceDocument_put_Language), nullptr, nullptr },
        { "base_uri", reinterpret_cast<getter>(ServiceDocument_get_BaseUri), reinterpret_cast<setter>(ServiceDocument_put_BaseUri), nullptr, nullptr },
        { "attribute_extensions", reinterpret_cast<getter>(ServiceDocument_get_AttributeExtensions), nullptr, nullptr, nullptr },
        { "element_extensions", reinterpret_cast<getter>(ServiceDocument_get_ElementExtensions), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ServiceDocument[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ServiceDocument) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ServiceDocument) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ServiceDocument) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ServiceDocument) },
        { },
    };

    static PyType_Spec type_spec_ServiceDocument =
    {
        "winrt._winrt_windows_web_atompub.ServiceDocument",
        sizeof(py::wrapper::Windows::Web::AtomPub::ServiceDocument),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ServiceDocument
    };

    // ----- Workspace class --------------------

    static PyObject* _new_Workspace(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Web::AtomPub::Workspace>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Web::AtomPub::Workspace>::type_name);
        return nullptr;
    }

    static void _dealloc_Workspace(py::wrapper::Windows::Web::AtomPub::Workspace* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* Workspace_GetXmlDocument(py::wrapper::Windows::Web::AtomPub::Workspace* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Web.AtomPub.Workspace", L"GetXmlDocument", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Web::Syndication::SyndicationFormat>(args, 0);

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

    static PyObject* Workspace_get_Collections(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"Collections"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* Workspace_get_Title(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"Title"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* Workspace_get_NodeValue(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"NodeValue"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int Workspace_put_NodeValue(py::wrapper::Windows::Web::AtomPub::Workspace* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"NodeValue"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* Workspace_get_NodeNamespace(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"NodeNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int Workspace_put_NodeNamespace(py::wrapper::Windows::Web::AtomPub::Workspace* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"NodeNamespace"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* Workspace_get_NodeName(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"NodeName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int Workspace_put_NodeName(py::wrapper::Windows::Web::AtomPub::Workspace* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"NodeName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* Workspace_get_Language(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int Workspace_put_Language(py::wrapper::Windows::Web::AtomPub::Workspace* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* Workspace_get_BaseUri(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"BaseUri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int Workspace_put_BaseUri(py::wrapper::Windows::Web::AtomPub::Workspace* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"BaseUri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* Workspace_get_AttributeExtensions(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"AttributeExtensions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* Workspace_get_ElementExtensions(py::wrapper::Windows::Web::AtomPub::Workspace* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Web.AtomPub.Workspace", L"ElementExtensions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_Workspace(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::Web::AtomPub::Workspace>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_Workspace[] = {
        { "get_xml_document", reinterpret_cast<PyCFunction>(Workspace_GetXmlDocument), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_Workspace, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_Workspace), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_Workspace[] = {
        { "collections", reinterpret_cast<getter>(Workspace_get_Collections), nullptr, nullptr, nullptr },
        { "title", reinterpret_cast<getter>(Workspace_get_Title), nullptr, nullptr, nullptr },
        { "node_value", reinterpret_cast<getter>(Workspace_get_NodeValue), reinterpret_cast<setter>(Workspace_put_NodeValue), nullptr, nullptr },
        { "node_namespace", reinterpret_cast<getter>(Workspace_get_NodeNamespace), reinterpret_cast<setter>(Workspace_put_NodeNamespace), nullptr, nullptr },
        { "node_name", reinterpret_cast<getter>(Workspace_get_NodeName), reinterpret_cast<setter>(Workspace_put_NodeName), nullptr, nullptr },
        { "language", reinterpret_cast<getter>(Workspace_get_Language), reinterpret_cast<setter>(Workspace_put_Language), nullptr, nullptr },
        { "base_uri", reinterpret_cast<getter>(Workspace_get_BaseUri), reinterpret_cast<setter>(Workspace_put_BaseUri), nullptr, nullptr },
        { "attribute_extensions", reinterpret_cast<getter>(Workspace_get_AttributeExtensions), nullptr, nullptr, nullptr },
        { "element_extensions", reinterpret_cast<getter>(Workspace_get_ElementExtensions), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_Workspace[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_Workspace) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Workspace) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_Workspace) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_Workspace) },
        { },
    };

    static PyType_Spec type_spec_Workspace =
    {
        "winrt._winrt_windows_web_atompub.Workspace",
        sizeof(py::wrapper::Windows::Web::AtomPub::Workspace),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_Workspace
    };

    // ----- Windows.Web.AtomPub Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Web::AtomPub");


    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winrt_windows_web_atompub",
           module_doc,
           0,
           nullptr,
           nullptr,
           nullptr,
           nullptr,
           nullptr};

} // py::cpp::Windows::Web::AtomPub

PyMODINIT_FUNC PyInit__winrt_windows_web_atompub(void) noexcept
{
    using namespace py::cpp::Windows::Web::AtomPub;

    if (py::import_winrt_runtime() == -1)
    {
        return nullptr;
    }

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

    if (!module)
    {
        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;
    }

    if (py::register_python_type(module.get(), &type_spec_AtomPubClient, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_ResourceCollection, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_ServiceDocument, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_Workspace, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }


    return module.detach();
}
