Update CalcCACS.

This commit is contained in:
sdk-team
2020-09-29 10:04:38 +00:00
parent c5dd7f096e
commit c93100c1b5
14 changed files with 552 additions and 0 deletions

View File

@@ -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<const AsyncCallerContext>& 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<std::packaged_task<DetectSkinDiseaseOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<RunMedQAOutcome()>>(
[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();

View File

@@ -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();
}

View File

@@ -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 <alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h>
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);
}

View File

@@ -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 <alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/imageprocess/model/RunMedQARequest.h>
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);
}

View File

@@ -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 <alibabacloud/imageprocess/model/RunMedQAResult.h>
#include <json/json.h>
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_;
}