RecognizeRussiaIdentityCardResult.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDRESULT_H_
  17. #define ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/ocr/OcrExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace Ocr
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_OCR_EXPORT RecognizeRussiaIdentityCardResult : public ServiceResult
  30. {
  31. public:
  32. struct Data
  33. {
  34. struct BirthDate
  35. {
  36. struct KeyPointsItem
  37. {
  38. float x;
  39. float y;
  40. };
  41. float score;
  42. std::vector<KeyPointsItem> keyPoints;
  43. std::string text;
  44. };
  45. struct BirthPlaceFirstLine
  46. {
  47. struct KeyPointsItem2
  48. {
  49. float x;
  50. float y;
  51. };
  52. float score;
  53. std::vector<KeyPointsItem2> keyPoints1;
  54. std::string text;
  55. };
  56. struct BirthPlaceSecondLine
  57. {
  58. struct KeyPointsItem4
  59. {
  60. float x;
  61. float y;
  62. };
  63. float score;
  64. std::vector<KeyPointsItem4> keyPoints3;
  65. std::string text;
  66. };
  67. struct BirthPlaceThirdLine
  68. {
  69. struct KeyPointsItem6
  70. {
  71. float x;
  72. float y;
  73. };
  74. float score;
  75. std::vector<KeyPointsItem6> keyPoints5;
  76. std::string text;
  77. };
  78. struct CardBox
  79. {
  80. struct KeyPointsItem8
  81. {
  82. float x;
  83. float y;
  84. };
  85. std::string score;
  86. std::string text;
  87. std::vector<KeyPointsItem8> keyPoints7;
  88. };
  89. struct GivenName
  90. {
  91. struct KeyPointsItem10
  92. {
  93. float x;
  94. float y;
  95. };
  96. std::string score;
  97. std::string text;
  98. std::vector<KeyPointsItem10> keyPoints9;
  99. };
  100. struct IdNumber
  101. {
  102. struct KeyPointsItem12
  103. {
  104. float x;
  105. float y;
  106. };
  107. std::string score;
  108. std::vector<KeyPointsItem12> keyPoints11;
  109. std::string text;
  110. };
  111. struct PaternalName
  112. {
  113. struct KeyPointsItem14
  114. {
  115. float x;
  116. float y;
  117. };
  118. std::vector<KeyPointsItem14> keyPoints13;
  119. std::string score;
  120. std::string text;
  121. };
  122. struct PortraitBox
  123. {
  124. struct KeyPointsItem16
  125. {
  126. float x;
  127. float y;
  128. };
  129. std::string score;
  130. std::vector<KeyPointsItem16> keyPoints15;
  131. std::string text;
  132. };
  133. struct Sex
  134. {
  135. struct KeyPointsItem18
  136. {
  137. float x;
  138. float y;
  139. };
  140. std::string score;
  141. std::string text;
  142. std::vector<KeyPointsItem18> keyPoints17;
  143. };
  144. struct SurnameFirstLine
  145. {
  146. struct KeyPointsItem20
  147. {
  148. float x;
  149. float y;
  150. };
  151. std::string score;
  152. std::string text;
  153. std::vector<KeyPointsItem20> keyPoints19;
  154. };
  155. struct SurnameSecondLine
  156. {
  157. struct KeyPointsItem22
  158. {
  159. float x;
  160. float y;
  161. };
  162. std::string score;
  163. std::vector<KeyPointsItem22> keyPoints21;
  164. std::string text;
  165. };
  166. SurnameFirstLine surnameFirstLine;
  167. BirthPlaceFirstLine birthPlaceFirstLine;
  168. BirthPlaceSecondLine birthPlaceSecondLine;
  169. IdNumber idNumber;
  170. PaternalName paternalName;
  171. CardBox cardBox;
  172. Sex sex;
  173. SurnameSecondLine surnameSecondLine;
  174. GivenName givenName;
  175. PortraitBox portraitBox;
  176. BirthPlaceThirdLine birthPlaceThirdLine;
  177. BirthDate birthDate;
  178. };
  179. RecognizeRussiaIdentityCardResult();
  180. explicit RecognizeRussiaIdentityCardResult(const std::string &payload);
  181. ~RecognizeRussiaIdentityCardResult();
  182. std::string getMessage()const;
  183. Data getData()const;
  184. std::string getCode()const;
  185. protected:
  186. void parse(const std::string &payload);
  187. private:
  188. std::string message_;
  189. Data data_;
  190. std::string code_;
  191. };
  192. }
  193. }
  194. }
  195. #endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZERUSSIAIDENTITYCARDRESULT_H_