/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtNetwork.h"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNetwork/qrestreply.sip"
#include <qrestreply.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNetwork/qnetworkreply.sip"
#include <qnetworkreply.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"
#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"
#line 30 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"
#line 27 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_std_optional.sip"
#include <optional>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"
#line 60 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qjsondocument.sip"
#include <qjsondocument.h>
#line 45 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qjsonparseerror.sip"
#include <qjsonparseerror.h>
#line 48 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQRestReply.cpp"


PyDoc_STRVAR(doc_QRestReply_swap, "swap(self, other: QRestReply)");

extern "C" {static PyObject *meth_QRestReply_swap(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_swap(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QRestReply* a0;
        ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QRestReply, &sipCpp, sipType_QRestReply, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_swap, doc_QRestReply_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_networkReply, "networkReply(self) -> QNetworkReply|None");

extern "C" {static PyObject *meth_QRestReply_networkReply(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_networkReply(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            ::QNetworkReply*sipRes;

            sipRes = sipCpp->networkReply();

            return sipConvertFromType(sipRes, sipType_QNetworkReply, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_networkReply, doc_QRestReply_networkReply);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_readJson, "readJson(self, error: QJsonParseError|None = None) -> QJsonDocument|None");

extern "C" {static PyObject *meth_QRestReply_readJson(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QRestReply_readJson(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QJsonParseError* a0 = 0;
        ::QRestReply *sipCpp;

        static const char *sipKwdList[] = {
            sipName_error,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J8", &sipSelf, sipType_QRestReply, &sipCpp, sipType_QJsonParseError, &a0))
        {
            std::optional< ::QJsonDocument>*sipRes;

            sipRes = new std::optional< ::QJsonDocument>(sipCpp->readJson(a0));

            return sipConvertFromNewType(sipRes, sipType_std_optional_0100QJsonDocument, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_readJson, doc_QRestReply_readJson);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_readBody, "readBody(self) -> QByteArray");

extern "C" {static PyObject *meth_QRestReply_readBody(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_readBody(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            ::QByteArray*sipRes;

            sipRes = new ::QByteArray(sipCpp->readBody());

            return sipConvertFromNewType(sipRes, sipType_QByteArray, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_readBody, doc_QRestReply_readBody);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_readText, "readText(self) -> str");

extern "C" {static PyObject *meth_QRestReply_readText(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_readText(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->readText());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_readText, doc_QRestReply_readText);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_isSuccess, "isSuccess(self) -> bool");

extern "C" {static PyObject *meth_QRestReply_isSuccess(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_isSuccess(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isSuccess();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_isSuccess, doc_QRestReply_isSuccess);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_httpStatus, "httpStatus(self) -> int");

extern "C" {static PyObject *meth_QRestReply_httpStatus(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_httpStatus(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->httpStatus();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_httpStatus, doc_QRestReply_httpStatus);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_isHttpStatusSuccess, "isHttpStatusSuccess(self) -> bool");

extern "C" {static PyObject *meth_QRestReply_isHttpStatusSuccess(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_isHttpStatusSuccess(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isHttpStatusSuccess();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_isHttpStatusSuccess, doc_QRestReply_isHttpStatusSuccess);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_hasError, "hasError(self) -> bool");

extern "C" {static PyObject *meth_QRestReply_hasError(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_hasError(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->hasError();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_hasError, doc_QRestReply_hasError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_error, "error(self) -> QNetworkReply.NetworkError");

extern "C" {static PyObject *meth_QRestReply_error(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_error(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            ::QNetworkReply::NetworkError sipRes;

            sipRes = sipCpp->error();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QNetworkReply_NetworkError);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_error, doc_QRestReply_error);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRestReply_errorString, "errorString(self) -> str");

extern "C" {static PyObject *meth_QRestReply_errorString(PyObject *, PyObject *);}
static PyObject *meth_QRestReply_errorString(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRestReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRestReply, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->errorString());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRestReply, sipName_errorString, doc_QRestReply_errorString);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QRestReply(void *, int);}
static void release_QRestReply(void *sipCppV, int)
{
    delete reinterpret_cast< ::QRestReply *>(sipCppV);
}


extern "C" {static void dealloc_QRestReply(sipSimpleWrapper *);}
static void dealloc_QRestReply(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QRestReply(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QRestReply(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QRestReply(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QRestReply *sipCpp = SIP_NULLPTR;

    {
        ::QNetworkReply* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J8", sipType_QNetworkReply, &a0))
        {
            sipCpp = new ::QRestReply(a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QRestReply[] = {
    {sipName_error, meth_QRestReply_error, METH_VARARGS, doc_QRestReply_error},
    {sipName_errorString, meth_QRestReply_errorString, METH_VARARGS, doc_QRestReply_errorString},
    {sipName_hasError, meth_QRestReply_hasError, METH_VARARGS, doc_QRestReply_hasError},
    {sipName_httpStatus, meth_QRestReply_httpStatus, METH_VARARGS, doc_QRestReply_httpStatus},
    {sipName_isHttpStatusSuccess, meth_QRestReply_isHttpStatusSuccess, METH_VARARGS, doc_QRestReply_isHttpStatusSuccess},
    {sipName_isSuccess, meth_QRestReply_isSuccess, METH_VARARGS, doc_QRestReply_isSuccess},
    {sipName_networkReply, meth_QRestReply_networkReply, METH_VARARGS, doc_QRestReply_networkReply},
    {sipName_readBody, meth_QRestReply_readBody, METH_VARARGS, doc_QRestReply_readBody},
    {sipName_readJson, SIP_MLMETH_CAST(meth_QRestReply_readJson), METH_VARARGS|METH_KEYWORDS, doc_QRestReply_readJson},
    {sipName_readText, meth_QRestReply_readText, METH_VARARGS, doc_QRestReply_readText},
    {sipName_swap, meth_QRestReply_swap, METH_VARARGS, doc_QRestReply_swap}
};

PyDoc_STRVAR(doc_QRestReply, "\1QRestReply(reply: QNetworkReply|None)");


sipClassTypeDef sipTypeDef_QtNetwork_QRestReply = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QRestReply,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QRestReply,
        {0, 0, 1},
        11, methods_QRestReply,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QRestReply,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QRestReply,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QRestReply,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QRestReply,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QRestReply),
};
