Update RecognizeVideoCharacter.
This commit is contained in:
@@ -447,42 +447,6 @@ OcrClient::RecognizeIdentityCardOutcomeCallable OcrClient::recognizeIdentityCard
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeIndonesiaIdentityCardOutcome OcrClient::recognizeIndonesiaIdentityCard(const RecognizeIndonesiaIdentityCardRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeIndonesiaIdentityCardOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeIndonesiaIdentityCardOutcome(RecognizeIndonesiaIdentityCardResult(outcome.result()));
|
||||
else
|
||||
return RecognizeIndonesiaIdentityCardOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeIndonesiaIdentityCardAsync(const RecognizeIndonesiaIdentityCardRequest& request, const RecognizeIndonesiaIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeIndonesiaIdentityCard(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeIndonesiaIdentityCardOutcomeCallable OcrClient::recognizeIndonesiaIdentityCardCallable(const RecognizeIndonesiaIdentityCardRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeIndonesiaIdentityCardOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeIndonesiaIdentityCard(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeLicensePlateOutcome OcrClient::recognizeLicensePlate(const RecognizeLicensePlateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -519,42 +483,6 @@ OcrClient::RecognizeLicensePlateOutcomeCallable OcrClient::recognizeLicensePlate
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeMalaysiaIdentityCardOutcome OcrClient::recognizeMalaysiaIdentityCard(const RecognizeMalaysiaIdentityCardRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeMalaysiaIdentityCardOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeMalaysiaIdentityCardOutcome(RecognizeMalaysiaIdentityCardResult(outcome.result()));
|
||||
else
|
||||
return RecognizeMalaysiaIdentityCardOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeMalaysiaIdentityCardAsync(const RecognizeMalaysiaIdentityCardRequest& request, const RecognizeMalaysiaIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeMalaysiaIdentityCard(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeMalaysiaIdentityCardOutcomeCallable OcrClient::recognizeMalaysiaIdentityCardCallable(const RecognizeMalaysiaIdentityCardRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeMalaysiaIdentityCardOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeMalaysiaIdentityCard(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizePassportMRZOutcome OcrClient::recognizePassportMRZ(const RecognizePassportMRZRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -735,42 +663,6 @@ OcrClient::RecognizeQuotaInvoiceOutcomeCallable OcrClient::recognizeQuotaInvoice
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeRussiaIdentityCardOutcome OcrClient::recognizeRussiaIdentityCard(const RecognizeRussiaIdentityCardRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeRussiaIdentityCardOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeRussiaIdentityCardOutcome(RecognizeRussiaIdentityCardResult(outcome.result()));
|
||||
else
|
||||
return RecognizeRussiaIdentityCardOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeRussiaIdentityCardAsync(const RecognizeRussiaIdentityCardRequest& request, const RecognizeRussiaIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeRussiaIdentityCard(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeRussiaIdentityCardOutcomeCallable OcrClient::recognizeRussiaIdentityCardCallable(const RecognizeRussiaIdentityCardRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeRussiaIdentityCardOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeRussiaIdentityCard(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeStampOutcome OcrClient::recognizeStamp(const RecognizeStampRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -987,78 +879,6 @@ OcrClient::RecognizeTrainTicketOutcomeCallable OcrClient::recognizeTrainTicketCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeTurkeyIdentityCardOutcome OcrClient::recognizeTurkeyIdentityCard(const RecognizeTurkeyIdentityCardRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeTurkeyIdentityCardOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeTurkeyIdentityCardOutcome(RecognizeTurkeyIdentityCardResult(outcome.result()));
|
||||
else
|
||||
return RecognizeTurkeyIdentityCardOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeTurkeyIdentityCardAsync(const RecognizeTurkeyIdentityCardRequest& request, const RecognizeTurkeyIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeTurkeyIdentityCard(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeTurkeyIdentityCardOutcomeCallable OcrClient::recognizeTurkeyIdentityCardCallable(const RecognizeTurkeyIdentityCardRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeTurkeyIdentityCardOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeTurkeyIdentityCard(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeUkraineIdentityCardOutcome OcrClient::recognizeUkraineIdentityCard(const RecognizeUkraineIdentityCardRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeUkraineIdentityCardOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeUkraineIdentityCardOutcome(RecognizeUkraineIdentityCardResult(outcome.result()));
|
||||
else
|
||||
return RecognizeUkraineIdentityCardOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeUkraineIdentityCardAsync(const RecognizeUkraineIdentityCardRequest& request, const RecognizeUkraineIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeUkraineIdentityCard(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeUkraineIdentityCardOutcomeCallable OcrClient::recognizeUkraineIdentityCardCallable(const RecognizeUkraineIdentityCardRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeUkraineIdentityCardOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeUkraineIdentityCard(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeVATInvoiceOutcome OcrClient::recognizeVATInvoice(const RecognizeVATInvoiceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1167,42 +987,6 @@ OcrClient::RecognizeVerificationcodeOutcomeCallable OcrClient::recognizeVerifica
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeVideoCastCrewListOutcome OcrClient::recognizeVideoCastCrewList(const RecognizeVideoCastCrewListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeVideoCastCrewListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeVideoCastCrewListOutcome(RecognizeVideoCastCrewListResult(outcome.result()));
|
||||
else
|
||||
return RecognizeVideoCastCrewListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeVideoCastCrewListAsync(const RecognizeVideoCastCrewListRequest& request, const RecognizeVideoCastCrewListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeVideoCastCrewList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeVideoCastCrewListOutcomeCallable OcrClient::recognizeVideoCastCrewListCallable(const RecognizeVideoCastCrewListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeVideoCastCrewListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeVideoCastCrewList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeVideoCharacterOutcome OcrClient::recognizeVideoCharacter(const RecognizeVideoCharacterRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1239,42 +1023,6 @@ OcrClient::RecognizeVideoCharacterOutcomeCallable OcrClient::recognizeVideoChara
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::RecognizeVietnamIdentityCardOutcome OcrClient::recognizeVietnamIdentityCard(const RecognizeVietnamIdentityCardRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeVietnamIdentityCardOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeVietnamIdentityCardOutcome(RecognizeVietnamIdentityCardResult(outcome.result()));
|
||||
else
|
||||
return RecognizeVietnamIdentityCardOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OcrClient::recognizeVietnamIdentityCardAsync(const RecognizeVietnamIdentityCardRequest& request, const RecognizeVietnamIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeVietnamIdentityCard(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OcrClient::RecognizeVietnamIdentityCardOutcomeCallable OcrClient::recognizeVietnamIdentityCardCallable(const RecognizeVietnamIdentityCardRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeVietnamIdentityCardOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeVietnamIdentityCard(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OcrClient::TrimDocumentOutcome OcrClient::trimDocument(const TrimDocumentRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeIndonesiaIdentityCardRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeIndonesiaIdentityCardRequest;
|
||||
|
||||
RecognizeIndonesiaIdentityCardRequest::RecognizeIndonesiaIdentityCardRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeIndonesiaIdentityCard") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeIndonesiaIdentityCardRequest::~RecognizeIndonesiaIdentityCardRequest() {}
|
||||
|
||||
std::string RecognizeIndonesiaIdentityCardRequest::getImageUrl() const {
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void RecognizeIndonesiaIdentityCardRequest::setImageUrl(const std::string &imageUrl) {
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter(std::string("ImageUrl"), imageUrl);
|
||||
}
|
||||
|
||||
@@ -1,394 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeIndonesiaIdentityCardResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeIndonesiaIdentityCardResult::RecognizeIndonesiaIdentityCardResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeIndonesiaIdentityCardResult::RecognizeIndonesiaIdentityCardResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeIndonesiaIdentityCardResult::~RecognizeIndonesiaIdentityCardResult()
|
||||
{}
|
||||
|
||||
void RecognizeIndonesiaIdentityCardResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto addressFirstLineNode = dataNode["AddressFirstLine"];
|
||||
if(!addressFirstLineNode["Text"].isNull())
|
||||
data_.addressFirstLine.text = addressFirstLineNode["Text"].asString();
|
||||
if(!addressFirstLineNode["Score"].isNull())
|
||||
data_.addressFirstLine.score = std::stof(addressFirstLineNode["Score"].asString());
|
||||
auto allKeyPointsNode = addressFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFirstLineNodeKeyPointskeyPointsItem : allKeyPointsNode)
|
||||
{
|
||||
Data::AddressFirstLine::KeyPointsItem keyPointsItemObject;
|
||||
if(!addressFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItemObject.x = std::stof(addressFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItemObject.y = std::stof(addressFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFirstLine.keyPoints.push_back(keyPointsItemObject);
|
||||
}
|
||||
auto addressSecondLineNode = dataNode["AddressSecondLine"];
|
||||
if(!addressSecondLineNode["Text"].isNull())
|
||||
data_.addressSecondLine.text = addressSecondLineNode["Text"].asString();
|
||||
if(!addressSecondLineNode["Score"].isNull())
|
||||
data_.addressSecondLine.score = std::stof(addressSecondLineNode["Score"].asString());
|
||||
auto allKeyPoints1Node = addressSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressSecondLineNodeKeyPointskeyPointsItem : allKeyPoints1Node)
|
||||
{
|
||||
Data::AddressSecondLine::KeyPointsItem2 keyPointsItem2Object;
|
||||
if(!addressSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem2Object.x = std::stof(addressSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem2Object.y = std::stof(addressSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressSecondLine.keyPoints1.push_back(keyPointsItem2Object);
|
||||
}
|
||||
auto addressThirdLineNode = dataNode["AddressThirdLine"];
|
||||
if(!addressThirdLineNode["Text"].isNull())
|
||||
data_.addressThirdLine.text = addressThirdLineNode["Text"].asString();
|
||||
if(!addressThirdLineNode["Score"].isNull())
|
||||
data_.addressThirdLine.score = std::stof(addressThirdLineNode["Score"].asString());
|
||||
auto allKeyPoints3Node = addressThirdLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressThirdLineNodeKeyPointskeyPointsItem : allKeyPoints3Node)
|
||||
{
|
||||
Data::AddressThirdLine::KeyPointsItem4 keyPointsItem4Object;
|
||||
if(!addressThirdLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem4Object.x = std::stof(addressThirdLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressThirdLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem4Object.y = std::stof(addressThirdLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressThirdLine.keyPoints3.push_back(keyPointsItem4Object);
|
||||
}
|
||||
auto addressFourthLineNode = dataNode["AddressFourthLine"];
|
||||
if(!addressFourthLineNode["Text"].isNull())
|
||||
data_.addressFourthLine.text = addressFourthLineNode["Text"].asString();
|
||||
if(!addressFourthLineNode["Score"].isNull())
|
||||
data_.addressFourthLine.score = std::stof(addressFourthLineNode["Score"].asString());
|
||||
auto allKeyPoints5Node = addressFourthLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFourthLineNodeKeyPointskeyPointsItem : allKeyPoints5Node)
|
||||
{
|
||||
Data::AddressFourthLine::KeyPointsItem6 keyPointsItem6Object;
|
||||
if(!addressFourthLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem6Object.x = std::stof(addressFourthLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFourthLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem6Object.y = std::stof(addressFourthLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFourthLine.keyPoints5.push_back(keyPointsItem6Object);
|
||||
}
|
||||
auto addressFifthLineNode = dataNode["AddressFifthLine"];
|
||||
if(!addressFifthLineNode["Text"].isNull())
|
||||
data_.addressFifthLine.text = addressFifthLineNode["Text"].asString();
|
||||
if(!addressFifthLineNode["Score"].isNull())
|
||||
data_.addressFifthLine.score = std::stof(addressFifthLineNode["Score"].asString());
|
||||
auto allKeyPoints7Node = addressFifthLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFifthLineNodeKeyPointskeyPointsItem : allKeyPoints7Node)
|
||||
{
|
||||
Data::AddressFifthLine::KeyPointsItem8 keyPointsItem8Object;
|
||||
if(!addressFifthLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem8Object.x = std::stof(addressFifthLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFifthLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem8Object.y = std::stof(addressFifthLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFifthLine.keyPoints7.push_back(keyPointsItem8Object);
|
||||
}
|
||||
auto birthDateNode = dataNode["BirthDate"];
|
||||
if(!birthDateNode["Text"].isNull())
|
||||
data_.birthDate.text = birthDateNode["Text"].asString();
|
||||
if(!birthDateNode["Score"].isNull())
|
||||
data_.birthDate.score = birthDateNode["Score"].asString();
|
||||
auto allKeyPoints9Node = birthDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthDateNodeKeyPointskeyPointsItem : allKeyPoints9Node)
|
||||
{
|
||||
Data::BirthDate::KeyPointsItem10 keyPointsItem10Object;
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem10Object.x = std::stof(birthDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem10Object.y = std::stof(birthDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthDate.keyPoints9.push_back(keyPointsItem10Object);
|
||||
}
|
||||
auto birthPlaceNode = dataNode["BirthPlace"];
|
||||
if(!birthPlaceNode["Text"].isNull())
|
||||
data_.birthPlace.text = birthPlaceNode["Text"].asString();
|
||||
if(!birthPlaceNode["Score"].isNull())
|
||||
data_.birthPlace.score = birthPlaceNode["Score"].asString();
|
||||
auto allKeyPoints11Node = birthPlaceNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthPlaceNodeKeyPointskeyPointsItem : allKeyPoints11Node)
|
||||
{
|
||||
Data::BirthPlace::KeyPointsItem12 keyPointsItem12Object;
|
||||
if(!birthPlaceNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem12Object.x = std::stof(birthPlaceNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthPlaceNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem12Object.y = std::stof(birthPlaceNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthPlace.keyPoints11.push_back(keyPointsItem12Object);
|
||||
}
|
||||
auto cardBoxNode = dataNode["CardBox"];
|
||||
if(!cardBoxNode["Text"].isNull())
|
||||
data_.cardBox.text = cardBoxNode["Text"].asString();
|
||||
if(!cardBoxNode["Score"].isNull())
|
||||
data_.cardBox.score = cardBoxNode["Score"].asString();
|
||||
auto allKeyPoints13Node = cardBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto cardBoxNodeKeyPointskeyPointsItem : allKeyPoints13Node)
|
||||
{
|
||||
Data::CardBox::KeyPointsItem14 keyPointsItem14Object;
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem14Object.x = std::stof(cardBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem14Object.y = std::stof(cardBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cardBox.keyPoints13.push_back(keyPointsItem14Object);
|
||||
}
|
||||
auto expiryDateNode = dataNode["ExpiryDate"];
|
||||
if(!expiryDateNode["Text"].isNull())
|
||||
data_.expiryDate.text = expiryDateNode["Text"].asString();
|
||||
if(!expiryDateNode["Score"].isNull())
|
||||
data_.expiryDate.score = expiryDateNode["Score"].asString();
|
||||
auto allKeyPoints15Node = expiryDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto expiryDateNodeKeyPointskeyPointsItem : allKeyPoints15Node)
|
||||
{
|
||||
Data::ExpiryDate::KeyPointsItem16 keyPointsItem16Object;
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem16Object.x = std::stof(expiryDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem16Object.y = std::stof(expiryDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.expiryDate.keyPoints15.push_back(keyPointsItem16Object);
|
||||
}
|
||||
auto genderNode = dataNode["Gender"];
|
||||
if(!genderNode["Text"].isNull())
|
||||
data_.gender.text = genderNode["Text"].asString();
|
||||
if(!genderNode["Score"].isNull())
|
||||
data_.gender.score = genderNode["Score"].asString();
|
||||
auto allKeyPoints17Node = genderNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto genderNodeKeyPointskeyPointsItem : allKeyPoints17Node)
|
||||
{
|
||||
Data::Gender::KeyPointsItem18 keyPointsItem18Object;
|
||||
if(!genderNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem18Object.x = std::stof(genderNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!genderNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem18Object.y = std::stof(genderNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.gender.keyPoints17.push_back(keyPointsItem18Object);
|
||||
}
|
||||
auto heightNode = dataNode["Height"];
|
||||
if(!heightNode["Text"].isNull())
|
||||
data_.height.text = heightNode["Text"].asString();
|
||||
if(!heightNode["Score"].isNull())
|
||||
data_.height.score = heightNode["Score"].asString();
|
||||
auto allKeyPoints19Node = heightNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto heightNodeKeyPointskeyPointsItem : allKeyPoints19Node)
|
||||
{
|
||||
Data::Height::KeyPointsItem20 keyPointsItem20Object;
|
||||
if(!heightNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem20Object.x = std::stof(heightNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!heightNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem20Object.y = std::stof(heightNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.height.keyPoints19.push_back(keyPointsItem20Object);
|
||||
}
|
||||
auto idNumberNode = dataNode["IdNumber"];
|
||||
if(!idNumberNode["Text"].isNull())
|
||||
data_.idNumber.text = idNumberNode["Text"].asString();
|
||||
if(!idNumberNode["Score"].isNull())
|
||||
data_.idNumber.score = idNumberNode["Score"].asString();
|
||||
auto allKeyPoints21Node = idNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto idNumberNodeKeyPointskeyPointsItem : allKeyPoints21Node)
|
||||
{
|
||||
Data::IdNumber::KeyPointsItem22 keyPointsItem22Object;
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem22Object.x = std::stof(idNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem22Object.y = std::stof(idNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.idNumber.keyPoints21.push_back(keyPointsItem22Object);
|
||||
}
|
||||
auto licenseNumberNode = dataNode["LicenseNumber"];
|
||||
if(!licenseNumberNode["Text"].isNull())
|
||||
data_.licenseNumber.text = licenseNumberNode["Text"].asString();
|
||||
if(!licenseNumberNode["Score"].isNull())
|
||||
data_.licenseNumber.score = licenseNumberNode["Score"].asString();
|
||||
auto allKeyPoints23Node = licenseNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto licenseNumberNodeKeyPointskeyPointsItem : allKeyPoints23Node)
|
||||
{
|
||||
Data::LicenseNumber::KeyPointsItem24 keyPointsItem24Object;
|
||||
if(!licenseNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem24Object.x = std::stof(licenseNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!licenseNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem24Object.y = std::stof(licenseNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.licenseNumber.keyPoints23.push_back(keyPointsItem24Object);
|
||||
}
|
||||
auto maritalStatusNode = dataNode["MaritalStatus"];
|
||||
if(!maritalStatusNode["Text"].isNull())
|
||||
data_.maritalStatus.text = maritalStatusNode["Text"].asString();
|
||||
if(!maritalStatusNode["Score"].isNull())
|
||||
data_.maritalStatus.score = maritalStatusNode["Score"].asString();
|
||||
auto allKeyPoints25Node = maritalStatusNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto maritalStatusNodeKeyPointskeyPointsItem : allKeyPoints25Node)
|
||||
{
|
||||
Data::MaritalStatus::KeyPointsItem26 keyPointsItem26Object;
|
||||
if(!maritalStatusNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem26Object.x = std::stof(maritalStatusNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!maritalStatusNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem26Object.y = std::stof(maritalStatusNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.maritalStatus.keyPoints25.push_back(keyPointsItem26Object);
|
||||
}
|
||||
auto nameFirstLineNode = dataNode["NameFirstLine"];
|
||||
if(!nameFirstLineNode["Text"].isNull())
|
||||
data_.nameFirstLine.text = nameFirstLineNode["Text"].asString();
|
||||
if(!nameFirstLineNode["Score"].isNull())
|
||||
data_.nameFirstLine.score = nameFirstLineNode["Score"].asString();
|
||||
auto allKeyPoints27Node = nameFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameFirstLineNodeKeyPointskeyPointsItem : allKeyPoints27Node)
|
||||
{
|
||||
Data::NameFirstLine::KeyPointsItem28 keyPointsItem28Object;
|
||||
if(!nameFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem28Object.x = std::stof(nameFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem28Object.y = std::stof(nameFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nameFirstLine.keyPoints27.push_back(keyPointsItem28Object);
|
||||
}
|
||||
auto nameSecondLineNode = dataNode["NameSecondLine"];
|
||||
if(!nameSecondLineNode["Text"].isNull())
|
||||
data_.nameSecondLine.text = nameSecondLineNode["Text"].asString();
|
||||
if(!nameSecondLineNode["Score"].isNull())
|
||||
data_.nameSecondLine.score = nameSecondLineNode["Score"].asString();
|
||||
auto allKeyPoints29Node = nameSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameSecondLineNodeKeyPointskeyPointsItem : allKeyPoints29Node)
|
||||
{
|
||||
Data::NameSecondLine::KeyPointsItem30 keyPointsItem30Object;
|
||||
if(!nameSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem30Object.x = std::stof(nameSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem30Object.y = std::stof(nameSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nameSecondLine.keyPoints29.push_back(keyPointsItem30Object);
|
||||
}
|
||||
auto nationalityNode = dataNode["Nationality"];
|
||||
if(!nationalityNode["Text"].isNull())
|
||||
data_.nationality.text = nationalityNode["Text"].asString();
|
||||
if(!nationalityNode["Score"].isNull())
|
||||
data_.nationality.score = nationalityNode["Score"].asString();
|
||||
auto allKeyPoints31Node = nationalityNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nationalityNodeKeyPointskeyPointsItem : allKeyPoints31Node)
|
||||
{
|
||||
Data::Nationality::KeyPointsItem32 keyPointsItem32Object;
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem32Object.x = std::stof(nationalityNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem32Object.y = std::stof(nationalityNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nationality.keyPoints31.push_back(keyPointsItem32Object);
|
||||
}
|
||||
auto occupationNode = dataNode["Occupation"];
|
||||
if(!occupationNode["Text"].isNull())
|
||||
data_.occupation.text = occupationNode["Text"].asString();
|
||||
if(!occupationNode["Score"].isNull())
|
||||
data_.occupation.score = occupationNode["Score"].asString();
|
||||
auto allKeyPoints33Node = occupationNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto occupationNodeKeyPointskeyPointsItem : allKeyPoints33Node)
|
||||
{
|
||||
Data::Occupation::KeyPointsItem34 keyPointsItem34Object;
|
||||
if(!occupationNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem34Object.x = std::stof(occupationNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!occupationNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem34Object.y = std::stof(occupationNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.occupation.keyPoints33.push_back(keyPointsItem34Object);
|
||||
}
|
||||
auto portraitBoxNode = dataNode["PortraitBox"];
|
||||
if(!portraitBoxNode["Text"].isNull())
|
||||
data_.portraitBox.text = portraitBoxNode["Text"].asString();
|
||||
if(!portraitBoxNode["Score"].isNull())
|
||||
data_.portraitBox.score = portraitBoxNode["Score"].asString();
|
||||
auto allKeyPoints35Node = portraitBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto portraitBoxNodeKeyPointskeyPointsItem : allKeyPoints35Node)
|
||||
{
|
||||
Data::PortraitBox::KeyPointsItem36 keyPointsItem36Object;
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem36Object.x = std::stof(portraitBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem36Object.y = std::stof(portraitBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.portraitBox.keyPoints35.push_back(keyPointsItem36Object);
|
||||
}
|
||||
auto provinceNode = dataNode["Province"];
|
||||
if(!provinceNode["Text"].isNull())
|
||||
data_.province.text = provinceNode["Text"].asString();
|
||||
if(!provinceNode["Score"].isNull())
|
||||
data_.province.score = provinceNode["Score"].asString();
|
||||
auto allKeyPoints37Node = provinceNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto provinceNodeKeyPointskeyPointsItem : allKeyPoints37Node)
|
||||
{
|
||||
Data::Province::KeyPointsItem38 keyPointsItem38Object;
|
||||
if(!provinceNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem38Object.x = std::stof(provinceNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!provinceNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem38Object.y = std::stof(provinceNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.province.keyPoints37.push_back(keyPointsItem38Object);
|
||||
}
|
||||
auto religionNode = dataNode["Religion"];
|
||||
if(!religionNode["Text"].isNull())
|
||||
data_.religion.text = religionNode["Text"].asString();
|
||||
if(!religionNode["Score"].isNull())
|
||||
data_.religion.score = religionNode["Score"].asString();
|
||||
auto allKeyPoints39Node = religionNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto religionNodeKeyPointskeyPointsItem : allKeyPoints39Node)
|
||||
{
|
||||
Data::Religion::KeyPointsItem40 keyPointsItem40Object;
|
||||
if(!religionNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem40Object.x = std::stof(religionNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!religionNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem40Object.y = std::stof(religionNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.religion.keyPoints39.push_back(keyPointsItem40Object);
|
||||
}
|
||||
auto sexNode = dataNode["Sex"];
|
||||
if(!sexNode["Text"].isNull())
|
||||
data_.sex.text = sexNode["Text"].asString();
|
||||
if(!sexNode["Score"].isNull())
|
||||
data_.sex.score = sexNode["Score"].asString();
|
||||
auto allKeyPoints41Node = sexNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sexNodeKeyPointskeyPointsItem : allKeyPoints41Node)
|
||||
{
|
||||
Data::Sex::KeyPointsItem42 keyPointsItem42Object;
|
||||
if(!sexNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem42Object.x = std::stof(sexNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sexNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem42Object.y = std::stof(sexNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sex.keyPoints41.push_back(keyPointsItem42Object);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeIndonesiaIdentityCardResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeIndonesiaIdentityCardResult::Data RecognizeIndonesiaIdentityCardResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeIndonesiaIdentityCardResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeMalaysiaIdentityCardRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeMalaysiaIdentityCardRequest;
|
||||
|
||||
RecognizeMalaysiaIdentityCardRequest::RecognizeMalaysiaIdentityCardRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeMalaysiaIdentityCard") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeMalaysiaIdentityCardRequest::~RecognizeMalaysiaIdentityCardRequest() {}
|
||||
|
||||
std::string RecognizeMalaysiaIdentityCardRequest::getImageUrl() const {
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void RecognizeMalaysiaIdentityCardRequest::setImageUrl(const std::string &imageUrl) {
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter(std::string("ImageUrl"), imageUrl);
|
||||
}
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeMalaysiaIdentityCardResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeMalaysiaIdentityCardResult::RecognizeMalaysiaIdentityCardResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeMalaysiaIdentityCardResult::RecognizeMalaysiaIdentityCardResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeMalaysiaIdentityCardResult::~RecognizeMalaysiaIdentityCardResult()
|
||||
{}
|
||||
|
||||
void RecognizeMalaysiaIdentityCardResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto addressFirstLineNode = dataNode["AddressFirstLine"];
|
||||
if(!addressFirstLineNode["Text"].isNull())
|
||||
data_.addressFirstLine.text = addressFirstLineNode["Text"].asString();
|
||||
if(!addressFirstLineNode["Score"].isNull())
|
||||
data_.addressFirstLine.score = std::stof(addressFirstLineNode["Score"].asString());
|
||||
auto allKeyPointsNode = addressFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFirstLineNodeKeyPointskeyPointsItem : allKeyPointsNode)
|
||||
{
|
||||
Data::AddressFirstLine::KeyPointsItem keyPointsItemObject;
|
||||
if(!addressFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItemObject.x = std::stof(addressFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItemObject.y = std::stof(addressFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFirstLine.keyPoints.push_back(keyPointsItemObject);
|
||||
}
|
||||
auto addressSecondLineNode = dataNode["AddressSecondLine"];
|
||||
if(!addressSecondLineNode["Text"].isNull())
|
||||
data_.addressSecondLine.text = addressSecondLineNode["Text"].asString();
|
||||
if(!addressSecondLineNode["Score"].isNull())
|
||||
data_.addressSecondLine.score = std::stof(addressSecondLineNode["Score"].asString());
|
||||
auto allKeyPoints1Node = addressSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressSecondLineNodeKeyPointskeyPointsItem : allKeyPoints1Node)
|
||||
{
|
||||
Data::AddressSecondLine::KeyPointsItem2 keyPointsItem2Object;
|
||||
if(!addressSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem2Object.x = std::stof(addressSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem2Object.y = std::stof(addressSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressSecondLine.keyPoints1.push_back(keyPointsItem2Object);
|
||||
}
|
||||
auto addressThirdLineNode = dataNode["AddressThirdLine"];
|
||||
if(!addressThirdLineNode["Text"].isNull())
|
||||
data_.addressThirdLine.text = addressThirdLineNode["Text"].asString();
|
||||
if(!addressThirdLineNode["Score"].isNull())
|
||||
data_.addressThirdLine.score = std::stof(addressThirdLineNode["Score"].asString());
|
||||
auto allKeyPoints3Node = addressThirdLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressThirdLineNodeKeyPointskeyPointsItem : allKeyPoints3Node)
|
||||
{
|
||||
Data::AddressThirdLine::KeyPointsItem4 keyPointsItem4Object;
|
||||
if(!addressThirdLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem4Object.x = std::stof(addressThirdLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressThirdLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem4Object.y = std::stof(addressThirdLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressThirdLine.keyPoints3.push_back(keyPointsItem4Object);
|
||||
}
|
||||
auto addressFourthLineNode = dataNode["AddressFourthLine"];
|
||||
if(!addressFourthLineNode["Text"].isNull())
|
||||
data_.addressFourthLine.text = addressFourthLineNode["Text"].asString();
|
||||
if(!addressFourthLineNode["Score"].isNull())
|
||||
data_.addressFourthLine.score = std::stof(addressFourthLineNode["Score"].asString());
|
||||
auto allKeyPoints5Node = addressFourthLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFourthLineNodeKeyPointskeyPointsItem : allKeyPoints5Node)
|
||||
{
|
||||
Data::AddressFourthLine::KeyPointsItem6 keyPointsItem6Object;
|
||||
if(!addressFourthLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem6Object.x = std::stof(addressFourthLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFourthLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem6Object.y = std::stof(addressFourthLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFourthLine.keyPoints5.push_back(keyPointsItem6Object);
|
||||
}
|
||||
auto addressFifthLineNode = dataNode["AddressFifthLine"];
|
||||
if(!addressFifthLineNode["Text"].isNull())
|
||||
data_.addressFifthLine.text = addressFifthLineNode["Text"].asString();
|
||||
if(!addressFifthLineNode["Score"].isNull())
|
||||
data_.addressFifthLine.score = std::stof(addressFifthLineNode["Score"].asString());
|
||||
auto allKeyPoints7Node = addressFifthLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFifthLineNodeKeyPointskeyPointsItem : allKeyPoints7Node)
|
||||
{
|
||||
Data::AddressFifthLine::KeyPointsItem8 keyPointsItem8Object;
|
||||
if(!addressFifthLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem8Object.x = std::stof(addressFifthLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFifthLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem8Object.y = std::stof(addressFifthLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFifthLine.keyPoints7.push_back(keyPointsItem8Object);
|
||||
}
|
||||
auto cardBoxNode = dataNode["CardBox"];
|
||||
if(!cardBoxNode["Text"].isNull())
|
||||
data_.cardBox.text = cardBoxNode["Text"].asString();
|
||||
if(!cardBoxNode["Score"].isNull())
|
||||
data_.cardBox.score = cardBoxNode["Score"].asString();
|
||||
auto allKeyPoints9Node = cardBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto cardBoxNodeKeyPointskeyPointsItem : allKeyPoints9Node)
|
||||
{
|
||||
Data::CardBox::KeyPointsItem10 keyPointsItem10Object;
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem10Object.x = std::stof(cardBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem10Object.y = std::stof(cardBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cardBox.keyPoints9.push_back(keyPointsItem10Object);
|
||||
}
|
||||
auto driveClassNode = dataNode["DriveClass"];
|
||||
if(!driveClassNode["Text"].isNull())
|
||||
data_.driveClass.text = driveClassNode["Text"].asString();
|
||||
if(!driveClassNode["Score"].isNull())
|
||||
data_.driveClass.score = driveClassNode["Score"].asString();
|
||||
auto allKeyPoints11Node = driveClassNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto driveClassNodeKeyPointskeyPointsItem : allKeyPoints11Node)
|
||||
{
|
||||
Data::DriveClass::KeyPointsItem12 keyPointsItem12Object;
|
||||
if(!driveClassNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem12Object.x = std::stof(driveClassNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!driveClassNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem12Object.y = std::stof(driveClassNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.driveClass.keyPoints11.push_back(keyPointsItem12Object);
|
||||
}
|
||||
auto expiryDateNode = dataNode["ExpiryDate"];
|
||||
if(!expiryDateNode["Text"].isNull())
|
||||
data_.expiryDate.text = expiryDateNode["Text"].asString();
|
||||
if(!expiryDateNode["Score"].isNull())
|
||||
data_.expiryDate.score = expiryDateNode["Score"].asString();
|
||||
auto allKeyPoints13Node = expiryDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto expiryDateNodeKeyPointskeyPointsItem : allKeyPoints13Node)
|
||||
{
|
||||
Data::ExpiryDate::KeyPointsItem14 keyPointsItem14Object;
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem14Object.x = std::stof(expiryDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem14Object.y = std::stof(expiryDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.expiryDate.keyPoints13.push_back(keyPointsItem14Object);
|
||||
}
|
||||
auto idNumberNode = dataNode["IdNumber"];
|
||||
if(!idNumberNode["Text"].isNull())
|
||||
data_.idNumber.text = idNumberNode["Text"].asString();
|
||||
if(!idNumberNode["Score"].isNull())
|
||||
data_.idNumber.score = idNumberNode["Score"].asString();
|
||||
auto allKeyPoints15Node = idNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto idNumberNodeKeyPointskeyPointsItem : allKeyPoints15Node)
|
||||
{
|
||||
Data::IdNumber::KeyPointsItem16 keyPointsItem16Object;
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem16Object.x = std::stof(idNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem16Object.y = std::stof(idNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.idNumber.keyPoints15.push_back(keyPointsItem16Object);
|
||||
}
|
||||
auto issueDateNode = dataNode["IssueDate"];
|
||||
if(!issueDateNode["Text"].isNull())
|
||||
data_.issueDate.text = issueDateNode["Text"].asString();
|
||||
if(!issueDateNode["Score"].isNull())
|
||||
data_.issueDate.score = issueDateNode["Score"].asString();
|
||||
auto allKeyPoints17Node = issueDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto issueDateNodeKeyPointskeyPointsItem : allKeyPoints17Node)
|
||||
{
|
||||
Data::IssueDate::KeyPointsItem18 keyPointsItem18Object;
|
||||
if(!issueDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem18Object.x = std::stof(issueDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!issueDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem18Object.y = std::stof(issueDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.issueDate.keyPoints17.push_back(keyPointsItem18Object);
|
||||
}
|
||||
auto nameFirstLineNode = dataNode["NameFirstLine"];
|
||||
if(!nameFirstLineNode["Text"].isNull())
|
||||
data_.nameFirstLine.text = nameFirstLineNode["Text"].asString();
|
||||
if(!nameFirstLineNode["Score"].isNull())
|
||||
data_.nameFirstLine.score = nameFirstLineNode["Score"].asString();
|
||||
auto allKeyPoints19Node = nameFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameFirstLineNodeKeyPointskeyPointsItem : allKeyPoints19Node)
|
||||
{
|
||||
Data::NameFirstLine::KeyPointsItem20 keyPointsItem20Object;
|
||||
if(!nameFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem20Object.x = std::stof(nameFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem20Object.y = std::stof(nameFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nameFirstLine.keyPoints19.push_back(keyPointsItem20Object);
|
||||
}
|
||||
auto nameSecondLineNode = dataNode["NameSecondLine"];
|
||||
if(!nameSecondLineNode["Text"].isNull())
|
||||
data_.nameSecondLine.text = nameSecondLineNode["Text"].asString();
|
||||
if(!nameSecondLineNode["Score"].isNull())
|
||||
data_.nameSecondLine.score = nameSecondLineNode["Score"].asString();
|
||||
auto allKeyPoints21Node = nameSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameSecondLineNodeKeyPointskeyPointsItem : allKeyPoints21Node)
|
||||
{
|
||||
Data::NameSecondLine::KeyPointsItem22 keyPointsItem22Object;
|
||||
if(!nameSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem22Object.x = std::stof(nameSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem22Object.y = std::stof(nameSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nameSecondLine.keyPoints21.push_back(keyPointsItem22Object);
|
||||
}
|
||||
auto nationalityNode = dataNode["Nationality"];
|
||||
if(!nationalityNode["Text"].isNull())
|
||||
data_.nationality.text = nationalityNode["Text"].asString();
|
||||
if(!nationalityNode["Score"].isNull())
|
||||
data_.nationality.score = nationalityNode["Score"].asString();
|
||||
auto allKeyPoints23Node = nationalityNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nationalityNodeKeyPointskeyPointsItem : allKeyPoints23Node)
|
||||
{
|
||||
Data::Nationality::KeyPointsItem24 keyPointsItem24Object;
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem24Object.x = std::stof(nationalityNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem24Object.y = std::stof(nationalityNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nationality.keyPoints23.push_back(keyPointsItem24Object);
|
||||
}
|
||||
auto portraitBoxNode = dataNode["PortraitBox"];
|
||||
if(!portraitBoxNode["Text"].isNull())
|
||||
data_.portraitBox.text = portraitBoxNode["Text"].asString();
|
||||
if(!portraitBoxNode["Score"].isNull())
|
||||
data_.portraitBox.score = portraitBoxNode["Score"].asString();
|
||||
auto allKeyPoints25Node = portraitBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto portraitBoxNodeKeyPointskeyPointsItem : allKeyPoints25Node)
|
||||
{
|
||||
Data::PortraitBox::KeyPointsItem26 keyPointsItem26Object;
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem26Object.x = std::stof(portraitBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem26Object.y = std::stof(portraitBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.portraitBox.keyPoints25.push_back(keyPointsItem26Object);
|
||||
}
|
||||
auto sexNode = dataNode["Sex"];
|
||||
if(!sexNode["Text"].isNull())
|
||||
data_.sex.text = sexNode["Text"].asString();
|
||||
if(!sexNode["Score"].isNull())
|
||||
data_.sex.score = sexNode["Score"].asString();
|
||||
auto allKeyPoints27Node = sexNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sexNodeKeyPointskeyPointsItem : allKeyPoints27Node)
|
||||
{
|
||||
Data::Sex::KeyPointsItem28 keyPointsItem28Object;
|
||||
if(!sexNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem28Object.x = std::stof(sexNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sexNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem28Object.y = std::stof(sexNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sex.keyPoints27.push_back(keyPointsItem28Object);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeMalaysiaIdentityCardResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeMalaysiaIdentityCardResult::Data RecognizeMalaysiaIdentityCardResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeMalaysiaIdentityCardResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeRussiaIdentityCardRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeRussiaIdentityCardRequest;
|
||||
|
||||
RecognizeRussiaIdentityCardRequest::RecognizeRussiaIdentityCardRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeRussiaIdentityCard") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeRussiaIdentityCardRequest::~RecognizeRussiaIdentityCardRequest() {}
|
||||
|
||||
std::string RecognizeRussiaIdentityCardRequest::getImageUrl() const {
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void RecognizeRussiaIdentityCardRequest::setImageUrl(const std::string &imageUrl) {
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter(std::string("ImageUrl"), imageUrl);
|
||||
}
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeRussiaIdentityCardResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeRussiaIdentityCardResult::RecognizeRussiaIdentityCardResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeRussiaIdentityCardResult::RecognizeRussiaIdentityCardResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeRussiaIdentityCardResult::~RecognizeRussiaIdentityCardResult()
|
||||
{}
|
||||
|
||||
void RecognizeRussiaIdentityCardResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto birthDateNode = dataNode["BirthDate"];
|
||||
if(!birthDateNode["Text"].isNull())
|
||||
data_.birthDate.text = birthDateNode["Text"].asString();
|
||||
if(!birthDateNode["Score"].isNull())
|
||||
data_.birthDate.score = std::stof(birthDateNode["Score"].asString());
|
||||
auto allKeyPointsNode = birthDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthDateNodeKeyPointskeyPointsItem : allKeyPointsNode)
|
||||
{
|
||||
Data::BirthDate::KeyPointsItem keyPointsItemObject;
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItemObject.x = std::stof(birthDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItemObject.y = std::stof(birthDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthDate.keyPoints.push_back(keyPointsItemObject);
|
||||
}
|
||||
auto birthPlaceFirstLineNode = dataNode["BirthPlaceFirstLine"];
|
||||
if(!birthPlaceFirstLineNode["Text"].isNull())
|
||||
data_.birthPlaceFirstLine.text = birthPlaceFirstLineNode["Text"].asString();
|
||||
if(!birthPlaceFirstLineNode["Score"].isNull())
|
||||
data_.birthPlaceFirstLine.score = std::stof(birthPlaceFirstLineNode["Score"].asString());
|
||||
auto allKeyPoints1Node = birthPlaceFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthPlaceFirstLineNodeKeyPointskeyPointsItem : allKeyPoints1Node)
|
||||
{
|
||||
Data::BirthPlaceFirstLine::KeyPointsItem2 keyPointsItem2Object;
|
||||
if(!birthPlaceFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem2Object.x = std::stof(birthPlaceFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthPlaceFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem2Object.y = std::stof(birthPlaceFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthPlaceFirstLine.keyPoints1.push_back(keyPointsItem2Object);
|
||||
}
|
||||
auto birthPlaceSecondLineNode = dataNode["BirthPlaceSecondLine"];
|
||||
if(!birthPlaceSecondLineNode["Text"].isNull())
|
||||
data_.birthPlaceSecondLine.text = birthPlaceSecondLineNode["Text"].asString();
|
||||
if(!birthPlaceSecondLineNode["Score"].isNull())
|
||||
data_.birthPlaceSecondLine.score = std::stof(birthPlaceSecondLineNode["Score"].asString());
|
||||
auto allKeyPoints3Node = birthPlaceSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthPlaceSecondLineNodeKeyPointskeyPointsItem : allKeyPoints3Node)
|
||||
{
|
||||
Data::BirthPlaceSecondLine::KeyPointsItem4 keyPointsItem4Object;
|
||||
if(!birthPlaceSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem4Object.x = std::stof(birthPlaceSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthPlaceSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem4Object.y = std::stof(birthPlaceSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthPlaceSecondLine.keyPoints3.push_back(keyPointsItem4Object);
|
||||
}
|
||||
auto birthPlaceThirdLineNode = dataNode["BirthPlaceThirdLine"];
|
||||
if(!birthPlaceThirdLineNode["Text"].isNull())
|
||||
data_.birthPlaceThirdLine.text = birthPlaceThirdLineNode["Text"].asString();
|
||||
if(!birthPlaceThirdLineNode["Score"].isNull())
|
||||
data_.birthPlaceThirdLine.score = std::stof(birthPlaceThirdLineNode["Score"].asString());
|
||||
auto allKeyPoints5Node = birthPlaceThirdLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthPlaceThirdLineNodeKeyPointskeyPointsItem : allKeyPoints5Node)
|
||||
{
|
||||
Data::BirthPlaceThirdLine::KeyPointsItem6 keyPointsItem6Object;
|
||||
if(!birthPlaceThirdLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem6Object.x = std::stof(birthPlaceThirdLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthPlaceThirdLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem6Object.y = std::stof(birthPlaceThirdLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthPlaceThirdLine.keyPoints5.push_back(keyPointsItem6Object);
|
||||
}
|
||||
auto cardBoxNode = dataNode["CardBox"];
|
||||
if(!cardBoxNode["Text"].isNull())
|
||||
data_.cardBox.text = cardBoxNode["Text"].asString();
|
||||
if(!cardBoxNode["Score"].isNull())
|
||||
data_.cardBox.score = cardBoxNode["Score"].asString();
|
||||
auto allKeyPoints7Node = cardBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto cardBoxNodeKeyPointskeyPointsItem : allKeyPoints7Node)
|
||||
{
|
||||
Data::CardBox::KeyPointsItem8 keyPointsItem8Object;
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem8Object.x = std::stof(cardBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem8Object.y = std::stof(cardBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cardBox.keyPoints7.push_back(keyPointsItem8Object);
|
||||
}
|
||||
auto givenNameNode = dataNode["GivenName"];
|
||||
if(!givenNameNode["Text"].isNull())
|
||||
data_.givenName.text = givenNameNode["Text"].asString();
|
||||
if(!givenNameNode["Score"].isNull())
|
||||
data_.givenName.score = givenNameNode["Score"].asString();
|
||||
auto allKeyPoints9Node = givenNameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto givenNameNodeKeyPointskeyPointsItem : allKeyPoints9Node)
|
||||
{
|
||||
Data::GivenName::KeyPointsItem10 keyPointsItem10Object;
|
||||
if(!givenNameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem10Object.x = std::stof(givenNameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!givenNameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem10Object.y = std::stof(givenNameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.givenName.keyPoints9.push_back(keyPointsItem10Object);
|
||||
}
|
||||
auto idNumberNode = dataNode["IdNumber"];
|
||||
if(!idNumberNode["Text"].isNull())
|
||||
data_.idNumber.text = idNumberNode["Text"].asString();
|
||||
if(!idNumberNode["Score"].isNull())
|
||||
data_.idNumber.score = idNumberNode["Score"].asString();
|
||||
auto allKeyPoints11Node = idNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto idNumberNodeKeyPointskeyPointsItem : allKeyPoints11Node)
|
||||
{
|
||||
Data::IdNumber::KeyPointsItem12 keyPointsItem12Object;
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem12Object.x = std::stof(idNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem12Object.y = std::stof(idNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.idNumber.keyPoints11.push_back(keyPointsItem12Object);
|
||||
}
|
||||
auto paternalNameNode = dataNode["PaternalName"];
|
||||
if(!paternalNameNode["Text"].isNull())
|
||||
data_.paternalName.text = paternalNameNode["Text"].asString();
|
||||
if(!paternalNameNode["Score"].isNull())
|
||||
data_.paternalName.score = paternalNameNode["Score"].asString();
|
||||
auto allKeyPoints13Node = paternalNameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto paternalNameNodeKeyPointskeyPointsItem : allKeyPoints13Node)
|
||||
{
|
||||
Data::PaternalName::KeyPointsItem14 keyPointsItem14Object;
|
||||
if(!paternalNameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem14Object.x = std::stof(paternalNameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!paternalNameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem14Object.y = std::stof(paternalNameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.paternalName.keyPoints13.push_back(keyPointsItem14Object);
|
||||
}
|
||||
auto portraitBoxNode = dataNode["PortraitBox"];
|
||||
if(!portraitBoxNode["Text"].isNull())
|
||||
data_.portraitBox.text = portraitBoxNode["Text"].asString();
|
||||
if(!portraitBoxNode["Score"].isNull())
|
||||
data_.portraitBox.score = portraitBoxNode["Score"].asString();
|
||||
auto allKeyPoints15Node = portraitBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto portraitBoxNodeKeyPointskeyPointsItem : allKeyPoints15Node)
|
||||
{
|
||||
Data::PortraitBox::KeyPointsItem16 keyPointsItem16Object;
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem16Object.x = std::stof(portraitBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem16Object.y = std::stof(portraitBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.portraitBox.keyPoints15.push_back(keyPointsItem16Object);
|
||||
}
|
||||
auto sexNode = dataNode["Sex"];
|
||||
if(!sexNode["Text"].isNull())
|
||||
data_.sex.text = sexNode["Text"].asString();
|
||||
if(!sexNode["Score"].isNull())
|
||||
data_.sex.score = sexNode["Score"].asString();
|
||||
auto allKeyPoints17Node = sexNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sexNodeKeyPointskeyPointsItem : allKeyPoints17Node)
|
||||
{
|
||||
Data::Sex::KeyPointsItem18 keyPointsItem18Object;
|
||||
if(!sexNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem18Object.x = std::stof(sexNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sexNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem18Object.y = std::stof(sexNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sex.keyPoints17.push_back(keyPointsItem18Object);
|
||||
}
|
||||
auto surnameFirstLineNode = dataNode["SurnameFirstLine"];
|
||||
if(!surnameFirstLineNode["Text"].isNull())
|
||||
data_.surnameFirstLine.text = surnameFirstLineNode["Text"].asString();
|
||||
if(!surnameFirstLineNode["Score"].isNull())
|
||||
data_.surnameFirstLine.score = surnameFirstLineNode["Score"].asString();
|
||||
auto allKeyPoints19Node = surnameFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto surnameFirstLineNodeKeyPointskeyPointsItem : allKeyPoints19Node)
|
||||
{
|
||||
Data::SurnameFirstLine::KeyPointsItem20 keyPointsItem20Object;
|
||||
if(!surnameFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem20Object.x = std::stof(surnameFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!surnameFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem20Object.y = std::stof(surnameFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.surnameFirstLine.keyPoints19.push_back(keyPointsItem20Object);
|
||||
}
|
||||
auto surnameSecondLineNode = dataNode["SurnameSecondLine"];
|
||||
if(!surnameSecondLineNode["Text"].isNull())
|
||||
data_.surnameSecondLine.text = surnameSecondLineNode["Text"].asString();
|
||||
if(!surnameSecondLineNode["Score"].isNull())
|
||||
data_.surnameSecondLine.score = surnameSecondLineNode["Score"].asString();
|
||||
auto allKeyPoints21Node = surnameSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto surnameSecondLineNodeKeyPointskeyPointsItem : allKeyPoints21Node)
|
||||
{
|
||||
Data::SurnameSecondLine::KeyPointsItem22 keyPointsItem22Object;
|
||||
if(!surnameSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem22Object.x = std::stof(surnameSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!surnameSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem22Object.y = std::stof(surnameSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.surnameSecondLine.keyPoints21.push_back(keyPointsItem22Object);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeRussiaIdentityCardResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeRussiaIdentityCardResult::Data RecognizeRussiaIdentityCardResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeRussiaIdentityCardResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeTurkeyIdentityCardRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeTurkeyIdentityCardRequest;
|
||||
|
||||
RecognizeTurkeyIdentityCardRequest::RecognizeTurkeyIdentityCardRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeTurkeyIdentityCard") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeTurkeyIdentityCardRequest::~RecognizeTurkeyIdentityCardRequest() {}
|
||||
|
||||
std::string RecognizeTurkeyIdentityCardRequest::getImageUrl() const {
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void RecognizeTurkeyIdentityCardRequest::setImageUrl(const std::string &imageUrl) {
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter(std::string("ImageUrl"), imageUrl);
|
||||
}
|
||||
|
||||
@@ -1,724 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeTurkeyIdentityCardResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeTurkeyIdentityCardResult::RecognizeTurkeyIdentityCardResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeTurkeyIdentityCardResult::RecognizeTurkeyIdentityCardResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeTurkeyIdentityCardResult::~RecognizeTurkeyIdentityCardResult()
|
||||
{}
|
||||
|
||||
void RecognizeTurkeyIdentityCardResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto auxiliaryToolsNode = dataNode["AuxiliaryTools"];
|
||||
if(!auxiliaryToolsNode["Text"].isNull())
|
||||
data_.auxiliaryTools.text = auxiliaryToolsNode["Text"].asString();
|
||||
if(!auxiliaryToolsNode["Score"].isNull())
|
||||
data_.auxiliaryTools.score = std::stof(auxiliaryToolsNode["Score"].asString());
|
||||
auto allKeyPointsNode = auxiliaryToolsNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto auxiliaryToolsNodeKeyPointskeyPointsItem : allKeyPointsNode)
|
||||
{
|
||||
Data::AuxiliaryTools::KeyPointsItem keyPointsItemObject;
|
||||
if(!auxiliaryToolsNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItemObject.x = std::stof(auxiliaryToolsNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!auxiliaryToolsNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItemObject.y = std::stof(auxiliaryToolsNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.auxiliaryTools.keyPoints.push_back(keyPointsItemObject);
|
||||
}
|
||||
auto birthDateNode = dataNode["BirthDate"];
|
||||
if(!birthDateNode["Text"].isNull())
|
||||
data_.birthDate.text = birthDateNode["Text"].asString();
|
||||
if(!birthDateNode["Score"].isNull())
|
||||
data_.birthDate.score = std::stof(birthDateNode["Score"].asString());
|
||||
auto allKeyPoints1Node = birthDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthDateNodeKeyPointskeyPointsItem : allKeyPoints1Node)
|
||||
{
|
||||
Data::BirthDate::KeyPointsItem2 keyPointsItem2Object;
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem2Object.x = std::stof(birthDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem2Object.y = std::stof(birthDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthDate.keyPoints1.push_back(keyPointsItem2Object);
|
||||
}
|
||||
auto birthPlaceNode = dataNode["BirthPlace"];
|
||||
if(!birthPlaceNode["Text"].isNull())
|
||||
data_.birthPlace.text = birthPlaceNode["Text"].asString();
|
||||
if(!birthPlaceNode["Score"].isNull())
|
||||
data_.birthPlace.score = std::stof(birthPlaceNode["Score"].asString());
|
||||
auto allKeyPoints3Node = birthPlaceNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthPlaceNodeKeyPointskeyPointsItem : allKeyPoints3Node)
|
||||
{
|
||||
Data::BirthPlace::KeyPointsItem4 keyPointsItem4Object;
|
||||
if(!birthPlaceNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem4Object.x = std::stof(birthPlaceNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthPlaceNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem4Object.y = std::stof(birthPlaceNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthPlace.keyPoints3.push_back(keyPointsItem4Object);
|
||||
}
|
||||
auto bloodTypeNode = dataNode["BloodType"];
|
||||
if(!bloodTypeNode["Text"].isNull())
|
||||
data_.bloodType.text = bloodTypeNode["Text"].asString();
|
||||
if(!bloodTypeNode["Score"].isNull())
|
||||
data_.bloodType.score = std::stof(bloodTypeNode["Score"].asString());
|
||||
auto allKeyPoints5Node = bloodTypeNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto bloodTypeNodeKeyPointskeyPointsItem : allKeyPoints5Node)
|
||||
{
|
||||
Data::BloodType::KeyPointsItem6 keyPointsItem6Object;
|
||||
if(!bloodTypeNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem6Object.x = std::stof(bloodTypeNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!bloodTypeNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem6Object.y = std::stof(bloodTypeNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.bloodType.keyPoints5.push_back(keyPointsItem6Object);
|
||||
}
|
||||
auto cardBoxNode = dataNode["CardBox"];
|
||||
if(!cardBoxNode["Text"].isNull())
|
||||
data_.cardBox.text = cardBoxNode["Text"].asString();
|
||||
if(!cardBoxNode["Score"].isNull())
|
||||
data_.cardBox.score = std::stof(cardBoxNode["Score"].asString());
|
||||
auto allKeyPoints7Node = cardBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto cardBoxNodeKeyPointskeyPointsItem : allKeyPoints7Node)
|
||||
{
|
||||
Data::CardBox::KeyPointsItem8 keyPointsItem8Object;
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem8Object.x = std::stof(cardBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem8Object.y = std::stof(cardBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cardBox.keyPoints7.push_back(keyPointsItem8Object);
|
||||
}
|
||||
auto ciltNode = dataNode["Cilt"];
|
||||
if(!ciltNode["Text"].isNull())
|
||||
data_.cilt.text = ciltNode["Text"].asString();
|
||||
if(!ciltNode["Score"].isNull())
|
||||
data_.cilt.score = std::stof(ciltNode["Score"].asString());
|
||||
auto allKeyPoints9Node = ciltNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto ciltNodeKeyPointskeyPointsItem : allKeyPoints9Node)
|
||||
{
|
||||
Data::Cilt::KeyPointsItem10 keyPointsItem10Object;
|
||||
if(!ciltNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem10Object.x = std::stof(ciltNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!ciltNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem10Object.y = std::stof(ciltNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cilt.keyPoints9.push_back(keyPointsItem10Object);
|
||||
}
|
||||
auto documentNumberNode = dataNode["DocumentNumber"];
|
||||
if(!documentNumberNode["Text"].isNull())
|
||||
data_.documentNumber.text = documentNumberNode["Text"].asString();
|
||||
if(!documentNumberNode["Score"].isNull())
|
||||
data_.documentNumber.score = std::stof(documentNumberNode["Score"].asString());
|
||||
auto allKeyPoints11Node = documentNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto documentNumberNodeKeyPointskeyPointsItem : allKeyPoints11Node)
|
||||
{
|
||||
Data::DocumentNumber::KeyPointsItem12 keyPointsItem12Object;
|
||||
if(!documentNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem12Object.x = std::stof(documentNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!documentNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem12Object.y = std::stof(documentNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.documentNumber.keyPoints11.push_back(keyPointsItem12Object);
|
||||
}
|
||||
auto driveClassNode = dataNode["DriveClass"];
|
||||
if(!driveClassNode["Text"].isNull())
|
||||
data_.driveClass.text = driveClassNode["Text"].asString();
|
||||
if(!driveClassNode["Score"].isNull())
|
||||
data_.driveClass.score = std::stof(driveClassNode["Score"].asString());
|
||||
auto allKeyPoints13Node = driveClassNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto driveClassNodeKeyPointskeyPointsItem : allKeyPoints13Node)
|
||||
{
|
||||
Data::DriveClass::KeyPointsItem14 keyPointsItem14Object;
|
||||
if(!driveClassNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem14Object.x = std::stof(driveClassNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!driveClassNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem14Object.y = std::stof(driveClassNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.driveClass.keyPoints13.push_back(keyPointsItem14Object);
|
||||
}
|
||||
auto dueDateNode = dataNode["DueDate"];
|
||||
if(!dueDateNode["Text"].isNull())
|
||||
data_.dueDate.text = dueDateNode["Text"].asString();
|
||||
if(!dueDateNode["Score"].isNull())
|
||||
data_.dueDate.score = std::stof(dueDateNode["Score"].asString());
|
||||
auto allKeyPoints15Node = dueDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto dueDateNodeKeyPointskeyPointsItem : allKeyPoints15Node)
|
||||
{
|
||||
Data::DueDate::KeyPointsItem16 keyPointsItem16Object;
|
||||
if(!dueDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem16Object.x = std::stof(dueDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!dueDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem16Object.y = std::stof(dueDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.dueDate.keyPoints15.push_back(keyPointsItem16Object);
|
||||
}
|
||||
auto duzenleyenNode = dataNode["Duzenleyen"];
|
||||
if(!duzenleyenNode["Text"].isNull())
|
||||
data_.duzenleyen.text = duzenleyenNode["Text"].asString();
|
||||
if(!duzenleyenNode["Score"].isNull())
|
||||
data_.duzenleyen.score = std::stof(duzenleyenNode["Score"].asString());
|
||||
auto allKeyPoints17Node = duzenleyenNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto duzenleyenNodeKeyPointskeyPointsItem : allKeyPoints17Node)
|
||||
{
|
||||
Data::Duzenleyen::KeyPointsItem18 keyPointsItem18Object;
|
||||
if(!duzenleyenNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem18Object.x = std::stof(duzenleyenNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!duzenleyenNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem18Object.y = std::stof(duzenleyenNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.duzenleyen.keyPoints17.push_back(keyPointsItem18Object);
|
||||
}
|
||||
auto entryNumberNode = dataNode["EntryNumber"];
|
||||
if(!entryNumberNode["Text"].isNull())
|
||||
data_.entryNumber.text = entryNumberNode["Text"].asString();
|
||||
if(!entryNumberNode["Score"].isNull())
|
||||
data_.entryNumber.score = std::stof(entryNumberNode["Score"].asString());
|
||||
auto allKeyPoints19Node = entryNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto entryNumberNodeKeyPointskeyPointsItem : allKeyPoints19Node)
|
||||
{
|
||||
Data::EntryNumber::KeyPointsItem20 keyPointsItem20Object;
|
||||
if(!entryNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem20Object.x = std::stof(entryNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!entryNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem20Object.y = std::stof(entryNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.entryNumber.keyPoints19.push_back(keyPointsItem20Object);
|
||||
}
|
||||
auto expiryDateNode = dataNode["ExpiryDate"];
|
||||
if(!expiryDateNode["Text"].isNull())
|
||||
data_.expiryDate.text = expiryDateNode["Text"].asString();
|
||||
if(!expiryDateNode["Score"].isNull())
|
||||
data_.expiryDate.score = std::stof(expiryDateNode["Score"].asString());
|
||||
auto allKeyPoints21Node = expiryDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto expiryDateNodeKeyPointskeyPointsItem : allKeyPoints21Node)
|
||||
{
|
||||
Data::ExpiryDate::KeyPointsItem22 keyPointsItem22Object;
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem22Object.x = std::stof(expiryDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem22Object.y = std::stof(expiryDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.expiryDate.keyPoints21.push_back(keyPointsItem22Object);
|
||||
}
|
||||
auto fatherNameNode = dataNode["FatherName"];
|
||||
if(!fatherNameNode["Text"].isNull())
|
||||
data_.fatherName.text = fatherNameNode["Text"].asString();
|
||||
if(!fatherNameNode["Score"].isNull())
|
||||
data_.fatherName.score = std::stof(fatherNameNode["Score"].asString());
|
||||
auto allKeyPoints23Node = fatherNameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto fatherNameNodeKeyPointskeyPointsItem : allKeyPoints23Node)
|
||||
{
|
||||
Data::FatherName::KeyPointsItem24 keyPointsItem24Object;
|
||||
if(!fatherNameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem24Object.x = std::stof(fatherNameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!fatherNameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem24Object.y = std::stof(fatherNameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.fatherName.keyPoints23.push_back(keyPointsItem24Object);
|
||||
}
|
||||
auto foreignersIdNode = dataNode["ForeignersId"];
|
||||
if(!foreignersIdNode["Text"].isNull())
|
||||
data_.foreignersId.text = foreignersIdNode["Text"].asString();
|
||||
if(!foreignersIdNode["Score"].isNull())
|
||||
data_.foreignersId.score = std::stof(foreignersIdNode["Score"].asString());
|
||||
auto allKeyPoints25Node = foreignersIdNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto foreignersIdNodeKeyPointskeyPointsItem : allKeyPoints25Node)
|
||||
{
|
||||
Data::ForeignersId::KeyPointsItem26 keyPointsItem26Object;
|
||||
if(!foreignersIdNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem26Object.x = std::stof(foreignersIdNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!foreignersIdNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem26Object.y = std::stof(foreignersIdNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.foreignersId.keyPoints25.push_back(keyPointsItem26Object);
|
||||
}
|
||||
auto genderNode = dataNode["Gender"];
|
||||
if(!genderNode["Text"].isNull())
|
||||
data_.gender.text = genderNode["Text"].asString();
|
||||
if(!genderNode["Score"].isNull())
|
||||
data_.gender.score = std::stof(genderNode["Score"].asString());
|
||||
auto allKeyPoints27Node = genderNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto genderNodeKeyPointskeyPointsItem : allKeyPoints27Node)
|
||||
{
|
||||
Data::Gender::KeyPointsItem28 keyPointsItem28Object;
|
||||
if(!genderNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem28Object.x = std::stof(genderNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!genderNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem28Object.y = std::stof(genderNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.gender.keyPoints27.push_back(keyPointsItem28Object);
|
||||
}
|
||||
auto givenNameNode = dataNode["GivenName"];
|
||||
if(!givenNameNode["Text"].isNull())
|
||||
data_.givenName.text = givenNameNode["Text"].asString();
|
||||
if(!givenNameNode["Score"].isNull())
|
||||
data_.givenName.score = std::stof(givenNameNode["Score"].asString());
|
||||
auto allKeyPoints29Node = givenNameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto givenNameNodeKeyPointskeyPointsItem : allKeyPoints29Node)
|
||||
{
|
||||
Data::GivenName::KeyPointsItem30 keyPointsItem30Object;
|
||||
if(!givenNameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem30Object.x = std::stof(givenNameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!givenNameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem30Object.y = std::stof(givenNameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.givenName.keyPoints29.push_back(keyPointsItem30Object);
|
||||
}
|
||||
auto idNumberNode = dataNode["IdNumber"];
|
||||
if(!idNumberNode["Text"].isNull())
|
||||
data_.idNumber.text = idNumberNode["Text"].asString();
|
||||
if(!idNumberNode["Score"].isNull())
|
||||
data_.idNumber.score = std::stof(idNumberNode["Score"].asString());
|
||||
auto allKeyPoints31Node = idNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto idNumberNodeKeyPointskeyPointsItem : allKeyPoints31Node)
|
||||
{
|
||||
Data::IdNumber::KeyPointsItem32 keyPointsItem32Object;
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem32Object.x = std::stof(idNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem32Object.y = std::stof(idNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.idNumber.keyPoints31.push_back(keyPointsItem32Object);
|
||||
}
|
||||
auto issueByNode = dataNode["IssueBy"];
|
||||
if(!issueByNode["Text"].isNull())
|
||||
data_.issueBy.text = issueByNode["Text"].asString();
|
||||
if(!issueByNode["Score"].isNull())
|
||||
data_.issueBy.score = std::stof(issueByNode["Score"].asString());
|
||||
auto allKeyPoints33Node = issueByNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto issueByNodeKeyPointskeyPointsItem : allKeyPoints33Node)
|
||||
{
|
||||
Data::IssueBy::KeyPointsItem34 keyPointsItem34Object;
|
||||
if(!issueByNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem34Object.x = std::stof(issueByNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!issueByNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem34Object.y = std::stof(issueByNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.issueBy.keyPoints33.push_back(keyPointsItem34Object);
|
||||
}
|
||||
auto issueCountyNode = dataNode["IssueCounty"];
|
||||
if(!issueCountyNode["Text"].isNull())
|
||||
data_.issueCounty.text = issueCountyNode["Text"].asString();
|
||||
if(!issueCountyNode["Score"].isNull())
|
||||
data_.issueCounty.score = std::stof(issueCountyNode["Score"].asString());
|
||||
auto allKeyPoints35Node = issueCountyNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto issueCountyNodeKeyPointskeyPointsItem : allKeyPoints35Node)
|
||||
{
|
||||
Data::IssueCounty::KeyPointsItem36 keyPointsItem36Object;
|
||||
if(!issueCountyNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem36Object.x = std::stof(issueCountyNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!issueCountyNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem36Object.y = std::stof(issueCountyNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.issueCounty.keyPoints35.push_back(keyPointsItem36Object);
|
||||
}
|
||||
auto issueDateNode = dataNode["IssueDate"];
|
||||
if(!issueDateNode["Text"].isNull())
|
||||
data_.issueDate.text = issueDateNode["Text"].asString();
|
||||
if(!issueDateNode["Score"].isNull())
|
||||
data_.issueDate.score = std::stof(issueDateNode["Score"].asString());
|
||||
auto allKeyPoints37Node = issueDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto issueDateNodeKeyPointskeyPointsItem : allKeyPoints37Node)
|
||||
{
|
||||
Data::IssueDate::KeyPointsItem38 keyPointsItem38Object;
|
||||
if(!issueDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem38Object.x = std::stof(issueDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!issueDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem38Object.y = std::stof(issueDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.issueDate.keyPoints37.push_back(keyPointsItem38Object);
|
||||
}
|
||||
auto issuePlaceNode = dataNode["IssuePlace"];
|
||||
if(!issuePlaceNode["Text"].isNull())
|
||||
data_.issuePlace.text = issuePlaceNode["Text"].asString();
|
||||
if(!issuePlaceNode["Score"].isNull())
|
||||
data_.issuePlace.score = std::stof(issuePlaceNode["Score"].asString());
|
||||
auto allKeyPoints39Node = issuePlaceNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto issuePlaceNodeKeyPointskeyPointsItem : allKeyPoints39Node)
|
||||
{
|
||||
Data::IssuePlace::KeyPointsItem40 keyPointsItem40Object;
|
||||
if(!issuePlaceNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem40Object.x = std::stof(issuePlaceNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!issuePlaceNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem40Object.y = std::stof(issuePlaceNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.issuePlace.keyPoints39.push_back(keyPointsItem40Object);
|
||||
}
|
||||
auto kutukNode = dataNode["Kutuk"];
|
||||
if(!kutukNode["Text"].isNull())
|
||||
data_.kutuk.text = kutukNode["Text"].asString();
|
||||
if(!kutukNode["Score"].isNull())
|
||||
data_.kutuk.score = std::stof(kutukNode["Score"].asString());
|
||||
auto allKeyPoints41Node = kutukNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto kutukNodeKeyPointskeyPointsItem : allKeyPoints41Node)
|
||||
{
|
||||
Data::Kutuk::KeyPointsItem42 keyPointsItem42Object;
|
||||
if(!kutukNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem42Object.x = std::stof(kutukNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!kutukNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem42Object.y = std::stof(kutukNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.kutuk.keyPoints41.push_back(keyPointsItem42Object);
|
||||
}
|
||||
auto licenseNumberNode = dataNode["LicenseNumber"];
|
||||
if(!licenseNumberNode["Text"].isNull())
|
||||
data_.licenseNumber.text = licenseNumberNode["Text"].asString();
|
||||
if(!licenseNumberNode["Score"].isNull())
|
||||
data_.licenseNumber.score = std::stof(licenseNumberNode["Score"].asString());
|
||||
auto allKeyPoints43Node = licenseNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto licenseNumberNodeKeyPointskeyPointsItem : allKeyPoints43Node)
|
||||
{
|
||||
Data::LicenseNumber::KeyPointsItem44 keyPointsItem44Object;
|
||||
if(!licenseNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem44Object.x = std::stof(licenseNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!licenseNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem44Object.y = std::stof(licenseNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.licenseNumber.keyPoints43.push_back(keyPointsItem44Object);
|
||||
}
|
||||
auto maritalStatusNode = dataNode["MaritalStatus"];
|
||||
if(!maritalStatusNode["Text"].isNull())
|
||||
data_.maritalStatus.text = maritalStatusNode["Text"].asString();
|
||||
if(!maritalStatusNode["Score"].isNull())
|
||||
data_.maritalStatus.score = std::stof(maritalStatusNode["Score"].asString());
|
||||
auto allKeyPoints45Node = maritalStatusNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto maritalStatusNodeKeyPointskeyPointsItem : allKeyPoints45Node)
|
||||
{
|
||||
Data::MaritalStatus::KeyPointsItem46 keyPointsItem46Object;
|
||||
if(!maritalStatusNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem46Object.x = std::stof(maritalStatusNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!maritalStatusNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem46Object.y = std::stof(maritalStatusNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.maritalStatus.keyPoints45.push_back(keyPointsItem46Object);
|
||||
}
|
||||
auto motherNameNode = dataNode["MotherName"];
|
||||
if(!motherNameNode["Text"].isNull())
|
||||
data_.motherName.text = motherNameNode["Text"].asString();
|
||||
if(!motherNameNode["Score"].isNull())
|
||||
data_.motherName.score = std::stof(motherNameNode["Score"].asString());
|
||||
auto allKeyPoints47Node = motherNameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto motherNameNodeKeyPointskeyPointsItem : allKeyPoints47Node)
|
||||
{
|
||||
Data::MotherName::KeyPointsItem48 keyPointsItem48Object;
|
||||
if(!motherNameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem48Object.x = std::stof(motherNameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!motherNameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem48Object.y = std::stof(motherNameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.motherName.keyPoints47.push_back(keyPointsItem48Object);
|
||||
}
|
||||
auto nameNode = dataNode["Name"];
|
||||
if(!nameNode["Text"].isNull())
|
||||
data_.name.text = nameNode["Text"].asString();
|
||||
if(!nameNode["Score"].isNull())
|
||||
data_.name.score = std::stof(nameNode["Score"].asString());
|
||||
auto allKeyPoints49Node = nameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameNodeKeyPointskeyPointsItem : allKeyPoints49Node)
|
||||
{
|
||||
Data::Name::KeyPointsItem50 keyPointsItem50Object;
|
||||
if(!nameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem50Object.x = std::stof(nameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem50Object.y = std::stof(nameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.name.keyPoints49.push_back(keyPointsItem50Object);
|
||||
}
|
||||
auto nationalityNode = dataNode["Nationality"];
|
||||
if(!nationalityNode["Text"].isNull())
|
||||
data_.nationality.text = nationalityNode["Text"].asString();
|
||||
if(!nationalityNode["Score"].isNull())
|
||||
data_.nationality.score = std::stof(nationalityNode["Score"].asString());
|
||||
auto allKeyPoints51Node = nationalityNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nationalityNodeKeyPointskeyPointsItem : allKeyPoints51Node)
|
||||
{
|
||||
Data::Nationality::KeyPointsItem52 keyPointsItem52Object;
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem52Object.x = std::stof(nationalityNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem52Object.y = std::stof(nationalityNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nationality.keyPoints51.push_back(keyPointsItem52Object);
|
||||
}
|
||||
auto neighborhoodVillageNode = dataNode["NeighborhoodVillage"];
|
||||
if(!neighborhoodVillageNode["Text"].isNull())
|
||||
data_.neighborhoodVillage.text = neighborhoodVillageNode["Text"].asString();
|
||||
if(!neighborhoodVillageNode["Score"].isNull())
|
||||
data_.neighborhoodVillage.score = std::stof(neighborhoodVillageNode["Score"].asString());
|
||||
auto allKeyPoints53Node = neighborhoodVillageNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto neighborhoodVillageNodeKeyPointskeyPointsItem : allKeyPoints53Node)
|
||||
{
|
||||
Data::NeighborhoodVillage::KeyPointsItem54 keyPointsItem54Object;
|
||||
if(!neighborhoodVillageNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem54Object.x = std::stof(neighborhoodVillageNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!neighborhoodVillageNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem54Object.y = std::stof(neighborhoodVillageNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.neighborhoodVillage.keyPoints53.push_back(keyPointsItem54Object);
|
||||
}
|
||||
auto pageNumberNode = dataNode["PageNumber"];
|
||||
if(!pageNumberNode["Text"].isNull())
|
||||
data_.pageNumber.text = pageNumberNode["Text"].asString();
|
||||
if(!pageNumberNode["Score"].isNull())
|
||||
data_.pageNumber.score = std::stof(pageNumberNode["Score"].asString());
|
||||
auto allKeyPoints55Node = pageNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto pageNumberNodeKeyPointskeyPointsItem : allKeyPoints55Node)
|
||||
{
|
||||
Data::PageNumber::KeyPointsItem56 keyPointsItem56Object;
|
||||
if(!pageNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem56Object.x = std::stof(pageNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!pageNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem56Object.y = std::stof(pageNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.pageNumber.keyPoints55.push_back(keyPointsItem56Object);
|
||||
}
|
||||
auto passportNumberNode = dataNode["PassportNumber"];
|
||||
if(!passportNumberNode["Text"].isNull())
|
||||
data_.passportNumber.text = passportNumberNode["Text"].asString();
|
||||
if(!passportNumberNode["Score"].isNull())
|
||||
data_.passportNumber.score = std::stof(passportNumberNode["Score"].asString());
|
||||
auto allKeyPoints57Node = passportNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto passportNumberNodeKeyPointskeyPointsItem : allKeyPoints57Node)
|
||||
{
|
||||
Data::PassportNumber::KeyPointsItem58 keyPointsItem58Object;
|
||||
if(!passportNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem58Object.x = std::stof(passportNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!passportNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem58Object.y = std::stof(passportNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.passportNumber.keyPoints57.push_back(keyPointsItem58Object);
|
||||
}
|
||||
auto portraitBoxNode = dataNode["PortraitBox"];
|
||||
if(!portraitBoxNode["Text"].isNull())
|
||||
data_.portraitBox.text = portraitBoxNode["Text"].asString();
|
||||
if(!portraitBoxNode["Score"].isNull())
|
||||
data_.portraitBox.score = std::stof(portraitBoxNode["Score"].asString());
|
||||
auto allKeyPoints59Node = portraitBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto portraitBoxNodeKeyPointskeyPointsItem : allKeyPoints59Node)
|
||||
{
|
||||
Data::PortraitBox::KeyPointsItem60 keyPointsItem60Object;
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem60Object.x = std::stof(portraitBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem60Object.y = std::stof(portraitBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.portraitBox.keyPoints59.push_back(keyPointsItem60Object);
|
||||
}
|
||||
auto provinceNode = dataNode["Province"];
|
||||
if(!provinceNode["Text"].isNull())
|
||||
data_.province.text = provinceNode["Text"].asString();
|
||||
if(!provinceNode["Score"].isNull())
|
||||
data_.province.score = std::stof(provinceNode["Score"].asString());
|
||||
auto allKeyPoints61Node = provinceNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto provinceNodeKeyPointskeyPointsItem : allKeyPoints61Node)
|
||||
{
|
||||
Data::Province::KeyPointsItem62 keyPointsItem62Object;
|
||||
if(!provinceNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem62Object.x = std::stof(provinceNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!provinceNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem62Object.y = std::stof(provinceNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.province.keyPoints61.push_back(keyPointsItem62Object);
|
||||
}
|
||||
auto provinceOfResidenceNode = dataNode["ProvinceOfResidence"];
|
||||
if(!provinceOfResidenceNode["Text"].isNull())
|
||||
data_.provinceOfResidence.text = provinceOfResidenceNode["Text"].asString();
|
||||
if(!provinceOfResidenceNode["Score"].isNull())
|
||||
data_.provinceOfResidence.score = std::stof(provinceOfResidenceNode["Score"].asString());
|
||||
auto allKeyPoints63Node = provinceOfResidenceNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto provinceOfResidenceNodeKeyPointskeyPointsItem : allKeyPoints63Node)
|
||||
{
|
||||
Data::ProvinceOfResidence::KeyPointsItem64 keyPointsItem64Object;
|
||||
if(!provinceOfResidenceNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem64Object.x = std::stof(provinceOfResidenceNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!provinceOfResidenceNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem64Object.y = std::stof(provinceOfResidenceNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.provinceOfResidence.keyPoints63.push_back(keyPointsItem64Object);
|
||||
}
|
||||
auto reasonOfIssueNode = dataNode["ReasonOfIssue"];
|
||||
if(!reasonOfIssueNode["Text"].isNull())
|
||||
data_.reasonOfIssue.text = reasonOfIssueNode["Text"].asString();
|
||||
if(!reasonOfIssueNode["Score"].isNull())
|
||||
data_.reasonOfIssue.score = std::stof(reasonOfIssueNode["Score"].asString());
|
||||
auto allKeyPoints65Node = reasonOfIssueNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto reasonOfIssueNodeKeyPointskeyPointsItem : allKeyPoints65Node)
|
||||
{
|
||||
Data::ReasonOfIssue::KeyPointsItem66 keyPointsItem66Object;
|
||||
if(!reasonOfIssueNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem66Object.x = std::stof(reasonOfIssueNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!reasonOfIssueNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem66Object.y = std::stof(reasonOfIssueNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.reasonOfIssue.keyPoints65.push_back(keyPointsItem66Object);
|
||||
}
|
||||
auto registerNumberNode = dataNode["RegisterNumber"];
|
||||
if(!registerNumberNode["Text"].isNull())
|
||||
data_.registerNumber.text = registerNumberNode["Text"].asString();
|
||||
if(!registerNumberNode["Score"].isNull())
|
||||
data_.registerNumber.score = std::stof(registerNumberNode["Score"].asString());
|
||||
auto allKeyPoints67Node = registerNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto registerNumberNodeKeyPointskeyPointsItem : allKeyPoints67Node)
|
||||
{
|
||||
Data::RegisterNumber::KeyPointsItem68 keyPointsItem68Object;
|
||||
if(!registerNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem68Object.x = std::stof(registerNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!registerNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem68Object.y = std::stof(registerNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.registerNumber.keyPoints67.push_back(keyPointsItem68Object);
|
||||
}
|
||||
auto religionNode = dataNode["Religion"];
|
||||
if(!religionNode["Text"].isNull())
|
||||
data_.religion.text = religionNode["Text"].asString();
|
||||
if(!religionNode["Score"].isNull())
|
||||
data_.religion.score = std::stof(religionNode["Score"].asString());
|
||||
auto allKeyPoints69Node = religionNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto religionNodeKeyPointskeyPointsItem : allKeyPoints69Node)
|
||||
{
|
||||
Data::Religion::KeyPointsItem70 keyPointsItem70Object;
|
||||
if(!religionNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem70Object.x = std::stof(religionNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!religionNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem70Object.y = std::stof(religionNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.religion.keyPoints69.push_back(keyPointsItem70Object);
|
||||
}
|
||||
auto sayfaNode = dataNode["Sayfa"];
|
||||
if(!sayfaNode["Text"].isNull())
|
||||
data_.sayfa.text = sayfaNode["Text"].asString();
|
||||
if(!sayfaNode["Score"].isNull())
|
||||
data_.sayfa.score = std::stof(sayfaNode["Score"].asString());
|
||||
auto allKeyPoints71Node = sayfaNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sayfaNodeKeyPointskeyPointsItem : allKeyPoints71Node)
|
||||
{
|
||||
Data::Sayfa::KeyPointsItem72 keyPointsItem72Object;
|
||||
if(!sayfaNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem72Object.x = std::stof(sayfaNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sayfaNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem72Object.y = std::stof(sayfaNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sayfa.keyPoints71.push_back(keyPointsItem72Object);
|
||||
}
|
||||
auto seriNode = dataNode["Seri"];
|
||||
if(!seriNode["Text"].isNull())
|
||||
data_.seri.text = seriNode["Text"].asString();
|
||||
if(!seriNode["Score"].isNull())
|
||||
data_.seri.score = std::stof(seriNode["Score"].asString());
|
||||
auto allKeyPoints73Node = seriNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto seriNodeKeyPointskeyPointsItem : allKeyPoints73Node)
|
||||
{
|
||||
Data::Seri::KeyPointsItem74 keyPointsItem74Object;
|
||||
if(!seriNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem74Object.x = std::stof(seriNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!seriNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem74Object.y = std::stof(seriNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.seri.keyPoints73.push_back(keyPointsItem74Object);
|
||||
}
|
||||
auto surnameNode = dataNode["Surname"];
|
||||
if(!surnameNode["Text"].isNull())
|
||||
data_.surname.text = surnameNode["Text"].asString();
|
||||
if(!surnameNode["Score"].isNull())
|
||||
data_.surname.score = std::stof(surnameNode["Score"].asString());
|
||||
auto allKeyPoints75Node = surnameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto surnameNodeKeyPointskeyPointsItem : allKeyPoints75Node)
|
||||
{
|
||||
Data::Surname::KeyPointsItem76 keyPointsItem76Object;
|
||||
if(!surnameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem76Object.x = std::stof(surnameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!surnameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem76Object.y = std::stof(surnameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.surname.keyPoints75.push_back(keyPointsItem76Object);
|
||||
}
|
||||
auto typeOfResidencePermitNode = dataNode["TypeOfResidencePermit"];
|
||||
if(!typeOfResidencePermitNode["Text"].isNull())
|
||||
data_.typeOfResidencePermit.text = typeOfResidencePermitNode["Text"].asString();
|
||||
if(!typeOfResidencePermitNode["Score"].isNull())
|
||||
data_.typeOfResidencePermit.score = std::stof(typeOfResidencePermitNode["Score"].asString());
|
||||
auto allKeyPoints77Node = typeOfResidencePermitNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto typeOfResidencePermitNodeKeyPointskeyPointsItem : allKeyPoints77Node)
|
||||
{
|
||||
Data::TypeOfResidencePermit::KeyPointsItem78 keyPointsItem78Object;
|
||||
if(!typeOfResidencePermitNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem78Object.x = std::stof(typeOfResidencePermitNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!typeOfResidencePermitNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem78Object.y = std::stof(typeOfResidencePermitNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.typeOfResidencePermit.keyPoints77.push_back(keyPointsItem78Object);
|
||||
}
|
||||
auto validUntilNode = dataNode["ValidUntil"];
|
||||
if(!validUntilNode["Text"].isNull())
|
||||
data_.validUntil.text = validUntilNode["Text"].asString();
|
||||
if(!validUntilNode["Score"].isNull())
|
||||
data_.validUntil.score = std::stof(validUntilNode["Score"].asString());
|
||||
auto allKeyPoints79Node = validUntilNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto validUntilNodeKeyPointskeyPointsItem : allKeyPoints79Node)
|
||||
{
|
||||
Data::ValidUntil::KeyPointsItem80 keyPointsItem80Object;
|
||||
if(!validUntilNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem80Object.x = std::stof(validUntilNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!validUntilNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem80Object.y = std::stof(validUntilNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.validUntil.keyPoints79.push_back(keyPointsItem80Object);
|
||||
}
|
||||
auto villageNode = dataNode["Village"];
|
||||
if(!villageNode["Text"].isNull())
|
||||
data_.village.text = villageNode["Text"].asString();
|
||||
if(!villageNode["Score"].isNull())
|
||||
data_.village.score = std::stof(villageNode["Score"].asString());
|
||||
auto allKeyPoints81Node = villageNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto villageNodeKeyPointskeyPointsItem : allKeyPoints81Node)
|
||||
{
|
||||
Data::Village::KeyPointsItem82 keyPointsItem82Object;
|
||||
if(!villageNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem82Object.x = std::stof(villageNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!villageNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem82Object.y = std::stof(villageNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.village.keyPoints81.push_back(keyPointsItem82Object);
|
||||
}
|
||||
auto volumeNumberNode = dataNode["VolumeNumber"];
|
||||
if(!volumeNumberNode["Text"].isNull())
|
||||
data_.volumeNumber.text = volumeNumberNode["Text"].asString();
|
||||
if(!volumeNumberNode["Score"].isNull())
|
||||
data_.volumeNumber.score = std::stof(volumeNumberNode["Score"].asString());
|
||||
auto allKeyPoints83Node = volumeNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto volumeNumberNodeKeyPointskeyPointsItem : allKeyPoints83Node)
|
||||
{
|
||||
Data::VolumeNumber::KeyPointsItem84 keyPointsItem84Object;
|
||||
if(!volumeNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem84Object.x = std::stof(volumeNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!volumeNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem84Object.y = std::stof(volumeNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.volumeNumber.keyPoints83.push_back(keyPointsItem84Object);
|
||||
}
|
||||
auto sexNode = dataNode["Sex"];
|
||||
if(!sexNode["Text"].isNull())
|
||||
data_.sex.text = sexNode["Text"].asString();
|
||||
if(!sexNode["Score"].isNull())
|
||||
data_.sex.score = std::stof(sexNode["Score"].asString());
|
||||
auto allKeyPoints85Node = sexNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sexNodeKeyPointskeyPointsItem : allKeyPoints85Node)
|
||||
{
|
||||
Data::Sex::KeyPointsItem86 keyPointsItem86Object;
|
||||
if(!sexNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem86Object.x = std::stof(sexNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sexNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem86Object.y = std::stof(sexNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sex.keyPoints85.push_back(keyPointsItem86Object);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeTurkeyIdentityCardResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeTurkeyIdentityCardResult::Data RecognizeTurkeyIdentityCardResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeTurkeyIdentityCardResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeUkraineIdentityCardRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeUkraineIdentityCardRequest;
|
||||
|
||||
RecognizeUkraineIdentityCardRequest::RecognizeUkraineIdentityCardRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeUkraineIdentityCard") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeUkraineIdentityCardRequest::~RecognizeUkraineIdentityCardRequest() {}
|
||||
|
||||
std::string RecognizeUkraineIdentityCardRequest::getImageUrl() const {
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void RecognizeUkraineIdentityCardRequest::setImageUrl(const std::string &imageUrl) {
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter(std::string("ImageUrl"), imageUrl);
|
||||
}
|
||||
|
||||
@@ -1,259 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeUkraineIdentityCardResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeUkraineIdentityCardResult::RecognizeUkraineIdentityCardResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeUkraineIdentityCardResult::RecognizeUkraineIdentityCardResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeUkraineIdentityCardResult::~RecognizeUkraineIdentityCardResult()
|
||||
{}
|
||||
|
||||
void RecognizeUkraineIdentityCardResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto birthDateNode = dataNode["BirthDate"];
|
||||
if(!birthDateNode["Text"].isNull())
|
||||
data_.birthDate.text = birthDateNode["Text"].asString();
|
||||
if(!birthDateNode["Score"].isNull())
|
||||
data_.birthDate.score = std::stof(birthDateNode["Score"].asString());
|
||||
auto allKeyPointsNode = birthDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthDateNodeKeyPointskeyPointsItem : allKeyPointsNode)
|
||||
{
|
||||
Data::BirthDate::KeyPointsItem keyPointsItemObject;
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItemObject.x = std::stof(birthDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItemObject.y = std::stof(birthDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthDate.keyPoints.push_back(keyPointsItemObject);
|
||||
}
|
||||
auto cardBoxNode = dataNode["CardBox"];
|
||||
if(!cardBoxNode["Text"].isNull())
|
||||
data_.cardBox.text = cardBoxNode["Text"].asString();
|
||||
if(!cardBoxNode["Score"].isNull())
|
||||
data_.cardBox.score = std::stof(cardBoxNode["Score"].asString());
|
||||
auto allKeyPoints1Node = cardBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto cardBoxNodeKeyPointskeyPointsItem : allKeyPoints1Node)
|
||||
{
|
||||
Data::CardBox::KeyPointsItem2 keyPointsItem2Object;
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem2Object.x = std::stof(cardBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem2Object.y = std::stof(cardBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cardBox.keyPoints1.push_back(keyPointsItem2Object);
|
||||
}
|
||||
auto documentNumberNode = dataNode["DocumentNumber"];
|
||||
if(!documentNumberNode["Text"].isNull())
|
||||
data_.documentNumber.text = documentNumberNode["Text"].asString();
|
||||
if(!documentNumberNode["Score"].isNull())
|
||||
data_.documentNumber.score = std::stof(documentNumberNode["Score"].asString());
|
||||
auto allKeyPoints3Node = documentNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto documentNumberNodeKeyPointskeyPointsItem : allKeyPoints3Node)
|
||||
{
|
||||
Data::DocumentNumber::KeyPointsItem4 keyPointsItem4Object;
|
||||
if(!documentNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem4Object.x = std::stof(documentNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!documentNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem4Object.y = std::stof(documentNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.documentNumber.keyPoints3.push_back(keyPointsItem4Object);
|
||||
}
|
||||
auto expiryDateNode = dataNode["ExpiryDate"];
|
||||
if(!expiryDateNode["Text"].isNull())
|
||||
data_.expiryDate.text = expiryDateNode["Text"].asString();
|
||||
if(!expiryDateNode["Score"].isNull())
|
||||
data_.expiryDate.score = std::stof(expiryDateNode["Score"].asString());
|
||||
auto allKeyPoints5Node = expiryDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto expiryDateNodeKeyPointskeyPointsItem : allKeyPoints5Node)
|
||||
{
|
||||
Data::ExpiryDate::KeyPointsItem6 keyPointsItem6Object;
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem6Object.x = std::stof(expiryDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem6Object.y = std::stof(expiryDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.expiryDate.keyPoints5.push_back(keyPointsItem6Object);
|
||||
}
|
||||
auto nameEnglishNode = dataNode["NameEnglish"];
|
||||
if(!nameEnglishNode["Text"].isNull())
|
||||
data_.nameEnglish.text = nameEnglishNode["Text"].asString();
|
||||
if(!nameEnglishNode["Score"].isNull())
|
||||
data_.nameEnglish.score = std::stof(nameEnglishNode["Score"].asString());
|
||||
auto allKeyPoints7Node = nameEnglishNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameEnglishNodeKeyPointskeyPointsItem : allKeyPoints7Node)
|
||||
{
|
||||
Data::NameEnglish::KeyPointsItem8 keyPointsItem8Object;
|
||||
if(!nameEnglishNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem8Object.x = std::stof(nameEnglishNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameEnglishNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem8Object.y = std::stof(nameEnglishNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nameEnglish.keyPoints7.push_back(keyPointsItem8Object);
|
||||
}
|
||||
auto nameUkraineNode = dataNode["NameUkraine"];
|
||||
if(!nameUkraineNode["Text"].isNull())
|
||||
data_.nameUkraine.text = nameUkraineNode["Text"].asString();
|
||||
if(!nameUkraineNode["Score"].isNull())
|
||||
data_.nameUkraine.score = std::stof(nameUkraineNode["Score"].asString());
|
||||
auto allKeyPoints9Node = nameUkraineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nameUkraineNodeKeyPointskeyPointsItem : allKeyPoints9Node)
|
||||
{
|
||||
Data::NameUkraine::KeyPointsItem10 keyPointsItem10Object;
|
||||
if(!nameUkraineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem10Object.x = std::stof(nameUkraineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nameUkraineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem10Object.y = std::stof(nameUkraineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nameUkraine.keyPoints9.push_back(keyPointsItem10Object);
|
||||
}
|
||||
auto nationalityNode = dataNode["Nationality"];
|
||||
if(!nationalityNode["Text"].isNull())
|
||||
data_.nationality.text = nationalityNode["Text"].asString();
|
||||
if(!nationalityNode["Score"].isNull())
|
||||
data_.nationality.score = std::stof(nationalityNode["Score"].asString());
|
||||
auto allKeyPoints11Node = nationalityNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nationalityNodeKeyPointskeyPointsItem : allKeyPoints11Node)
|
||||
{
|
||||
Data::Nationality::KeyPointsItem12 keyPointsItem12Object;
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem12Object.x = std::stof(nationalityNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem12Object.y = std::stof(nationalityNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nationality.keyPoints11.push_back(keyPointsItem12Object);
|
||||
}
|
||||
auto patronymicNode = dataNode["Patronymic"];
|
||||
if(!patronymicNode["Text"].isNull())
|
||||
data_.patronymic.text = patronymicNode["Text"].asString();
|
||||
if(!patronymicNode["Score"].isNull())
|
||||
data_.patronymic.score = std::stof(patronymicNode["Score"].asString());
|
||||
auto allKeyPoints13Node = patronymicNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto patronymicNodeKeyPointskeyPointsItem : allKeyPoints13Node)
|
||||
{
|
||||
Data::Patronymic::KeyPointsItem14 keyPointsItem14Object;
|
||||
if(!patronymicNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem14Object.x = std::stof(patronymicNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!patronymicNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem14Object.y = std::stof(patronymicNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.patronymic.keyPoints13.push_back(keyPointsItem14Object);
|
||||
}
|
||||
auto portraitBoxNode = dataNode["PortraitBox"];
|
||||
if(!portraitBoxNode["Text"].isNull())
|
||||
data_.portraitBox.text = portraitBoxNode["Text"].asString();
|
||||
if(!portraitBoxNode["Score"].isNull())
|
||||
data_.portraitBox.score = std::stof(portraitBoxNode["Score"].asString());
|
||||
auto allKeyPoints15Node = portraitBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto portraitBoxNodeKeyPointskeyPointsItem : allKeyPoints15Node)
|
||||
{
|
||||
Data::PortraitBox::KeyPointsItem16 keyPointsItem16Object;
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem16Object.x = std::stof(portraitBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem16Object.y = std::stof(portraitBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.portraitBox.keyPoints15.push_back(keyPointsItem16Object);
|
||||
}
|
||||
auto recordNumberNode = dataNode["RecordNumber"];
|
||||
if(!recordNumberNode["Text"].isNull())
|
||||
data_.recordNumber.text = recordNumberNode["Text"].asString();
|
||||
if(!recordNumberNode["Score"].isNull())
|
||||
data_.recordNumber.score = std::stof(recordNumberNode["Score"].asString());
|
||||
auto allKeyPoints17Node = recordNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto recordNumberNodeKeyPointskeyPointsItem : allKeyPoints17Node)
|
||||
{
|
||||
Data::RecordNumber::KeyPointsItem18 keyPointsItem18Object;
|
||||
if(!recordNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem18Object.x = std::stof(recordNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!recordNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem18Object.y = std::stof(recordNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.recordNumber.keyPoints17.push_back(keyPointsItem18Object);
|
||||
}
|
||||
auto sexNode = dataNode["Sex"];
|
||||
if(!sexNode["Text"].isNull())
|
||||
data_.sex.text = sexNode["Text"].asString();
|
||||
if(!sexNode["Score"].isNull())
|
||||
data_.sex.score = std::stof(sexNode["Score"].asString());
|
||||
auto allKeyPoints19Node = sexNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sexNodeKeyPointskeyPointsItem : allKeyPoints19Node)
|
||||
{
|
||||
Data::Sex::KeyPointsItem20 keyPointsItem20Object;
|
||||
if(!sexNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem20Object.x = std::stof(sexNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sexNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem20Object.y = std::stof(sexNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sex.keyPoints19.push_back(keyPointsItem20Object);
|
||||
}
|
||||
auto surnameEnglishNode = dataNode["SurnameEnglish"];
|
||||
if(!surnameEnglishNode["Text"].isNull())
|
||||
data_.surnameEnglish.text = surnameEnglishNode["Text"].asString();
|
||||
if(!surnameEnglishNode["Score"].isNull())
|
||||
data_.surnameEnglish.score = std::stof(surnameEnglishNode["Score"].asString());
|
||||
auto allKeyPoints21Node = surnameEnglishNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto surnameEnglishNodeKeyPointskeyPointsItem : allKeyPoints21Node)
|
||||
{
|
||||
Data::SurnameEnglish::KeyPointsItem22 keyPointsItem22Object;
|
||||
if(!surnameEnglishNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem22Object.x = std::stof(surnameEnglishNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!surnameEnglishNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem22Object.y = std::stof(surnameEnglishNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.surnameEnglish.keyPoints21.push_back(keyPointsItem22Object);
|
||||
}
|
||||
auto surnameUkraineNode = dataNode["SurnameUkraine"];
|
||||
if(!surnameUkraineNode["Text"].isNull())
|
||||
data_.surnameUkraine.text = surnameUkraineNode["Text"].asString();
|
||||
if(!surnameUkraineNode["Score"].isNull())
|
||||
data_.surnameUkraine.score = std::stof(surnameUkraineNode["Score"].asString());
|
||||
auto allKeyPoints23Node = surnameUkraineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto surnameUkraineNodeKeyPointskeyPointsItem : allKeyPoints23Node)
|
||||
{
|
||||
Data::SurnameUkraine::KeyPointsItem24 keyPointsItem24Object;
|
||||
if(!surnameUkraineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem24Object.x = std::stof(surnameUkraineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!surnameUkraineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem24Object.y = std::stof(surnameUkraineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.surnameUkraine.keyPoints23.push_back(keyPointsItem24Object);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeUkraineIdentityCardResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeUkraineIdentityCardResult::Data RecognizeUkraineIdentityCardResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeUkraineIdentityCardResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeVideoCastCrewListRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeVideoCastCrewListRequest;
|
||||
|
||||
RecognizeVideoCastCrewListRequest::RecognizeVideoCastCrewListRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeVideoCastCrewList") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeVideoCastCrewListRequest::~RecognizeVideoCastCrewListRequest() {}
|
||||
|
||||
std::vector<RecognizeVideoCastCrewListRequest::Params> RecognizeVideoCastCrewListRequest::getParams() const {
|
||||
return params_;
|
||||
}
|
||||
|
||||
void RecognizeVideoCastCrewListRequest::setParams(const std::vector<RecognizeVideoCastCrewListRequest::Params> ¶ms) {
|
||||
params_ = params;
|
||||
for(int dep1 = 0; dep1 != params.size(); dep1++) {
|
||||
setBodyParameter(std::string("Params") + "." + std::to_string(dep1 + 1) + ".Type", params[dep1].type);
|
||||
}
|
||||
}
|
||||
|
||||
bool RecognizeVideoCastCrewListRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void RecognizeVideoCastCrewListRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string RecognizeVideoCastCrewListRequest::getRegisterUrl() const {
|
||||
return registerUrl_;
|
||||
}
|
||||
|
||||
void RecognizeVideoCastCrewListRequest::setRegisterUrl(const std::string ®isterUrl) {
|
||||
registerUrl_ = registerUrl;
|
||||
setBodyParameter(std::string("RegisterUrl"), registerUrl);
|
||||
}
|
||||
|
||||
std::string RecognizeVideoCastCrewListRequest::getVideoUrl() const {
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void RecognizeVideoCastCrewListRequest::setVideoUrl(const std::string &videoUrl) {
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter(std::string("VideoUrl"), videoUrl);
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeVideoCastCrewListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeVideoCastCrewListResult::RecognizeVideoCastCrewListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeVideoCastCrewListResult::RecognizeVideoCastCrewListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeVideoCastCrewListResult::~RecognizeVideoCastCrewListResult()
|
||||
{}
|
||||
|
||||
void RecognizeVideoCastCrewListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeVietnamIdentityCardRequest.h>
|
||||
|
||||
using AlibabaCloud::Ocr::Model::RecognizeVietnamIdentityCardRequest;
|
||||
|
||||
RecognizeVietnamIdentityCardRequest::RecognizeVietnamIdentityCardRequest()
|
||||
: RpcServiceRequest("ocr", "2019-12-30", "RecognizeVietnamIdentityCard") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeVietnamIdentityCardRequest::~RecognizeVietnamIdentityCardRequest() {}
|
||||
|
||||
std::string RecognizeVietnamIdentityCardRequest::getImageUrl() const {
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void RecognizeVietnamIdentityCardRequest::setImageUrl(const std::string &imageUrl) {
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter(std::string("ImageUrl"), imageUrl);
|
||||
}
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
/*
|
||||
* 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/ocr/model/RecognizeVietnamIdentityCardResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ocr;
|
||||
using namespace AlibabaCloud::Ocr::Model;
|
||||
|
||||
RecognizeVietnamIdentityCardResult::RecognizeVietnamIdentityCardResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeVietnamIdentityCardResult::RecognizeVietnamIdentityCardResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeVietnamIdentityCardResult::~RecognizeVietnamIdentityCardResult()
|
||||
{}
|
||||
|
||||
void RecognizeVietnamIdentityCardResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto addressFirstLineNode = dataNode["AddressFirstLine"];
|
||||
if(!addressFirstLineNode["Text"].isNull())
|
||||
data_.addressFirstLine.text = addressFirstLineNode["Text"].asString();
|
||||
if(!addressFirstLineNode["Score"].isNull())
|
||||
data_.addressFirstLine.score = std::stof(addressFirstLineNode["Score"].asString());
|
||||
auto allKeyPointsNode = addressFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressFirstLineNodeKeyPointskeyPointsItem : allKeyPointsNode)
|
||||
{
|
||||
Data::AddressFirstLine::KeyPointsItem keyPointsItemObject;
|
||||
if(!addressFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItemObject.x = std::stof(addressFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItemObject.y = std::stof(addressFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressFirstLine.keyPoints.push_back(keyPointsItemObject);
|
||||
}
|
||||
auto addressSecondLineNode = dataNode["AddressSecondLine"];
|
||||
if(!addressSecondLineNode["Text"].isNull())
|
||||
data_.addressSecondLine.text = addressSecondLineNode["Text"].asString();
|
||||
if(!addressSecondLineNode["Score"].isNull())
|
||||
data_.addressSecondLine.score = std::stof(addressSecondLineNode["Score"].asString());
|
||||
auto allKeyPoints1Node = addressSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto addressSecondLineNodeKeyPointskeyPointsItem : allKeyPoints1Node)
|
||||
{
|
||||
Data::AddressSecondLine::KeyPointsItem2 keyPointsItem2Object;
|
||||
if(!addressSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem2Object.x = std::stof(addressSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!addressSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem2Object.y = std::stof(addressSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.addressSecondLine.keyPoints1.push_back(keyPointsItem2Object);
|
||||
}
|
||||
auto birthDateNode = dataNode["BirthDate"];
|
||||
if(!birthDateNode["Text"].isNull())
|
||||
data_.birthDate.text = birthDateNode["Text"].asString();
|
||||
if(!birthDateNode["Score"].isNull())
|
||||
data_.birthDate.score = std::stof(birthDateNode["Score"].asString());
|
||||
auto allKeyPoints3Node = birthDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto birthDateNodeKeyPointskeyPointsItem : allKeyPoints3Node)
|
||||
{
|
||||
Data::BirthDate::KeyPointsItem4 keyPointsItem4Object;
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem4Object.x = std::stof(birthDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!birthDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem4Object.y = std::stof(birthDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.birthDate.keyPoints3.push_back(keyPointsItem4Object);
|
||||
}
|
||||
auto cardBoxNode = dataNode["CardBox"];
|
||||
if(!cardBoxNode["Text"].isNull())
|
||||
data_.cardBox.text = cardBoxNode["Text"].asString();
|
||||
if(!cardBoxNode["Score"].isNull())
|
||||
data_.cardBox.score = cardBoxNode["Score"].asString();
|
||||
auto allKeyPoints5Node = cardBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto cardBoxNodeKeyPointskeyPointsItem : allKeyPoints5Node)
|
||||
{
|
||||
Data::CardBox::KeyPointsItem6 keyPointsItem6Object;
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem6Object.x = std::stof(cardBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!cardBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem6Object.y = std::stof(cardBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.cardBox.keyPoints5.push_back(keyPointsItem6Object);
|
||||
}
|
||||
auto driveClassNode = dataNode["DriveClass"];
|
||||
if(!driveClassNode["Text"].isNull())
|
||||
data_.driveClass.text = driveClassNode["Text"].asString();
|
||||
if(!driveClassNode["Score"].isNull())
|
||||
data_.driveClass.score = driveClassNode["Score"].asString();
|
||||
auto allKeyPoints7Node = driveClassNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto driveClassNodeKeyPointskeyPointsItem : allKeyPoints7Node)
|
||||
{
|
||||
Data::DriveClass::KeyPointsItem8 keyPointsItem8Object;
|
||||
if(!driveClassNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem8Object.x = std::stof(driveClassNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!driveClassNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem8Object.y = std::stof(driveClassNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.driveClass.keyPoints7.push_back(keyPointsItem8Object);
|
||||
}
|
||||
auto expiryDateNode = dataNode["ExpiryDate"];
|
||||
if(!expiryDateNode["Text"].isNull())
|
||||
data_.expiryDate.text = expiryDateNode["Text"].asString();
|
||||
if(!expiryDateNode["Score"].isNull())
|
||||
data_.expiryDate.score = expiryDateNode["Score"].asString();
|
||||
auto allKeyPoints9Node = expiryDateNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto expiryDateNodeKeyPointskeyPointsItem : allKeyPoints9Node)
|
||||
{
|
||||
Data::ExpiryDate::KeyPointsItem10 keyPointsItem10Object;
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem10Object.x = std::stof(expiryDateNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!expiryDateNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem10Object.y = std::stof(expiryDateNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.expiryDate.keyPoints9.push_back(keyPointsItem10Object);
|
||||
}
|
||||
auto fullNameNode = dataNode["FullName"];
|
||||
if(!fullNameNode["Text"].isNull())
|
||||
data_.fullName.text = fullNameNode["Text"].asString();
|
||||
if(!fullNameNode["Score"].isNull())
|
||||
data_.fullName.score = fullNameNode["Score"].asString();
|
||||
auto allKeyPoints11Node = fullNameNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto fullNameNodeKeyPointskeyPointsItem : allKeyPoints11Node)
|
||||
{
|
||||
Data::FullName::KeyPointsItem12 keyPointsItem12Object;
|
||||
if(!fullNameNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem12Object.x = std::stof(fullNameNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!fullNameNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem12Object.y = std::stof(fullNameNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.fullName.keyPoints11.push_back(keyPointsItem12Object);
|
||||
}
|
||||
auto idNumberNode = dataNode["IdNumber"];
|
||||
if(!idNumberNode["Text"].isNull())
|
||||
data_.idNumber.text = idNumberNode["Text"].asString();
|
||||
if(!idNumberNode["Score"].isNull())
|
||||
data_.idNumber.score = idNumberNode["Score"].asString();
|
||||
auto allKeyPoints13Node = idNumberNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto idNumberNodeKeyPointskeyPointsItem : allKeyPoints13Node)
|
||||
{
|
||||
Data::IdNumber::KeyPointsItem14 keyPointsItem14Object;
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem14Object.x = std::stof(idNumberNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!idNumberNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem14Object.y = std::stof(idNumberNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.idNumber.keyPoints13.push_back(keyPointsItem14Object);
|
||||
}
|
||||
auto nationalityNode = dataNode["Nationality"];
|
||||
if(!nationalityNode["Text"].isNull())
|
||||
data_.nationality.text = nationalityNode["Text"].asString();
|
||||
if(!nationalityNode["Score"].isNull())
|
||||
data_.nationality.score = nationalityNode["Score"].asString();
|
||||
auto allKeyPoints15Node = nationalityNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto nationalityNodeKeyPointskeyPointsItem : allKeyPoints15Node)
|
||||
{
|
||||
Data::Nationality::KeyPointsItem16 keyPointsItem16Object;
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem16Object.x = std::stof(nationalityNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!nationalityNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem16Object.y = std::stof(nationalityNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.nationality.keyPoints15.push_back(keyPointsItem16Object);
|
||||
}
|
||||
auto originPlaceFirstLineNode = dataNode["OriginPlaceFirstLine"];
|
||||
if(!originPlaceFirstLineNode["Text"].isNull())
|
||||
data_.originPlaceFirstLine.text = originPlaceFirstLineNode["Text"].asString();
|
||||
if(!originPlaceFirstLineNode["Score"].isNull())
|
||||
data_.originPlaceFirstLine.score = originPlaceFirstLineNode["Score"].asString();
|
||||
auto allKeyPoints17Node = originPlaceFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto originPlaceFirstLineNodeKeyPointskeyPointsItem : allKeyPoints17Node)
|
||||
{
|
||||
Data::OriginPlaceFirstLine::KeyPointsItem18 keyPointsItem18Object;
|
||||
if(!originPlaceFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem18Object.x = std::stof(originPlaceFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!originPlaceFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem18Object.y = std::stof(originPlaceFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.originPlaceFirstLine.keyPoints17.push_back(keyPointsItem18Object);
|
||||
}
|
||||
auto originPlaceSecondLineNode = dataNode["OriginPlaceSecondLine"];
|
||||
if(!originPlaceSecondLineNode["Text"].isNull())
|
||||
data_.originPlaceSecondLine.text = originPlaceSecondLineNode["Text"].asString();
|
||||
if(!originPlaceSecondLineNode["Score"].isNull())
|
||||
data_.originPlaceSecondLine.score = originPlaceSecondLineNode["Score"].asString();
|
||||
auto allKeyPoints19Node = originPlaceSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto originPlaceSecondLineNodeKeyPointskeyPointsItem : allKeyPoints19Node)
|
||||
{
|
||||
Data::OriginPlaceSecondLine::KeyPointsItem20 keyPointsItem20Object;
|
||||
if(!originPlaceSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem20Object.x = std::stof(originPlaceSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!originPlaceSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem20Object.y = std::stof(originPlaceSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.originPlaceSecondLine.keyPoints19.push_back(keyPointsItem20Object);
|
||||
}
|
||||
auto portraitBoxNode = dataNode["PortraitBox"];
|
||||
if(!portraitBoxNode["Text"].isNull())
|
||||
data_.portraitBox.text = portraitBoxNode["Text"].asString();
|
||||
if(!portraitBoxNode["Score"].isNull())
|
||||
data_.portraitBox.score = portraitBoxNode["Score"].asString();
|
||||
auto allKeyPoints21Node = portraitBoxNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto portraitBoxNodeKeyPointskeyPointsItem : allKeyPoints21Node)
|
||||
{
|
||||
Data::PortraitBox::KeyPointsItem22 keyPointsItem22Object;
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem22Object.x = std::stof(portraitBoxNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!portraitBoxNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem22Object.y = std::stof(portraitBoxNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.portraitBox.keyPoints21.push_back(keyPointsItem22Object);
|
||||
}
|
||||
auto residencePlaceFirstLineNode = dataNode["ResidencePlaceFirstLine"];
|
||||
if(!residencePlaceFirstLineNode["Text"].isNull())
|
||||
data_.residencePlaceFirstLine.text = residencePlaceFirstLineNode["Text"].asString();
|
||||
if(!residencePlaceFirstLineNode["Score"].isNull())
|
||||
data_.residencePlaceFirstLine.score = residencePlaceFirstLineNode["Score"].asString();
|
||||
auto allKeyPoints23Node = residencePlaceFirstLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto residencePlaceFirstLineNodeKeyPointskeyPointsItem : allKeyPoints23Node)
|
||||
{
|
||||
Data::ResidencePlaceFirstLine::KeyPointsItem24 keyPointsItem24Object;
|
||||
if(!residencePlaceFirstLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem24Object.x = std::stof(residencePlaceFirstLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!residencePlaceFirstLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem24Object.y = std::stof(residencePlaceFirstLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.residencePlaceFirstLine.keyPoints23.push_back(keyPointsItem24Object);
|
||||
}
|
||||
auto residencePlaceSecondLineNode = dataNode["ResidencePlaceSecondLine"];
|
||||
if(!residencePlaceSecondLineNode["Text"].isNull())
|
||||
data_.residencePlaceSecondLine.text = residencePlaceSecondLineNode["Text"].asString();
|
||||
if(!residencePlaceSecondLineNode["Score"].isNull())
|
||||
data_.residencePlaceSecondLine.score = residencePlaceSecondLineNode["Score"].asString();
|
||||
auto allKeyPoints25Node = residencePlaceSecondLineNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto residencePlaceSecondLineNodeKeyPointskeyPointsItem : allKeyPoints25Node)
|
||||
{
|
||||
Data::ResidencePlaceSecondLine::KeyPointsItem26 keyPointsItem26Object;
|
||||
if(!residencePlaceSecondLineNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem26Object.x = std::stof(residencePlaceSecondLineNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!residencePlaceSecondLineNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem26Object.y = std::stof(residencePlaceSecondLineNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.residencePlaceSecondLine.keyPoints25.push_back(keyPointsItem26Object);
|
||||
}
|
||||
auto sexNode = dataNode["Sex"];
|
||||
if(!sexNode["Text"].isNull())
|
||||
data_.sex.text = sexNode["Text"].asString();
|
||||
if(!sexNode["Score"].isNull())
|
||||
data_.sex.score = sexNode["Score"].asString();
|
||||
auto allKeyPoints27Node = sexNode["KeyPoints"]["keyPointsItem"];
|
||||
for (auto sexNodeKeyPointskeyPointsItem : allKeyPoints27Node)
|
||||
{
|
||||
Data::Sex::KeyPointsItem28 keyPointsItem28Object;
|
||||
if(!sexNodeKeyPointskeyPointsItem["X"].isNull())
|
||||
keyPointsItem28Object.x = std::stof(sexNodeKeyPointskeyPointsItem["X"].asString());
|
||||
if(!sexNodeKeyPointskeyPointsItem["Y"].isNull())
|
||||
keyPointsItem28Object.y = std::stof(sexNodeKeyPointskeyPointsItem["Y"].asString());
|
||||
data_.sex.keyPoints27.push_back(keyPointsItem28Object);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeVietnamIdentityCardResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeVietnamIdentityCardResult::Data RecognizeVietnamIdentityCardResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeVietnamIdentityCardResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user