From 043fd0fcb414aa853c1101ceb1d050160418ed98 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Sat, 6 May 2023 09:32:16 +0000 Subject: [PATCH] Add The billingCount return value to the RunPreTrainService Api. --- VERSION | 2 +- .../nlp-automl/model/RunPreTrainServiceResult.h | 2 ++ nlp-automl/src/model/RunPreTrainServiceResult.cc | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e4299ee1b..9ad62fff4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1553 \ No newline at end of file +1.36.1554 \ No newline at end of file diff --git a/nlp-automl/include/alibabacloud/nlp-automl/model/RunPreTrainServiceResult.h b/nlp-automl/include/alibabacloud/nlp-automl/model/RunPreTrainServiceResult.h index ac9a3cbf1..5f6843dc3 100644 --- a/nlp-automl/include/alibabacloud/nlp-automl/model/RunPreTrainServiceResult.h +++ b/nlp-automl/include/alibabacloud/nlp-automl/model/RunPreTrainServiceResult.h @@ -37,11 +37,13 @@ namespace AlibabaCloud RunPreTrainServiceResult(); explicit RunPreTrainServiceResult(const std::string &payload); ~RunPreTrainServiceResult(); + int getBillingCount()const; std::string getPredictResult()const; protected: void parse(const std::string &payload); private: + int billingCount_; std::string predictResult_; }; diff --git a/nlp-automl/src/model/RunPreTrainServiceResult.cc b/nlp-automl/src/model/RunPreTrainServiceResult.cc index bdb393d50..fd567923e 100644 --- a/nlp-automl/src/model/RunPreTrainServiceResult.cc +++ b/nlp-automl/src/model/RunPreTrainServiceResult.cc @@ -41,9 +41,16 @@ void RunPreTrainServiceResult::parse(const std::string &payload) setRequestId(value["RequestId"].asString()); if(!value["PredictResult"].isNull()) predictResult_ = value["PredictResult"].asString(); + if(!value["BillingCount"].isNull()) + billingCount_ = std::stoi(value["BillingCount"].asString()); } +int RunPreTrainServiceResult::getBillingCount()const +{ + return billingCount_; +} + std::string RunPreTrainServiceResult::getPredictResult()const { return predictResult_;