From c93100c1b54817f3d7acaef01614e31e67813405 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 29 Sep 2020 10:04:38 +0000 Subject: [PATCH] Update CalcCACS. --- CHANGELOG | 3 + imageprocess/CMakeLists.txt | 8 +++ .../imageprocess/ImageprocessClient.h | 16 +++++ .../imageprocess/model/CalcCACSResult.h | 1 + .../model/DetectSkinDiseaseRequest.h | 54 ++++++++++++++ .../model/DetectSkinDiseaseResult.h | 55 ++++++++++++++ .../imageprocess/model/RunMedQARequest.h | 54 ++++++++++++++ .../imageprocess/model/RunMedQAResult.h | 56 +++++++++++++++ imageprocess/src/ImageprocessClient.cc | 72 +++++++++++++++++++ imageprocess/src/model/CalcCACSResult.cc | 2 + .../src/model/DetectSkinDiseaseRequest.cc | 62 ++++++++++++++++ .../src/model/DetectSkinDiseaseResult.cc | 52 ++++++++++++++ imageprocess/src/model/RunMedQARequest.cc | 62 ++++++++++++++++ imageprocess/src/model/RunMedQAResult.cc | 55 ++++++++++++++ 14 files changed, 552 insertions(+) create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/RunMedQARequest.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/RunMedQAResult.h create mode 100644 imageprocess/src/model/DetectSkinDiseaseRequest.cc create mode 100644 imageprocess/src/model/DetectSkinDiseaseResult.cc create mode 100644 imageprocess/src/model/RunMedQARequest.cc create mode 100644 imageprocess/src/model/RunMedQAResult.cc diff --git a/CHANGELOG b/CHANGELOG index dde13dcd3..f70e52a4c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-09-29 Version: patch +- Update CalcCACS. + 2020-09-29 Version: patch - Add API OpenOnsService which can active ons service. diff --git a/imageprocess/CMakeLists.txt b/imageprocess/CMakeLists.txt index d0c64ef08..fdfd83902 100644 --- a/imageprocess/CMakeLists.txt +++ b/imageprocess/CMakeLists.txt @@ -35,12 +35,16 @@ set(imageprocess_public_header_model include/alibabacloud/imageprocess/model/DetectKneeXRayResult.h include/alibabacloud/imageprocess/model/DetectLungNoduleRequest.h include/alibabacloud/imageprocess/model/DetectLungNoduleResult.h + include/alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h + include/alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h include/alibabacloud/imageprocess/model/DetectSpineMRIRequest.h include/alibabacloud/imageprocess/model/DetectSpineMRIResult.h include/alibabacloud/imageprocess/model/GetAsyncJobResultRequest.h include/alibabacloud/imageprocess/model/GetAsyncJobResultResult.h include/alibabacloud/imageprocess/model/RunCTRegistrationRequest.h include/alibabacloud/imageprocess/model/RunCTRegistrationResult.h + include/alibabacloud/imageprocess/model/RunMedQARequest.h + include/alibabacloud/imageprocess/model/RunMedQAResult.h include/alibabacloud/imageprocess/model/TranslateMedRequest.h include/alibabacloud/imageprocess/model/TranslateMedResult.h ) @@ -60,12 +64,16 @@ set(imageprocess_src src/model/DetectKneeXRayResult.cc src/model/DetectLungNoduleRequest.cc src/model/DetectLungNoduleResult.cc + src/model/DetectSkinDiseaseRequest.cc + src/model/DetectSkinDiseaseResult.cc src/model/DetectSpineMRIRequest.cc src/model/DetectSpineMRIResult.cc src/model/GetAsyncJobResultRequest.cc src/model/GetAsyncJobResultResult.cc src/model/RunCTRegistrationRequest.cc src/model/RunCTRegistrationResult.cc + src/model/RunMedQARequest.cc + src/model/RunMedQAResult.cc src/model/TranslateMedRequest.cc src/model/TranslateMedResult.cc ) diff --git a/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h b/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h index 9b0ea8da2..07e3e00ea 100644 --- a/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h +++ b/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h @@ -36,12 +36,16 @@ #include "model/DetectKneeXRayResult.h" #include "model/DetectLungNoduleRequest.h" #include "model/DetectLungNoduleResult.h" +#include "model/DetectSkinDiseaseRequest.h" +#include "model/DetectSkinDiseaseResult.h" #include "model/DetectSpineMRIRequest.h" #include "model/DetectSpineMRIResult.h" #include "model/GetAsyncJobResultRequest.h" #include "model/GetAsyncJobResultResult.h" #include "model/RunCTRegistrationRequest.h" #include "model/RunCTRegistrationResult.h" +#include "model/RunMedQARequest.h" +#include "model/RunMedQAResult.h" #include "model/TranslateMedRequest.h" #include "model/TranslateMedResult.h" @@ -74,6 +78,9 @@ namespace AlibabaCloud typedef Outcome DetectLungNoduleOutcome; typedef std::future DetectLungNoduleOutcomeCallable; typedef std::function&)> DetectLungNoduleAsyncHandler; + typedef Outcome DetectSkinDiseaseOutcome; + typedef std::future DetectSkinDiseaseOutcomeCallable; + typedef std::function&)> DetectSkinDiseaseAsyncHandler; typedef Outcome DetectSpineMRIOutcome; typedef std::future DetectSpineMRIOutcomeCallable; typedef std::function&)> DetectSpineMRIAsyncHandler; @@ -83,6 +90,9 @@ namespace AlibabaCloud typedef Outcome RunCTRegistrationOutcome; typedef std::future RunCTRegistrationOutcomeCallable; typedef std::function&)> RunCTRegistrationAsyncHandler; + typedef Outcome RunMedQAOutcome; + typedef std::future RunMedQAOutcomeCallable; + typedef std::function&)> RunMedQAAsyncHandler; typedef Outcome TranslateMedOutcome; typedef std::future TranslateMedOutcomeCallable; typedef std::function&)> TranslateMedAsyncHandler; @@ -112,6 +122,9 @@ namespace AlibabaCloud DetectLungNoduleOutcome detectLungNodule(const Model::DetectLungNoduleRequest &request)const; void detectLungNoduleAsync(const Model::DetectLungNoduleRequest& request, const DetectLungNoduleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectLungNoduleOutcomeCallable detectLungNoduleCallable(const Model::DetectLungNoduleRequest& request) const; + DetectSkinDiseaseOutcome detectSkinDisease(const Model::DetectSkinDiseaseRequest &request)const; + void detectSkinDiseaseAsync(const Model::DetectSkinDiseaseRequest& request, const DetectSkinDiseaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetectSkinDiseaseOutcomeCallable detectSkinDiseaseCallable(const Model::DetectSkinDiseaseRequest& request) const; DetectSpineMRIOutcome detectSpineMRI(const Model::DetectSpineMRIRequest &request)const; void detectSpineMRIAsync(const Model::DetectSpineMRIRequest& request, const DetectSpineMRIAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectSpineMRIOutcomeCallable detectSpineMRICallable(const Model::DetectSpineMRIRequest& request) const; @@ -121,6 +134,9 @@ namespace AlibabaCloud RunCTRegistrationOutcome runCTRegistration(const Model::RunCTRegistrationRequest &request)const; void runCTRegistrationAsync(const Model::RunCTRegistrationRequest& request, const RunCTRegistrationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RunCTRegistrationOutcomeCallable runCTRegistrationCallable(const Model::RunCTRegistrationRequest& request) const; + RunMedQAOutcome runMedQA(const Model::RunMedQARequest &request)const; + void runMedQAAsync(const Model::RunMedQARequest& request, const RunMedQAAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RunMedQAOutcomeCallable runMedQACallable(const Model::RunMedQARequest& request) const; TranslateMedOutcome translateMed(const Model::TranslateMedRequest &request)const; void translateMedAsync(const Model::TranslateMedRequest& request, const TranslateMedAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; TranslateMedOutcomeCallable translateMedCallable(const Model::TranslateMedRequest& request) const; diff --git a/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h b/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h index 34809deab..98a7626c9 100644 --- a/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h +++ b/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h @@ -35,6 +35,7 @@ namespace AlibabaCloud struct Data { std::string score; + std::string resultUrl; }; diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h new file mode 100644 index 000000000..c989f5b87 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSKINDISEASEREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSKINDISEASEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectSkinDiseaseRequest : public RpcServiceRequest + { + + public: + DetectSkinDiseaseRequest(); + ~DetectSkinDiseaseRequest(); + + std::string getUrl()const; + void setUrl(const std::string& url); + std::string getOrgId()const; + void setOrgId(const std::string& orgId); + std::string getOrgName()const; + void setOrgName(const std::string& orgName); + + private: + std::string url_; + std::string orgId_; + std::string orgName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSKINDISEASEREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h new file mode 100644 index 000000000..6264a9207 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h @@ -0,0 +1,55 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSKINDISEASERESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSKINDISEASERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectSkinDiseaseResult : public ServiceResult + { + public: + struct Data + { + std::string results; + }; + + + DetectSkinDiseaseResult(); + explicit DetectSkinDiseaseResult(const std::string &payload); + ~DetectSkinDiseaseResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSKINDISEASERESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/RunMedQARequest.h b/imageprocess/include/alibabacloud/imageprocess/model/RunMedQARequest.h new file mode 100644 index 000000000..0d67b50a2 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/RunMedQARequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_RUNMEDQAREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_RUNMEDQAREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT RunMedQARequest : public RpcServiceRequest + { + + public: + RunMedQARequest(); + ~RunMedQARequest(); + + std::string getQuestion()const; + void setQuestion(const std::string& question); + std::string getOrgId()const; + void setOrgId(const std::string& orgId); + std::string getOrgName()const; + void setOrgName(const std::string& orgName); + + private: + std::string question_; + std::string orgId_; + std::string orgName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_RUNMEDQAREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/RunMedQAResult.h b/imageprocess/include/alibabacloud/imageprocess/model/RunMedQAResult.h new file mode 100644 index 000000000..857aab98f --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/RunMedQAResult.h @@ -0,0 +1,56 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_RUNMEDQARESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_RUNMEDQARESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT RunMedQAResult : public ServiceResult + { + public: + struct Data + { + std::string answer; + std::vector similarQuestion; + }; + + + RunMedQAResult(); + explicit RunMedQAResult(const std::string &payload); + ~RunMedQAResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_RUNMEDQARESULT_H_ \ No newline at end of file diff --git a/imageprocess/src/ImageprocessClient.cc b/imageprocess/src/ImageprocessClient.cc index 7bbb83ecf..610280ab6 100644 --- a/imageprocess/src/ImageprocessClient.cc +++ b/imageprocess/src/ImageprocessClient.cc @@ -303,6 +303,42 @@ ImageprocessClient::DetectLungNoduleOutcomeCallable ImageprocessClient::detectLu return task->get_future(); } +ImageprocessClient::DetectSkinDiseaseOutcome ImageprocessClient::detectSkinDisease(const DetectSkinDiseaseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectSkinDiseaseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectSkinDiseaseOutcome(DetectSkinDiseaseResult(outcome.result())); + else + return DetectSkinDiseaseOutcome(outcome.error()); +} + +void ImageprocessClient::detectSkinDiseaseAsync(const DetectSkinDiseaseRequest& request, const DetectSkinDiseaseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectSkinDisease(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectSkinDiseaseOutcomeCallable ImageprocessClient::detectSkinDiseaseCallable(const DetectSkinDiseaseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectSkinDisease(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ImageprocessClient::DetectSpineMRIOutcome ImageprocessClient::detectSpineMRI(const DetectSpineMRIRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -411,6 +447,42 @@ ImageprocessClient::RunCTRegistrationOutcomeCallable ImageprocessClient::runCTRe return task->get_future(); } +ImageprocessClient::RunMedQAOutcome ImageprocessClient::runMedQA(const RunMedQARequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RunMedQAOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RunMedQAOutcome(RunMedQAResult(outcome.result())); + else + return RunMedQAOutcome(outcome.error()); +} + +void ImageprocessClient::runMedQAAsync(const RunMedQARequest& request, const RunMedQAAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, runMedQA(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::RunMedQAOutcomeCallable ImageprocessClient::runMedQACallable(const RunMedQARequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->runMedQA(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ImageprocessClient::TranslateMedOutcome ImageprocessClient::translateMed(const TranslateMedRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/imageprocess/src/model/CalcCACSResult.cc b/imageprocess/src/model/CalcCACSResult.cc index 0a5c85483..289e31349 100644 --- a/imageprocess/src/model/CalcCACSResult.cc +++ b/imageprocess/src/model/CalcCACSResult.cc @@ -42,6 +42,8 @@ void CalcCACSResult::parse(const std::string &payload) auto dataNode = value["Data"]; if(!dataNode["Score"].isNull()) data_.score = dataNode["Score"].asString(); + if(!dataNode["ResultUrl"].isNull()) + data_.resultUrl = dataNode["ResultUrl"].asString(); } diff --git a/imageprocess/src/model/DetectSkinDiseaseRequest.cc b/imageprocess/src/model/DetectSkinDiseaseRequest.cc new file mode 100644 index 000000000..f4586b1e4 --- /dev/null +++ b/imageprocess/src/model/DetectSkinDiseaseRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::DetectSkinDiseaseRequest; + +DetectSkinDiseaseRequest::DetectSkinDiseaseRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "DetectSkinDisease") +{ + setMethod(HttpRequest::Method::Post); +} + +DetectSkinDiseaseRequest::~DetectSkinDiseaseRequest() +{} + +std::string DetectSkinDiseaseRequest::getUrl()const +{ + return url_; +} + +void DetectSkinDiseaseRequest::setUrl(const std::string& url) +{ + url_ = url; + setBodyParameter("Url", url); +} + +std::string DetectSkinDiseaseRequest::getOrgId()const +{ + return orgId_; +} + +void DetectSkinDiseaseRequest::setOrgId(const std::string& orgId) +{ + orgId_ = orgId; + setBodyParameter("OrgId", orgId); +} + +std::string DetectSkinDiseaseRequest::getOrgName()const +{ + return orgName_; +} + +void DetectSkinDiseaseRequest::setOrgName(const std::string& orgName) +{ + orgName_ = orgName; + setBodyParameter("OrgName", orgName); +} + diff --git a/imageprocess/src/model/DetectSkinDiseaseResult.cc b/imageprocess/src/model/DetectSkinDiseaseResult.cc new file mode 100644 index 000000000..4ef79fe45 --- /dev/null +++ b/imageprocess/src/model/DetectSkinDiseaseResult.cc @@ -0,0 +1,52 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +DetectSkinDiseaseResult::DetectSkinDiseaseResult() : + ServiceResult() +{} + +DetectSkinDiseaseResult::DetectSkinDiseaseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectSkinDiseaseResult::~DetectSkinDiseaseResult() +{} + +void DetectSkinDiseaseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["Results"].isNull()) + data_.results = dataNode["Results"].asString(); + +} + +DetectSkinDiseaseResult::Data DetectSkinDiseaseResult::getData()const +{ + return data_; +} + diff --git a/imageprocess/src/model/RunMedQARequest.cc b/imageprocess/src/model/RunMedQARequest.cc new file mode 100644 index 000000000..5590193dd --- /dev/null +++ b/imageprocess/src/model/RunMedQARequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::RunMedQARequest; + +RunMedQARequest::RunMedQARequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "RunMedQA") +{ + setMethod(HttpRequest::Method::Post); +} + +RunMedQARequest::~RunMedQARequest() +{} + +std::string RunMedQARequest::getQuestion()const +{ + return question_; +} + +void RunMedQARequest::setQuestion(const std::string& question) +{ + question_ = question; + setBodyParameter("Question", question); +} + +std::string RunMedQARequest::getOrgId()const +{ + return orgId_; +} + +void RunMedQARequest::setOrgId(const std::string& orgId) +{ + orgId_ = orgId; + setBodyParameter("OrgId", orgId); +} + +std::string RunMedQARequest::getOrgName()const +{ + return orgName_; +} + +void RunMedQARequest::setOrgName(const std::string& orgName) +{ + orgName_ = orgName; + setBodyParameter("OrgName", orgName); +} + diff --git a/imageprocess/src/model/RunMedQAResult.cc b/imageprocess/src/model/RunMedQAResult.cc new file mode 100644 index 000000000..13b02b9b5 --- /dev/null +++ b/imageprocess/src/model/RunMedQAResult.cc @@ -0,0 +1,55 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +RunMedQAResult::RunMedQAResult() : + ServiceResult() +{} + +RunMedQAResult::RunMedQAResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RunMedQAResult::~RunMedQAResult() +{} + +void RunMedQAResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["Answer"].isNull()) + data_.answer = dataNode["Answer"].asString(); + auto allSimilarQuestion = dataNode["SimilarQuestion"]["SimilarQuestion"]; + for (auto value : allSimilarQuestion) + data_.similarQuestion.push_back(value.asString()); + +} + +RunMedQAResult::Data RunMedQAResult::getData()const +{ + return data_; +} +