/**
 * 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 STOREAPI_H
#define STOREAPI_H

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

#include "order.h"
#include <QMap>
#include <QString>

namespace QtOpenAPI {

using namespace QtOpenApiCommon;

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

    void initializeServerConfigs();

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

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

    /**
    * \internal
    * The auto-generated API:
    * void getOrderById(const qint64 &orderId);
    * void getOrderById(const qint64 &orderId, QObject *object, [&](const QRestReply &reply, const Order &summary){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_IMPL(getOrderById, (const qint64 &orderId), (orderId), (const Order &), /* non-deprecated */)

    /**
    * \internal
    * The auto-generated API:
    * void placeOrder(const Order &order);
    * void placeOrder(const Order &order, QObject *object, [&](const QRestReply &reply, const Order &summary){});
    * \endinternal
    */
    QOAI_ADD_OPERATION_IMPL(placeOrder, (const Order &order), (order), (const Order &), /* non-deprecated */)

Q_SIGNALS:
    /** Signal is emitted, if deleteOrder() request completed successfully. */
    void deleteOrderFinished();
    /** Signal is emitted, if deleteOrder() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void deleteOrderErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if getInventory() request completed successfully. The \a summary contains a serialized server response. */
    void getInventoryFinished(const QMap<QString, qint32> &summary);
    /** Signal is emitted, if getInventory() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void getInventoryErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if getOrderById() request completed successfully. The \a summary contains a serialized server response. */
    void getOrderByIdFinished(const Order &summary);
    /** Signal is emitted, if getOrderById() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void getOrderByIdErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);
    /** Signal is emitted, if placeOrder() request completed successfully. The \a summary contains a serialized server response. */
    void placeOrderFinished(const Order &summary);
    /** Signal is emitted, if placeOrder() request completed with an error. \a errorType and \a errorStr contain an information about the error. */
    void placeOrderErrorOccurred(QNetworkReply::NetworkError errorType, const QString &errorStr);

};

} // namespace QtOpenAPI

#endif // STOREAPI_H
