text: /**
   * FastAPI
   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
   *
   * The version of the OpenAPI document: 0.1.0
   * 
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  #include "OAITextTextNextSentencePredictionApi.h"
  #include "OAIHelpers.h"
  
  #include <QJsonArray>
  #include <QJsonDocument>
  
  namespace OpenAPI {
  
  OAITextTextNextSentencePredictionApi::OAITextTextNextSentencePredictionApi() {
  
  }
  
  OAITextTextNextSentencePredictionApi::~OAITextTextNextSentencePredictionApi() {
  
  }
  
  OAITextTextNextSentencePredictionApi::OAITextTextNextSentencePredictionApi(QString host, QString basePath) {
      this->host = host;
      this->basePath = basePath;
  }
  
  void
  OAITextTextNextSentencePredictionApi::applyTextTextNextSentencePredictionPost(const QString& sentence_1, const QString& sentence_2, const QString& model) {
      QString fullPath;
      fullPath.append(this->host).append(this->basePath).append("/text/text/next-sentence-prediction/");
      
      if (fullPath.indexOf("?") > 0)
        fullPath.append("&");
      else
        fullPath.append("?");
      fullPath.append(QUrl::toPercentEncoding("sentence_1"))
          .append("=")
          .append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(sentence_1)));
      
      if (fullPath.indexOf("?") > 0)
        fullPath.append("&");
      else
        fullPath.append("?");
      fullPath.append(QUrl::toPercentEncoding("sentence_2"))
          .append("=")
          .append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(sentence_2)));
      
      if (fullPath.indexOf("?") > 0)
        fullPath.append("&");
      else
        fullPath.append("?");
      fullPath.append(QUrl::toPercentEncoding("model"))
          .append("=")
          .append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(model)));
      
      OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
      OAIHttpRequestInput input(fullPath, "POST");
  
  
      foreach(QString key, this->defaultHeaders.keys()) {
          input.headers.insert(key, this->defaultHeaders.value(key));
      }
  
      connect(worker,
              &OAIHttpRequestWorker::on_execution_finished,
              this,
              &OAITextTextNextSentencePredictionApi::applyTextTextNextSentencePredictionPostCallback);
  
      worker->execute(&input);
  }
  
  void
  OAITextTextNextSentencePredictionApi::applyTextTextNextSentencePredictionPostCallback(OAIHttpRequestWorker * worker) {
      QString msg;
      QString error_str = worker->error_str;
      QNetworkReply::NetworkError error_type = worker->error_type;
  
      if (worker->error_type == QNetworkReply::NoError) {
          msg = QString("Success! %1 bytes").arg(worker->response.length());
      }
      else {
          msg = "Error: " + worker->error_str;
      }
      OAIObject output(QString(worker->response));
      worker->deleteLater();
  
      if (worker->error_type == QNetworkReply::NoError) {
          emit applyTextTextNextSentencePredictionPostSignal(output);
          emit applyTextTextNextSentencePredictionPostSignalFull(worker, output);
      } else {
          emit applyTextTextNextSentencePredictionPostSignalE(output, error_type, error_str);
          emit applyTextTextNextSentencePredictionPostSignalEFull(worker, error_type, error_str);
      }
  }
  
  void
  OAITextTextNextSentencePredictionApi::getVersionsTextTextNextSentencePredictionGet() {
      QString fullPath;
      fullPath.append(this->host).append(this->basePath).append("/text/text/next-sentence-prediction/");
      
      OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
      OAIHttpRequestInput input(fullPath, "GET");
  
  
      foreach(QString key, this->defaultHeaders.keys()) {
          input.headers.insert(key, this->defaultHeaders.value(key));
      }
  
      connect(worker,
              &OAIHttpRequestWorker::on_execution_finished,
              this,
              &OAITextTextNextSentencePredictionApi::getVersionsTextTextNextSentencePredictionGetCallback);
  
      worker->execute(&input);
  }
  
  void
  OAITextTextNextSentencePredictionApi::getVersionsTextTextNextSentencePredictionGetCallback(OAIHttpRequestWorker * worker) {
      QString msg;
      QString error_str = worker->error_str;
      QNetworkReply::NetworkError error_type = worker->error_type;
  
      if (worker->error_type == QNetworkReply::NoError) {
          msg = QString("Success! %1 bytes").arg(worker->response.length());
      }
      else {
          msg = "Error: " + worker->error_str;
      }
      OAIObject output(QString(worker->response));
      worker->deleteLater();
  
      if (worker->error_type == QNetworkReply::NoError) {
          emit getVersionsTextTextNextSentencePredictionGetSignal(output);
          emit getVersionsTextTextNextSentencePredictionGetSignalFull(worker, output);
      } else {
          emit getVersionsTextTextNextSentencePredictionGetSignalE(output, error_type, error_str);
          emit getVersionsTextTextNextSentencePredictionGetSignalEFull(worker, error_type, error_str);
      }
  }
  
  
  }
  