BatchGetPartitionsResult.h 5.2 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_DATALAKE_MODEL_BATCHGETPARTITIONSRESULT_H_
  17. #define ALIBABACLOUD_DATALAKE_MODEL_BATCHGETPARTITIONSRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/datalake/DataLakeExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace DataLake
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_DATALAKE_EXPORT BatchGetPartitionsResult : public ServiceResult
  30. {
  31. public:
  32. struct PartitionErrorsItem
  33. {
  34. struct ErrorDetail
  35. {
  36. std::string message;
  37. std::string code;
  38. };
  39. ErrorDetail errorDetail;
  40. std::vector<std::string> partitionValues;
  41. };
  42. struct PartitionsItem
  43. {
  44. struct Privileges
  45. {
  46. std::string groupPrivileges;
  47. std::string rolePrivileges;
  48. std::string userPrivileges;
  49. };
  50. struct Sd
  51. {
  52. struct SerDeInfo
  53. {
  54. std::string serializationLib;
  55. std::string parameters;
  56. std::string name;
  57. };
  58. struct SkewedInfo
  59. {
  60. std::vector<std::string> skewedColValues;
  61. std::string skewedColValueLocationMaps;
  62. std::vector<std::string> skewedColNames;
  63. };
  64. struct ColsItem
  65. {
  66. std::string comment;
  67. std::string type;
  68. std::string parameters;
  69. std::string name;
  70. };
  71. struct SortColsItem
  72. {
  73. int order;
  74. std::string col;
  75. };
  76. bool storedAsSubDirectories;
  77. std::vector<SortColsItem> sortCols;
  78. std::vector<ColsItem> cols;
  79. std::string parameters;
  80. SkewedInfo skewedInfo;
  81. std::string inputFormat;
  82. SerDeInfo serDeInfo;
  83. std::string outputFormat;
  84. std::vector<std::string> bucketCols;
  85. bool compressed;
  86. int numBuckets;
  87. std::string location;
  88. };
  89. Sd sd;
  90. std::string tableName;
  91. std::string parameters;
  92. int lastAnalyzedTime;
  93. Privileges privileges;
  94. int createTime;
  95. std::string databaseName;
  96. std::vector<std::string> values;
  97. int lastAccessTime;
  98. };
  99. struct PartitionSpecsItem
  100. {
  101. struct SharedStorageDescriptor
  102. {
  103. struct ColsItem14
  104. {
  105. std::string comment;
  106. std::string type;
  107. std::string parameters;
  108. std::string name;
  109. };
  110. std::vector<ColsItem14> cols13;
  111. std::string location;
  112. };
  113. struct SharedSDPartitionsItem
  114. {
  115. struct Privileges2
  116. {
  117. std::string groupPrivileges;
  118. std::string rolePrivileges;
  119. std::string userPrivileges;
  120. };
  121. struct Sd3
  122. {
  123. struct SerDeInfo5
  124. {
  125. std::string serializationLib;
  126. std::string parameters;
  127. std::string name;
  128. };
  129. struct SkewedInfo6
  130. {
  131. std::vector<std::string> skewedColValues12;
  132. std::vector<std::string> skewedColNames11;
  133. std::string skewedColValueLocationMaps;
  134. };
  135. struct ColsItem9
  136. {
  137. std::string comment;
  138. std::string type;
  139. std::string parameters;
  140. std::string name;
  141. };
  142. struct SortColsItem10
  143. {
  144. int order;
  145. std::string col;
  146. };
  147. std::vector<ColsItem9> cols7;
  148. bool storedAsSubDirectories;
  149. std::vector<std::string> bucketCols4;
  150. std::string parameters;
  151. std::string inputFormat;
  152. SerDeInfo5 serDeInfo5;
  153. std::vector<SortColsItem10> sortCols8;
  154. std::string outputFormat;
  155. SkewedInfo6 skewedInfo6;
  156. bool compressed;
  157. int numBuckets;
  158. std::string location;
  159. };
  160. Privileges2 privileges2;
  161. std::string tableName;
  162. Sd3 sd3;
  163. std::string parameters;
  164. int lastAnalyzedTime;
  165. int createTime;
  166. std::string databaseName;
  167. std::vector<std::string> values1;
  168. int lastAccessTime;
  169. };
  170. SharedStorageDescriptor sharedStorageDescriptor;
  171. std::vector<PartitionSpecsItem::SharedSDPartitionsItem> sharedSDPartitions;
  172. };
  173. BatchGetPartitionsResult();
  174. explicit BatchGetPartitionsResult(const std::string &payload);
  175. ~BatchGetPartitionsResult();
  176. std::vector<PartitionsItem> getPartitions()const;
  177. std::vector<PartitionSpecsItem> getPartitionSpecs()const;
  178. std::string getMessage()const;
  179. std::vector<PartitionErrorsItem> getPartitionErrors()const;
  180. std::string getCode()const;
  181. bool getSuccess()const;
  182. protected:
  183. void parse(const std::string &payload);
  184. private:
  185. std::vector<PartitionsItem> partitions_;
  186. std::vector<PartitionSpecsItem> partitionSpecs_;
  187. std::string message_;
  188. std::vector<PartitionErrorsItem> partitionErrors_;
  189. std::string code_;
  190. bool success_;
  191. };
  192. }
  193. }
  194. }
  195. #endif // !ALIBABACLOUD_DATALAKE_MODEL_BATCHGETPARTITIONSRESULT_H_