Release RecognizeTurkeyIdentityCard RecognizeMalaysiaIdentityCard RecognizeRussiaIdentityCard RecognizeIndonesiaIdentityCard RecognizeIndonesiaIdentityCard.

This commit is contained in:
sdk-team
2022-05-25 07:18:00 +00:00
parent 84c841c634
commit 45c7934864
25 changed files with 4160 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2022-05-25 Version: 1.36.1136
- Release RecognizeTurkeyIdentityCard RecognizeMalaysiaIdentityCard RecognizeRussiaIdentityCard RecognizeIndonesiaIdentityCard RecognizeIndonesiaIdentityCard.
2022-05-24 Version: 1.36.1135
- StartDBInstance parameter change.

View File

@@ -1 +1 @@
1.36.1135
1.36.1136

View File

@@ -43,8 +43,12 @@ set(ocr_public_header_model
include/alibabacloud/ocr/model/RecognizeDrivingLicenseResult.h
include/alibabacloud/ocr/model/RecognizeIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeIdentityCardResult.h
include/alibabacloud/ocr/model/RecognizeIndonesiaIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeIndonesiaIdentityCardResult.h
include/alibabacloud/ocr/model/RecognizeLicensePlateRequest.h
include/alibabacloud/ocr/model/RecognizeLicensePlateResult.h
include/alibabacloud/ocr/model/RecognizeMalaysiaIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeMalaysiaIdentityCardResult.h
include/alibabacloud/ocr/model/RecognizePassportMRZRequest.h
include/alibabacloud/ocr/model/RecognizePassportMRZResult.h
include/alibabacloud/ocr/model/RecognizePdfRequest.h
@@ -55,6 +59,8 @@ set(ocr_public_header_model
include/alibabacloud/ocr/model/RecognizeQrCodeResult.h
include/alibabacloud/ocr/model/RecognizeQuotaInvoiceRequest.h
include/alibabacloud/ocr/model/RecognizeQuotaInvoiceResult.h
include/alibabacloud/ocr/model/RecognizeRussiaIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeRussiaIdentityCardResult.h
include/alibabacloud/ocr/model/RecognizeStampRequest.h
include/alibabacloud/ocr/model/RecognizeStampResult.h
include/alibabacloud/ocr/model/RecognizeTableRequest.h
@@ -67,6 +73,8 @@ set(ocr_public_header_model
include/alibabacloud/ocr/model/RecognizeTicketInvoiceResult.h
include/alibabacloud/ocr/model/RecognizeTrainTicketRequest.h
include/alibabacloud/ocr/model/RecognizeTrainTicketResult.h
include/alibabacloud/ocr/model/RecognizeTurkeyIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeTurkeyIdentityCardResult.h
include/alibabacloud/ocr/model/RecognizeUkraineIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeUkraineIdentityCardResult.h
include/alibabacloud/ocr/model/RecognizeVATInvoiceRequest.h
@@ -79,6 +87,8 @@ set(ocr_public_header_model
include/alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h
include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h
include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h
include/alibabacloud/ocr/model/RecognizeVietnamIdentityCardRequest.h
include/alibabacloud/ocr/model/RecognizeVietnamIdentityCardResult.h
include/alibabacloud/ocr/model/TrimDocumentRequest.h
include/alibabacloud/ocr/model/TrimDocumentResult.h )
@@ -106,8 +116,12 @@ set(ocr_src
src/model/RecognizeDrivingLicenseResult.cc
src/model/RecognizeIdentityCardRequest.cc
src/model/RecognizeIdentityCardResult.cc
src/model/RecognizeIndonesiaIdentityCardRequest.cc
src/model/RecognizeIndonesiaIdentityCardResult.cc
src/model/RecognizeLicensePlateRequest.cc
src/model/RecognizeLicensePlateResult.cc
src/model/RecognizeMalaysiaIdentityCardRequest.cc
src/model/RecognizeMalaysiaIdentityCardResult.cc
src/model/RecognizePassportMRZRequest.cc
src/model/RecognizePassportMRZResult.cc
src/model/RecognizePdfRequest.cc
@@ -118,6 +132,8 @@ set(ocr_src
src/model/RecognizeQrCodeResult.cc
src/model/RecognizeQuotaInvoiceRequest.cc
src/model/RecognizeQuotaInvoiceResult.cc
src/model/RecognizeRussiaIdentityCardRequest.cc
src/model/RecognizeRussiaIdentityCardResult.cc
src/model/RecognizeStampRequest.cc
src/model/RecognizeStampResult.cc
src/model/RecognizeTableRequest.cc
@@ -130,6 +146,8 @@ set(ocr_src
src/model/RecognizeTicketInvoiceResult.cc
src/model/RecognizeTrainTicketRequest.cc
src/model/RecognizeTrainTicketResult.cc
src/model/RecognizeTurkeyIdentityCardRequest.cc
src/model/RecognizeTurkeyIdentityCardResult.cc
src/model/RecognizeUkraineIdentityCardRequest.cc
src/model/RecognizeUkraineIdentityCardResult.cc
src/model/RecognizeVATInvoiceRequest.cc
@@ -142,6 +160,8 @@ set(ocr_src
src/model/RecognizeVideoCastCrewListResult.cc
src/model/RecognizeVideoCharacterRequest.cc
src/model/RecognizeVideoCharacterResult.cc
src/model/RecognizeVietnamIdentityCardRequest.cc
src/model/RecognizeVietnamIdentityCardResult.cc
src/model/TrimDocumentRequest.cc
src/model/TrimDocumentResult.cc )

View File

@@ -44,8 +44,12 @@
#include "model/RecognizeDrivingLicenseResult.h"
#include "model/RecognizeIdentityCardRequest.h"
#include "model/RecognizeIdentityCardResult.h"
#include "model/RecognizeIndonesiaIdentityCardRequest.h"
#include "model/RecognizeIndonesiaIdentityCardResult.h"
#include "model/RecognizeLicensePlateRequest.h"
#include "model/RecognizeLicensePlateResult.h"
#include "model/RecognizeMalaysiaIdentityCardRequest.h"
#include "model/RecognizeMalaysiaIdentityCardResult.h"
#include "model/RecognizePassportMRZRequest.h"
#include "model/RecognizePassportMRZResult.h"
#include "model/RecognizePdfRequest.h"
@@ -56,6 +60,8 @@
#include "model/RecognizeQrCodeResult.h"
#include "model/RecognizeQuotaInvoiceRequest.h"
#include "model/RecognizeQuotaInvoiceResult.h"
#include "model/RecognizeRussiaIdentityCardRequest.h"
#include "model/RecognizeRussiaIdentityCardResult.h"
#include "model/RecognizeStampRequest.h"
#include "model/RecognizeStampResult.h"
#include "model/RecognizeTableRequest.h"
@@ -68,6 +74,8 @@
#include "model/RecognizeTicketInvoiceResult.h"
#include "model/RecognizeTrainTicketRequest.h"
#include "model/RecognizeTrainTicketResult.h"
#include "model/RecognizeTurkeyIdentityCardRequest.h"
#include "model/RecognizeTurkeyIdentityCardResult.h"
#include "model/RecognizeUkraineIdentityCardRequest.h"
#include "model/RecognizeUkraineIdentityCardResult.h"
#include "model/RecognizeVATInvoiceRequest.h"
@@ -80,6 +88,8 @@
#include "model/RecognizeVideoCastCrewListResult.h"
#include "model/RecognizeVideoCharacterRequest.h"
#include "model/RecognizeVideoCharacterResult.h"
#include "model/RecognizeVietnamIdentityCardRequest.h"
#include "model/RecognizeVietnamIdentityCardResult.h"
#include "model/TrimDocumentRequest.h"
#include "model/TrimDocumentResult.h"
@@ -124,9 +134,15 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecognizeIdentityCardResult> RecognizeIdentityCardOutcome;
typedef std::future<RecognizeIdentityCardOutcome> RecognizeIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeIdentityCardRequest&, const RecognizeIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeIdentityCardAsyncHandler;
typedef Outcome<Error, Model::RecognizeIndonesiaIdentityCardResult> RecognizeIndonesiaIdentityCardOutcome;
typedef std::future<RecognizeIndonesiaIdentityCardOutcome> RecognizeIndonesiaIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeIndonesiaIdentityCardRequest&, const RecognizeIndonesiaIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeIndonesiaIdentityCardAsyncHandler;
typedef Outcome<Error, Model::RecognizeLicensePlateResult> RecognizeLicensePlateOutcome;
typedef std::future<RecognizeLicensePlateOutcome> RecognizeLicensePlateOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeLicensePlateRequest&, const RecognizeLicensePlateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeLicensePlateAsyncHandler;
typedef Outcome<Error, Model::RecognizeMalaysiaIdentityCardResult> RecognizeMalaysiaIdentityCardOutcome;
typedef std::future<RecognizeMalaysiaIdentityCardOutcome> RecognizeMalaysiaIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeMalaysiaIdentityCardRequest&, const RecognizeMalaysiaIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeMalaysiaIdentityCardAsyncHandler;
typedef Outcome<Error, Model::RecognizePassportMRZResult> RecognizePassportMRZOutcome;
typedef std::future<RecognizePassportMRZOutcome> RecognizePassportMRZOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizePassportMRZRequest&, const RecognizePassportMRZOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizePassportMRZAsyncHandler;
@@ -142,6 +158,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecognizeQuotaInvoiceResult> RecognizeQuotaInvoiceOutcome;
typedef std::future<RecognizeQuotaInvoiceOutcome> RecognizeQuotaInvoiceOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeQuotaInvoiceRequest&, const RecognizeQuotaInvoiceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeQuotaInvoiceAsyncHandler;
typedef Outcome<Error, Model::RecognizeRussiaIdentityCardResult> RecognizeRussiaIdentityCardOutcome;
typedef std::future<RecognizeRussiaIdentityCardOutcome> RecognizeRussiaIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeRussiaIdentityCardRequest&, const RecognizeRussiaIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeRussiaIdentityCardAsyncHandler;
typedef Outcome<Error, Model::RecognizeStampResult> RecognizeStampOutcome;
typedef std::future<RecognizeStampOutcome> RecognizeStampOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeStampRequest&, const RecognizeStampOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeStampAsyncHandler;
@@ -160,6 +179,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecognizeTrainTicketResult> RecognizeTrainTicketOutcome;
typedef std::future<RecognizeTrainTicketOutcome> RecognizeTrainTicketOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeTrainTicketRequest&, const RecognizeTrainTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeTrainTicketAsyncHandler;
typedef Outcome<Error, Model::RecognizeTurkeyIdentityCardResult> RecognizeTurkeyIdentityCardOutcome;
typedef std::future<RecognizeTurkeyIdentityCardOutcome> RecognizeTurkeyIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeTurkeyIdentityCardRequest&, const RecognizeTurkeyIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeTurkeyIdentityCardAsyncHandler;
typedef Outcome<Error, Model::RecognizeUkraineIdentityCardResult> RecognizeUkraineIdentityCardOutcome;
typedef std::future<RecognizeUkraineIdentityCardOutcome> RecognizeUkraineIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeUkraineIdentityCardRequest&, const RecognizeUkraineIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeUkraineIdentityCardAsyncHandler;
@@ -178,6 +200,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecognizeVideoCharacterResult> RecognizeVideoCharacterOutcome;
typedef std::future<RecognizeVideoCharacterOutcome> RecognizeVideoCharacterOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeVideoCharacterRequest&, const RecognizeVideoCharacterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVideoCharacterAsyncHandler;
typedef Outcome<Error, Model::RecognizeVietnamIdentityCardResult> RecognizeVietnamIdentityCardOutcome;
typedef std::future<RecognizeVietnamIdentityCardOutcome> RecognizeVietnamIdentityCardOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeVietnamIdentityCardRequest&, const RecognizeVietnamIdentityCardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVietnamIdentityCardAsyncHandler;
typedef Outcome<Error, Model::TrimDocumentResult> TrimDocumentOutcome;
typedef std::future<TrimDocumentOutcome> TrimDocumentOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::TrimDocumentRequest&, const TrimDocumentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TrimDocumentAsyncHandler;
@@ -219,9 +244,15 @@ namespace AlibabaCloud
RecognizeIdentityCardOutcome recognizeIdentityCard(const Model::RecognizeIdentityCardRequest &request)const;
void recognizeIdentityCardAsync(const Model::RecognizeIdentityCardRequest& request, const RecognizeIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeIdentityCardOutcomeCallable recognizeIdentityCardCallable(const Model::RecognizeIdentityCardRequest& request) const;
RecognizeIndonesiaIdentityCardOutcome recognizeIndonesiaIdentityCard(const Model::RecognizeIndonesiaIdentityCardRequest &request)const;
void recognizeIndonesiaIdentityCardAsync(const Model::RecognizeIndonesiaIdentityCardRequest& request, const RecognizeIndonesiaIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeIndonesiaIdentityCardOutcomeCallable recognizeIndonesiaIdentityCardCallable(const Model::RecognizeIndonesiaIdentityCardRequest& request) const;
RecognizeLicensePlateOutcome recognizeLicensePlate(const Model::RecognizeLicensePlateRequest &request)const;
void recognizeLicensePlateAsync(const Model::RecognizeLicensePlateRequest& request, const RecognizeLicensePlateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeLicensePlateOutcomeCallable recognizeLicensePlateCallable(const Model::RecognizeLicensePlateRequest& request) const;
RecognizeMalaysiaIdentityCardOutcome recognizeMalaysiaIdentityCard(const Model::RecognizeMalaysiaIdentityCardRequest &request)const;
void recognizeMalaysiaIdentityCardAsync(const Model::RecognizeMalaysiaIdentityCardRequest& request, const RecognizeMalaysiaIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeMalaysiaIdentityCardOutcomeCallable recognizeMalaysiaIdentityCardCallable(const Model::RecognizeMalaysiaIdentityCardRequest& request) const;
RecognizePassportMRZOutcome recognizePassportMRZ(const Model::RecognizePassportMRZRequest &request)const;
void recognizePassportMRZAsync(const Model::RecognizePassportMRZRequest& request, const RecognizePassportMRZAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizePassportMRZOutcomeCallable recognizePassportMRZCallable(const Model::RecognizePassportMRZRequest& request) const;
@@ -237,6 +268,9 @@ namespace AlibabaCloud
RecognizeQuotaInvoiceOutcome recognizeQuotaInvoice(const Model::RecognizeQuotaInvoiceRequest &request)const;
void recognizeQuotaInvoiceAsync(const Model::RecognizeQuotaInvoiceRequest& request, const RecognizeQuotaInvoiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeQuotaInvoiceOutcomeCallable recognizeQuotaInvoiceCallable(const Model::RecognizeQuotaInvoiceRequest& request) const;
RecognizeRussiaIdentityCardOutcome recognizeRussiaIdentityCard(const Model::RecognizeRussiaIdentityCardRequest &request)const;
void recognizeRussiaIdentityCardAsync(const Model::RecognizeRussiaIdentityCardRequest& request, const RecognizeRussiaIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeRussiaIdentityCardOutcomeCallable recognizeRussiaIdentityCardCallable(const Model::RecognizeRussiaIdentityCardRequest& request) const;
RecognizeStampOutcome recognizeStamp(const Model::RecognizeStampRequest &request)const;
void recognizeStampAsync(const Model::RecognizeStampRequest& request, const RecognizeStampAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeStampOutcomeCallable recognizeStampCallable(const Model::RecognizeStampRequest& request) const;
@@ -255,6 +289,9 @@ namespace AlibabaCloud
RecognizeTrainTicketOutcome recognizeTrainTicket(const Model::RecognizeTrainTicketRequest &request)const;
void recognizeTrainTicketAsync(const Model::RecognizeTrainTicketRequest& request, const RecognizeTrainTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeTrainTicketOutcomeCallable recognizeTrainTicketCallable(const Model::RecognizeTrainTicketRequest& request) const;
RecognizeTurkeyIdentityCardOutcome recognizeTurkeyIdentityCard(const Model::RecognizeTurkeyIdentityCardRequest &request)const;
void recognizeTurkeyIdentityCardAsync(const Model::RecognizeTurkeyIdentityCardRequest& request, const RecognizeTurkeyIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeTurkeyIdentityCardOutcomeCallable recognizeTurkeyIdentityCardCallable(const Model::RecognizeTurkeyIdentityCardRequest& request) const;
RecognizeUkraineIdentityCardOutcome recognizeUkraineIdentityCard(const Model::RecognizeUkraineIdentityCardRequest &request)const;
void recognizeUkraineIdentityCardAsync(const Model::RecognizeUkraineIdentityCardRequest& request, const RecognizeUkraineIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeUkraineIdentityCardOutcomeCallable recognizeUkraineIdentityCardCallable(const Model::RecognizeUkraineIdentityCardRequest& request) const;
@@ -273,6 +310,9 @@ namespace AlibabaCloud
RecognizeVideoCharacterOutcome recognizeVideoCharacter(const Model::RecognizeVideoCharacterRequest &request)const;
void recognizeVideoCharacterAsync(const Model::RecognizeVideoCharacterRequest& request, const RecognizeVideoCharacterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVideoCharacterOutcomeCallable recognizeVideoCharacterCallable(const Model::RecognizeVideoCharacterRequest& request) const;
RecognizeVietnamIdentityCardOutcome recognizeVietnamIdentityCard(const Model::RecognizeVietnamIdentityCardRequest &request)const;
void recognizeVietnamIdentityCardAsync(const Model::RecognizeVietnamIdentityCardRequest& request, const RecognizeVietnamIdentityCardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVietnamIdentityCardOutcomeCallable recognizeVietnamIdentityCardCallable(const Model::RecognizeVietnamIdentityCardRequest& request) const;
TrimDocumentOutcome trimDocument(const Model::TrimDocumentRequest &request)const;
void trimDocumentAsync(const Model::TrimDocumentRequest& request, const TrimDocumentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TrimDocumentOutcomeCallable trimDocumentCallable(const Model::TrimDocumentRequest& request) const;

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEINDONESIAIDENTITYCARDREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEINDONESIAIDENTITYCARDREQUEST_H_
#include <alibabacloud/ocr/OcrExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ocr {
namespace Model {
class ALIBABACLOUD_OCR_EXPORT RecognizeIndonesiaIdentityCardRequest : public RpcServiceRequest {
public:
RecognizeIndonesiaIdentityCardRequest();
~RecognizeIndonesiaIdentityCardRequest();
std::string getImageUrl() const;
void setImageUrl(const std::string &imageUrl);
private:
std::string imageUrl_;
};
} // namespace Model
} // namespace Ocr
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEINDONESIAIDENTITYCARDREQUEST_H_

View File

@@ -0,0 +1,322 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEINDONESIAIDENTITYCARDRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEINDONESIAIDENTITYCARDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizeIndonesiaIdentityCardResult : public ServiceResult
{
public:
struct Data
{
struct AddressFirstLine
{
struct KeyPointsItem
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem> keyPoints;
std::string text;
};
struct AddressSecondLine
{
struct KeyPointsItem2
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem2> keyPoints1;
std::string text;
};
struct AddressThirdLine
{
struct KeyPointsItem4
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem4> keyPoints3;
std::string text;
};
struct AddressFourthLine
{
struct KeyPointsItem6
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem6> keyPoints5;
std::string text;
};
struct AddressFifthLine
{
struct KeyPointsItem8
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem8> keyPoints7;
};
struct BirthDate
{
struct KeyPointsItem10
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem10> keyPoints9;
};
struct BirthPlace
{
struct KeyPointsItem12
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem12> keyPoints11;
std::string text;
};
struct CardBox
{
struct KeyPointsItem14
{
float x;
float y;
};
std::vector<KeyPointsItem14> keyPoints13;
std::string score;
std::string text;
};
struct ExpiryDate
{
struct KeyPointsItem16
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem16> keyPoints15;
std::string text;
};
struct Gender
{
struct KeyPointsItem18
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem18> keyPoints17;
};
struct Height
{
struct KeyPointsItem20
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem20> keyPoints19;
};
struct IdNumber
{
struct KeyPointsItem22
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem22> keyPoints21;
std::string text;
};
struct LicenseNumber
{
struct KeyPointsItem24
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem24> keyPoints23;
std::string text;
};
struct MaritalStatus
{
struct KeyPointsItem26
{
float x;
float y;
};
std::vector<KeyPointsItem26> keyPoints25;
std::string score;
std::string text;
};
struct NameFirstLine
{
struct KeyPointsItem28
{
float x;
float y;
};
std::vector<KeyPointsItem28> keyPoints27;
std::string score;
std::string text;
};
struct NameSecondLine
{
struct KeyPointsItem30
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem30> keyPoints29;
};
struct Nationality
{
struct KeyPointsItem32
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem32> keyPoints31;
std::string text;
};
struct Occupation
{
struct KeyPointsItem34
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem34> keyPoints33;
std::string text;
};
struct PortraitBox
{
struct KeyPointsItem36
{
float x;
float y;
};
std::vector<KeyPointsItem36> keyPoints35;
std::string score;
std::string text;
};
struct Province
{
struct KeyPointsItem38
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem38> keyPoints37;
std::string text;
};
struct Religion
{
struct KeyPointsItem40
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem40> keyPoints39;
};
struct Sex
{
struct KeyPointsItem42
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem42> keyPoints41;
std::string text;
};
ExpiryDate expiryDate;
BirthPlace birthPlace;
LicenseNumber licenseNumber;
IdNumber idNumber;
CardBox cardBox;
Sex sex;
NameFirstLine nameFirstLine;
Religion religion;
Gender gender;
PortraitBox portraitBox;
Nationality nationality;
Province province;
MaritalStatus maritalStatus;
Occupation occupation;
AddressThirdLine addressThirdLine;
AddressFourthLine addressFourthLine;
AddressFirstLine addressFirstLine;
Height height;
NameSecondLine nameSecondLine;
AddressSecondLine addressSecondLine;
AddressFifthLine addressFifthLine;
BirthDate birthDate;
};
RecognizeIndonesiaIdentityCardResult();
explicit RecognizeIndonesiaIdentityCardResult(const std::string &payload);
~RecognizeIndonesiaIdentityCardResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEINDONESIAIDENTITYCARDRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEMALAYSIAIDENTITYCARDREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEMALAYSIAIDENTITYCARDREQUEST_H_
#include <alibabacloud/ocr/OcrExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ocr {
namespace Model {
class ALIBABACLOUD_OCR_EXPORT RecognizeMalaysiaIdentityCardRequest : public RpcServiceRequest {
public:
RecognizeMalaysiaIdentityCardRequest();
~RecognizeMalaysiaIdentityCardRequest();
std::string getImageUrl() const;
void setImageUrl(const std::string &imageUrl);
private:
std::string imageUrl_;
};
} // namespace Model
} // namespace Ocr
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEMALAYSIAIDENTITYCARDREQUEST_H_

View File

@@ -0,0 +1,238 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEMALAYSIAIDENTITYCARDRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEMALAYSIAIDENTITYCARDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizeMalaysiaIdentityCardResult : public ServiceResult
{
public:
struct Data
{
struct AddressFirstLine
{
struct KeyPointsItem
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem> keyPoints;
std::string text;
};
struct AddressSecondLine
{
struct KeyPointsItem2
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem2> keyPoints1;
std::string text;
};
struct AddressThirdLine
{
struct KeyPointsItem4
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem4> keyPoints3;
std::string text;
};
struct AddressFourthLine
{
struct KeyPointsItem6
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem6> keyPoints5;
std::string text;
};
struct AddressFifthLine
{
struct KeyPointsItem8
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem8> keyPoints7;
};
struct CardBox
{
struct KeyPointsItem10
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem10> keyPoints9;
};
struct DriveClass
{
struct KeyPointsItem12
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem12> keyPoints11;
std::string text;
};
struct ExpiryDate
{
struct KeyPointsItem14
{
float x;
float y;
};
std::vector<KeyPointsItem14> keyPoints13;
std::string score;
std::string text;
};
struct IdNumber
{
struct KeyPointsItem16
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem16> keyPoints15;
std::string text;
};
struct IssueDate
{
struct KeyPointsItem18
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem18> keyPoints17;
};
struct NameFirstLine
{
struct KeyPointsItem20
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem20> keyPoints19;
};
struct NameSecondLine
{
struct KeyPointsItem22
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem22> keyPoints21;
std::string text;
};
struct Nationality
{
struct KeyPointsItem24
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem24> keyPoints23;
std::string text;
};
struct PortraitBox
{
struct KeyPointsItem26
{
float x;
float y;
};
std::vector<KeyPointsItem26> keyPoints25;
std::string score;
std::string text;
};
struct Sex
{
struct KeyPointsItem28
{
float x;
float y;
};
std::vector<KeyPointsItem28> keyPoints27;
std::string score;
std::string text;
};
ExpiryDate expiryDate;
IdNumber idNumber;
CardBox cardBox;
Sex sex;
NameFirstLine nameFirstLine;
IssueDate issueDate;
PortraitBox portraitBox;
Nationality nationality;
AddressThirdLine addressThirdLine;
AddressFourthLine addressFourthLine;
AddressFirstLine addressFirstLine;
NameSecondLine nameSecondLine;
DriveClass driveClass;
AddressSecondLine addressSecondLine;
AddressFifthLine addressFifthLine;
};
RecognizeMalaysiaIdentityCardResult();
explicit RecognizeMalaysiaIdentityCardResult(const std::string &payload);
~RecognizeMalaysiaIdentityCardResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEMALAYSIAIDENTITYCARDRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDREQUEST_H_
#include <alibabacloud/ocr/OcrExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ocr {
namespace Model {
class ALIBABACLOUD_OCR_EXPORT RecognizeRussiaIdentityCardRequest : public RpcServiceRequest {
public:
RecognizeRussiaIdentityCardRequest();
~RecognizeRussiaIdentityCardRequest();
std::string getImageUrl() const;
void setImageUrl(const std::string &imageUrl);
private:
std::string imageUrl_;
};
} // namespace Model
} // namespace Ocr
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDREQUEST_H_

View File

@@ -0,0 +1,202 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizeRussiaIdentityCardResult : public ServiceResult
{
public:
struct Data
{
struct BirthDate
{
struct KeyPointsItem
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem> keyPoints;
std::string text;
};
struct BirthPlaceFirstLine
{
struct KeyPointsItem2
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem2> keyPoints1;
std::string text;
};
struct BirthPlaceSecondLine
{
struct KeyPointsItem4
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem4> keyPoints3;
std::string text;
};
struct BirthPlaceThirdLine
{
struct KeyPointsItem6
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem6> keyPoints5;
std::string text;
};
struct CardBox
{
struct KeyPointsItem8
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem8> keyPoints7;
};
struct GivenName
{
struct KeyPointsItem10
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem10> keyPoints9;
};
struct IdNumber
{
struct KeyPointsItem12
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem12> keyPoints11;
std::string text;
};
struct PaternalName
{
struct KeyPointsItem14
{
float x;
float y;
};
std::vector<KeyPointsItem14> keyPoints13;
std::string score;
std::string text;
};
struct PortraitBox
{
struct KeyPointsItem16
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem16> keyPoints15;
std::string text;
};
struct Sex
{
struct KeyPointsItem18
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem18> keyPoints17;
};
struct SurnameFirstLine
{
struct KeyPointsItem20
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem20> keyPoints19;
};
struct SurnameSecondLine
{
struct KeyPointsItem22
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem22> keyPoints21;
std::string text;
};
SurnameFirstLine surnameFirstLine;
BirthPlaceFirstLine birthPlaceFirstLine;
BirthPlaceSecondLine birthPlaceSecondLine;
IdNumber idNumber;
PaternalName paternalName;
CardBox cardBox;
Sex sex;
SurnameSecondLine surnameSecondLine;
GivenName givenName;
PortraitBox portraitBox;
BirthPlaceThirdLine birthPlaceThirdLine;
BirthDate birthDate;
};
RecognizeRussiaIdentityCardResult();
explicit RecognizeRussiaIdentityCardResult(const std::string &payload);
~RecognizeRussiaIdentityCardResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZETURKEYIDENTITYCARDREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZETURKEYIDENTITYCARDREQUEST_H_
#include <alibabacloud/ocr/OcrExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ocr {
namespace Model {
class ALIBABACLOUD_OCR_EXPORT RecognizeTurkeyIdentityCardRequest : public RpcServiceRequest {
public:
RecognizeTurkeyIdentityCardRequest();
~RecognizeTurkeyIdentityCardRequest();
std::string getImageUrl() const;
void setImageUrl(const std::string &imageUrl);
private:
std::string imageUrl_;
};
} // namespace Model
} // namespace Ocr
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZETURKEYIDENTITYCARDREQUEST_H_

View File

@@ -0,0 +1,586 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZETURKEYIDENTITYCARDRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZETURKEYIDENTITYCARDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizeTurkeyIdentityCardResult : public ServiceResult
{
public:
struct Data
{
struct AuxiliaryTools
{
struct KeyPointsItem
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem> keyPoints;
std::string text;
};
struct BirthDate
{
struct KeyPointsItem2
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem2> keyPoints1;
std::string text;
};
struct BirthPlace
{
struct KeyPointsItem4
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem4> keyPoints3;
std::string text;
};
struct BloodType
{
struct KeyPointsItem6
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem6> keyPoints5;
std::string text;
};
struct CardBox
{
struct KeyPointsItem8
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem8> keyPoints7;
};
struct Cilt
{
struct KeyPointsItem10
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem10> keyPoints9;
};
struct DocumentNumber
{
struct KeyPointsItem12
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem12> keyPoints11;
std::string text;
};
struct DriveClass
{
struct KeyPointsItem14
{
float x;
float y;
};
std::vector<KeyPointsItem14> keyPoints13;
float score;
std::string text;
};
struct DueDate
{
struct KeyPointsItem16
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem16> keyPoints15;
std::string text;
};
struct Duzenleyen
{
struct KeyPointsItem18
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem18> keyPoints17;
};
struct EntryNumber
{
struct KeyPointsItem20
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem20> keyPoints19;
};
struct ExpiryDate
{
struct KeyPointsItem22
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem22> keyPoints21;
std::string text;
};
struct FatherName
{
struct KeyPointsItem24
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem24> keyPoints23;
std::string text;
};
struct ForeignersId
{
struct KeyPointsItem26
{
float x;
float y;
};
std::vector<KeyPointsItem26> keyPoints25;
float score;
std::string text;
};
struct Gender
{
struct KeyPointsItem28
{
float x;
float y;
};
std::vector<KeyPointsItem28> keyPoints27;
float score;
std::string text;
};
struct GivenName
{
struct KeyPointsItem30
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem30> keyPoints29;
};
struct IdNumber
{
struct KeyPointsItem32
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem32> keyPoints31;
std::string text;
};
struct IssueBy
{
struct KeyPointsItem34
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem34> keyPoints33;
std::string text;
};
struct IssueCounty
{
struct KeyPointsItem36
{
float x;
float y;
};
std::vector<KeyPointsItem36> keyPoints35;
float score;
std::string text;
};
struct IssueDate
{
struct KeyPointsItem38
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem38> keyPoints37;
std::string text;
};
struct IssuePlace
{
struct KeyPointsItem40
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem40> keyPoints39;
};
struct Kutuk
{
struct KeyPointsItem42
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem42> keyPoints41;
std::string text;
};
struct LicenseNumber
{
struct KeyPointsItem44
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem44> keyPoints43;
std::string text;
};
struct MaritalStatus
{
struct KeyPointsItem46
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem46> keyPoints45;
std::string text;
};
struct MotherName
{
struct KeyPointsItem48
{
float x;
float y;
};
std::vector<KeyPointsItem48> keyPoints47;
float score;
std::string text;
};
struct Name
{
struct KeyPointsItem50
{
float x;
float y;
};
std::vector<KeyPointsItem50> keyPoints49;
float score;
std::string text;
};
struct Nationality
{
struct KeyPointsItem52
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem52> keyPoints51;
};
struct NeighborhoodVillage
{
struct KeyPointsItem54
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem54> keyPoints53;
std::string text;
};
struct PageNumber
{
struct KeyPointsItem56
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem56> keyPoints55;
std::string text;
};
struct PassportNumber
{
struct KeyPointsItem58
{
float x;
float y;
};
std::vector<KeyPointsItem58> keyPoints57;
float score;
std::string text;
};
struct PortraitBox
{
struct KeyPointsItem60
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem60> keyPoints59;
std::string text;
};
struct Province
{
struct KeyPointsItem62
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem62> keyPoints61;
std::string text;
};
struct ProvinceOfResidence
{
struct KeyPointsItem64
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem64> keyPoints63;
std::string text;
};
struct ReasonOfIssue
{
struct KeyPointsItem66
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem66> keyPoints65;
std::string text;
};
struct RegisterNumber
{
struct KeyPointsItem68
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem68> keyPoints67;
std::string text;
};
struct Religion
{
struct KeyPointsItem70
{
float x;
float y;
};
std::vector<KeyPointsItem70> keyPoints69;
float score;
std::string text;
};
struct Sayfa
{
struct KeyPointsItem72
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem72> keyPoints71;
std::string text;
};
struct Seri
{
struct KeyPointsItem74
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem74> keyPoints73;
};
struct Surname
{
struct KeyPointsItem76
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem76> keyPoints75;
std::string text;
};
struct TypeOfResidencePermit
{
struct KeyPointsItem78
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem78> keyPoints77;
std::string text;
};
struct ValidUntil
{
struct KeyPointsItem80
{
float x;
float y;
};
std::vector<KeyPointsItem80> keyPoints79;
float score;
std::string text;
};
struct Village
{
struct KeyPointsItem82
{
float x;
float y;
};
float score;
std::string text;
std::vector<KeyPointsItem82> keyPoints81;
};
struct VolumeNumber
{
struct KeyPointsItem84
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem84> keyPoints83;
std::string text;
};
struct Sex
{
struct KeyPointsItem86
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem86> keyPoints85;
std::string text;
};
ExpiryDate expiryDate;
BirthPlace birthPlace;
ForeignersId foreignersId;
LicenseNumber licenseNumber;
IdNumber idNumber;
CardBox cardBox;
Sex sex;
ReasonOfIssue reasonOfIssue;
GivenName givenName;
Gender gender;
NeighborhoodVillage neighborhoodVillage;
PortraitBox portraitBox;
IssuePlace issuePlace;
TypeOfResidencePermit typeOfResidencePermit;
Seri seri;
Name name;
PageNumber pageNumber;
MotherName motherName;
Kutuk kutuk;
DriveClass driveClass;
DueDate dueDate;
IssueBy issueBy;
Village village;
Religion religion;
IssueDate issueDate;
DocumentNumber documentNumber;
AuxiliaryTools auxiliaryTools;
Cilt cilt;
Nationality nationality;
Province province;
ValidUntil validUntil;
VolumeNumber volumeNumber;
EntryNumber entryNumber;
MaritalStatus maritalStatus;
RegisterNumber registerNumber;
Duzenleyen duzenleyen;
ProvinceOfResidence provinceOfResidence;
PassportNumber passportNumber;
Sayfa sayfa;
IssueCounty issueCounty;
Surname surname;
BloodType bloodType;
BirthDate birthDate;
FatherName fatherName;
};
RecognizeTurkeyIdentityCardResult();
explicit RecognizeTurkeyIdentityCardResult(const std::string &payload);
~RecognizeTurkeyIdentityCardResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZETURKEYIDENTITYCARDRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIETNAMIDENTITYCARDREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIETNAMIDENTITYCARDREQUEST_H_
#include <alibabacloud/ocr/OcrExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ocr {
namespace Model {
class ALIBABACLOUD_OCR_EXPORT RecognizeVietnamIdentityCardRequest : public RpcServiceRequest {
public:
RecognizeVietnamIdentityCardRequest();
~RecognizeVietnamIdentityCardRequest();
std::string getImageUrl() const;
void setImageUrl(const std::string &imageUrl);
private:
std::string imageUrl_;
};
} // namespace Model
} // namespace Ocr
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIETNAMIDENTITYCARDREQUEST_H_

View File

@@ -0,0 +1,238 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIETNAMIDENTITYCARDRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIETNAMIDENTITYCARDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizeVietnamIdentityCardResult : public ServiceResult
{
public:
struct Data
{
struct AddressFirstLine
{
struct KeyPointsItem
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem> keyPoints;
std::string text;
};
struct AddressSecondLine
{
struct KeyPointsItem2
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem2> keyPoints1;
std::string text;
};
struct BirthDate
{
struct KeyPointsItem4
{
float x;
float y;
};
float score;
std::vector<KeyPointsItem4> keyPoints3;
std::string text;
};
struct CardBox
{
struct KeyPointsItem6
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem6> keyPoints5;
std::string text;
};
struct DriveClass
{
struct KeyPointsItem8
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem8> keyPoints7;
};
struct ExpiryDate
{
struct KeyPointsItem10
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem10> keyPoints9;
};
struct FullName
{
struct KeyPointsItem12
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem12> keyPoints11;
std::string text;
};
struct IdNumber
{
struct KeyPointsItem14
{
float x;
float y;
};
std::vector<KeyPointsItem14> keyPoints13;
std::string score;
std::string text;
};
struct Nationality
{
struct KeyPointsItem16
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem16> keyPoints15;
std::string text;
};
struct OriginPlaceFirstLine
{
struct KeyPointsItem18
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem18> keyPoints17;
};
struct OriginPlaceSecondLine
{
struct KeyPointsItem20
{
float x;
float y;
};
std::string score;
std::string text;
std::vector<KeyPointsItem20> keyPoints19;
};
struct PortraitBox
{
struct KeyPointsItem22
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem22> keyPoints21;
std::string text;
};
struct ResidencePlaceFirstLine
{
struct KeyPointsItem24
{
float x;
float y;
};
std::string score;
std::vector<KeyPointsItem24> keyPoints23;
std::string text;
};
struct ResidencePlaceSecondLine
{
struct KeyPointsItem26
{
float x;
float y;
};
std::vector<KeyPointsItem26> keyPoints25;
std::string score;
std::string text;
};
struct Sex
{
struct KeyPointsItem28
{
float x;
float y;
};
std::vector<KeyPointsItem28> keyPoints27;
std::string score;
std::string text;
};
ExpiryDate expiryDate;
OriginPlaceFirstLine originPlaceFirstLine;
IdNumber idNumber;
CardBox cardBox;
Sex sex;
PortraitBox portraitBox;
ResidencePlaceSecondLine residencePlaceSecondLine;
Nationality nationality;
OriginPlaceSecondLine originPlaceSecondLine;
AddressFirstLine addressFirstLine;
FullName fullName;
DriveClass driveClass;
AddressSecondLine addressSecondLine;
BirthDate birthDate;
ResidencePlaceFirstLine residencePlaceFirstLine;
};
RecognizeVietnamIdentityCardResult();
explicit RecognizeVietnamIdentityCardResult(const std::string &payload);
~RecognizeVietnamIdentityCardResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIETNAMIDENTITYCARDRESULT_H_

View File

@@ -447,6 +447,42 @@ 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();
@@ -483,6 +519,42 @@ 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();
@@ -663,6 +735,42 @@ 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();
@@ -879,6 +987,42 @@ 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();
@@ -1095,6 +1239,42 @@ 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();

View File

@@ -0,0 +1,36 @@
/*
* 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);
}

View File

@@ -0,0 +1,394 @@
/*
* 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_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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);
}

View File

@@ -0,0 +1,289 @@
/*
* 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_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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);
}

View File

@@ -0,0 +1,244 @@
/*
* 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_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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);
}

View File

@@ -0,0 +1,724 @@
/*
* 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_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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);
}

View File

@@ -0,0 +1,289 @@
/*
* 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_;
}