/**
 * OpenAPI Generated Petstore Client
 *
 * This is a sample of Petstore application.
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#ifndef USERAPI_H
#define USERAPI_H

#include "qoaibaseapi.h"
#include "cmakegeneratedclientexports.h"
#include <QtNetwork/qrestreply.h>

#include <QString>
#include "user.h"

namespace QtOpenAPI {

using namespace QtOpenApiCommon;

class CMAKEGENERATEDCLIENT_EXPORT UserApi : public QtOpenApiCommon::QOAIBaseApi {
    Q_OBJECT
public:
    UserApi() : UserApi(nullptr) {}
    explicit UserApi(QObject *parent);
    ~UserApi() override;

    void initializeServerConfigs();

    /**
    * \internal
    * The auto-generated API:
    * void createInQueryMap(const QMap<QString, QString> &username);
    * void createInQueryMap(const QMap<QString, QString> &username, QObject *object, [&](const QRestReply &reply){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_WITH_NO_RESPONSE_IMPL(createInQueryMap, (const QMap<QString, QString> &username), (username), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void createUser(const User &user);
    * void createUser(const User &user, QObject *object, [&](const QRestReply &reply){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_WITH_NO_RESPONSE_IMPL(createUser, (const User &user), (user), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void createUsersWithArrayInput(const QList<User> &user);
    * void createUsersWithArrayInput(const QList<User> &user, QObject *object, [&](const QRestReply &reply){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_WITH_NO_RESPONSE_IMPL(createUsersWithArrayInput, (const QList<User> &user), (user), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void createUsersWithListInput(const QList<User> &user);
    * void createUsersWithListInput(const QList<User> &user, QObject *object, [&](const QRestReply &reply){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_WITH_NO_RESPONSE_IMPL(createUsersWithListInput, (const QList<User> &user), (user), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void deleteUser(const User &username);
    * void deleteUser(const User &username, QObject *object, [&](const QRestReply &reply){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_WITH_NO_RESPONSE_IMPL(deleteUser, (const User &username), (username), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void getUserByName(const QMap<QString, qint32> &username);
    * void getUserByName(const QMap<QString, qint32> &username, QObject *object, [&](const QRestReply &reply, const User &summary){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_IMPL(getUserByName, (const QMap<QString, qint32> &username), (username), (const User &), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void loginUser(const QtOpenApiCommon::OptionalParameter<QString> &username, const QtOpenApiCommon::OptionalParameter<QString> &password);
    * void loginUser(const QtOpenApiCommon::OptionalParameter<QString> &username, const QtOpenApiCommon::OptionalParameter<QString> &password, QObject *object, [&](const QRestReply &reply, const QString &summary){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_IMPL(loginUser, (const QtOpenApiCommon::OptionalParameter<QString> &username = QtOpenApiCommon::OptionalParameter<QString>(), const QtOpenApiCommon::OptionalParameter<QString> &password = QtOpenApiCommon::OptionalParameter<QString>()), (username, password), (const QString &), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void logoutUser(const QJsonValue &username);
    * void logoutUser(const QJsonValue &username, QObject *object, [&](const QRestReply &reply){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_WITH_NO_RESPONSE_IMPL(logoutUser, (const QJsonValue &username), (username), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void updateUser(const QString &username, const User &body);
    * void updateUser(const QString &username, const User &body, QObject *object, [&](const QRestReply &reply, const User &summary){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_IMPL(updateUser, (const QString &username, const User &body), (username, body), (const User &), /* non-deprecated */)

Q_SIGNALS:
    /** Signal is emitted, if createInQueryMap() request completed successfully. */
    void createInQueryMapFinished();
    /** Signal is emitted, if createInQueryMap() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void createInQueryMapErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if createUser() request completed successfully. */
    void createUserFinished();
    /** Signal is emitted, if createUser() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void createUserErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if createUsersWithArrayInput() request completed successfully. */
    void createUsersWithArrayInputFinished();
    /** Signal is emitted, if createUsersWithArrayInput() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void createUsersWithArrayInputErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if createUsersWithListInput() request completed successfully. */
    void createUsersWithListInputFinished();
    /** Signal is emitted, if createUsersWithListInput() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void createUsersWithListInputErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if deleteUser() request completed successfully. */
    void deleteUserFinished();
    /** Signal is emitted, if deleteUser() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void deleteUserErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if getUserByName() request completed successfully. The \a summary contains a serialized server response. */
    void getUserByNameFinished(const User &summary);
    /** Signal is emitted, if getUserByName() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void getUserByNameErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if loginUser() request completed successfully. The \a summary contains a serialized server response. */
    void loginUserFinished(const QString &summary);
    /** Signal is emitted, if loginUser() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void loginUserErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if logoutUser() request completed successfully. */
    void logoutUserFinished();
    /** Signal is emitted, if logoutUser() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void logoutUserErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if updateUser() request completed successfully. The \a summary contains a serialized server response. */
    void updateUserFinished(const User &summary);
    /** Signal is emitted, if updateUser() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void updateUserErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);

};

} // namespace QtOpenAPI

#endif // USERAPI_H
