DescribeMultiZoneClusterResult.cc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  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. #include <alibabacloud/hbase/model/DescribeMultiZoneClusterResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::HBase;
  19. using namespace AlibabaCloud::HBase::Model;
  20. DescribeMultiZoneClusterResult::DescribeMultiZoneClusterResult() :
  21. ServiceResult()
  22. {}
  23. DescribeMultiZoneClusterResult::DescribeMultiZoneClusterResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. DescribeMultiZoneClusterResult::~DescribeMultiZoneClusterResult()
  29. {}
  30. void DescribeMultiZoneClusterResult::parse(const std::string &payload)
  31. {
  32. Json::Reader reader;
  33. Json::Value value;
  34. reader.parse(payload, value);
  35. setRequestId(value["RequestId"].asString());
  36. auto allMultiZoneInstanceModelsNode = value["MultiZoneInstanceModels"]["MultiZoneInstanceModel"];
  37. for (auto valueMultiZoneInstanceModelsMultiZoneInstanceModel : allMultiZoneInstanceModelsNode)
  38. {
  39. MultiZoneInstanceModel multiZoneInstanceModelsObject;
  40. if(!valueMultiZoneInstanceModelsMultiZoneInstanceModel["InsName"].isNull())
  41. multiZoneInstanceModelsObject.insName = valueMultiZoneInstanceModelsMultiZoneInstanceModel["InsName"].asString();
  42. if(!valueMultiZoneInstanceModelsMultiZoneInstanceModel["IsLatestVersion"].isNull())
  43. multiZoneInstanceModelsObject.isLatestVersion = valueMultiZoneInstanceModelsMultiZoneInstanceModel["IsLatestVersion"].asString() == "true";
  44. if(!valueMultiZoneInstanceModelsMultiZoneInstanceModel["MinorVersion"].isNull())
  45. multiZoneInstanceModelsObject.minorVersion = valueMultiZoneInstanceModelsMultiZoneInstanceModel["MinorVersion"].asString();
  46. if(!valueMultiZoneInstanceModelsMultiZoneInstanceModel["Status"].isNull())
  47. multiZoneInstanceModelsObject.status = valueMultiZoneInstanceModelsMultiZoneInstanceModel["Status"].asString();
  48. if(!valueMultiZoneInstanceModelsMultiZoneInstanceModel["Role"].isNull())
  49. multiZoneInstanceModelsObject.role = valueMultiZoneInstanceModelsMultiZoneInstanceModel["Role"].asString();
  50. multiZoneInstanceModels_.push_back(multiZoneInstanceModelsObject);
  51. }
  52. auto allTagsNode = value["Tags"]["Tag"];
  53. for (auto valueTagsTag : allTagsNode)
  54. {
  55. Tag tagsObject;
  56. if(!valueTagsTag["Key"].isNull())
  57. tagsObject.key = valueTagsTag["Key"].asString();
  58. if(!valueTagsTag["Value"].isNull())
  59. tagsObject.value = valueTagsTag["Value"].asString();
  60. tags_.push_back(tagsObject);
  61. }
  62. if(!value["AutoRenewal"].isNull())
  63. autoRenewal_ = value["AutoRenewal"].asString() == "true";
  64. if(!value["ClusterId"].isNull())
  65. clusterId_ = value["ClusterId"].asString();
  66. if(!value["ClusterName"].isNull())
  67. clusterName_ = value["ClusterName"].asString();
  68. if(!value["CreatedTime"].isNull())
  69. createdTime_ = value["CreatedTime"].asString();
  70. if(!value["CreatedTimeUTC"].isNull())
  71. createdTimeUTC_ = value["CreatedTimeUTC"].asString();
  72. if(!value["Duration"].isNull())
  73. duration_ = std::stoi(value["Duration"].asString());
  74. if(!value["Engine"].isNull())
  75. engine_ = value["Engine"].asString();
  76. if(!value["ExpireTime"].isNull())
  77. expireTime_ = value["ExpireTime"].asString();
  78. if(!value["ExpireTimeUTC"].isNull())
  79. expireTimeUTC_ = value["ExpireTimeUTC"].asString();
  80. if(!value["InstanceId"].isNull())
  81. instanceId_ = value["InstanceId"].asString();
  82. if(!value["InstanceName"].isNull())
  83. instanceName_ = value["InstanceName"].asString();
  84. if(!value["IsDeletionProtection"].isNull())
  85. isDeletionProtection_ = value["IsDeletionProtection"].asString() == "true";
  86. if(!value["MaintainEndTime"].isNull())
  87. maintainEndTime_ = value["MaintainEndTime"].asString();
  88. if(!value["MaintainStartTime"].isNull())
  89. maintainStartTime_ = value["MaintainStartTime"].asString();
  90. if(!value["MajorVersion"].isNull())
  91. majorVersion_ = value["MajorVersion"].asString();
  92. if(!value["MasterDiskSize"].isNull())
  93. masterDiskSize_ = std::stoi(value["MasterDiskSize"].asString());
  94. if(!value["MasterDiskType"].isNull())
  95. masterDiskType_ = value["MasterDiskType"].asString();
  96. if(!value["MasterInstanceType"].isNull())
  97. masterInstanceType_ = value["MasterInstanceType"].asString();
  98. if(!value["MasterNodeCount"].isNull())
  99. masterNodeCount_ = std::stoi(value["MasterNodeCount"].asString());
  100. if(!value["CoreDiskCount"].isNull())
  101. coreDiskCount_ = value["CoreDiskCount"].asString();
  102. if(!value["CoreDiskSize"].isNull())
  103. coreDiskSize_ = std::stoi(value["CoreDiskSize"].asString());
  104. if(!value["CoreDiskType"].isNull())
  105. coreDiskType_ = value["CoreDiskType"].asString();
  106. if(!value["CoreInstanceType"].isNull())
  107. coreInstanceType_ = value["CoreInstanceType"].asString();
  108. if(!value["CoreNodeCount"].isNull())
  109. coreNodeCount_ = std::stoi(value["CoreNodeCount"].asString());
  110. if(!value["LogDiskCount"].isNull())
  111. logDiskCount_ = value["LogDiskCount"].asString();
  112. if(!value["LogDiskSize"].isNull())
  113. logDiskSize_ = std::stoi(value["LogDiskSize"].asString());
  114. if(!value["LogDiskType"].isNull())
  115. logDiskType_ = value["LogDiskType"].asString();
  116. if(!value["LogInstanceType"].isNull())
  117. logInstanceType_ = value["LogInstanceType"].asString();
  118. if(!value["LogNodeCount"].isNull())
  119. logNodeCount_ = std::stoi(value["LogNodeCount"].asString());
  120. if(!value["ModuleId"].isNull())
  121. moduleId_ = std::stoi(value["ModuleId"].asString());
  122. if(!value["ModuleStackVersion"].isNull())
  123. moduleStackVersion_ = value["ModuleStackVersion"].asString();
  124. if(!value["NetworkType"].isNull())
  125. networkType_ = value["NetworkType"].asString();
  126. if(!value["ParentId"].isNull())
  127. parentId_ = value["ParentId"].asString();
  128. if(!value["PayType"].isNull())
  129. payType_ = value["PayType"].asString();
  130. if(!value["RegionId"].isNull())
  131. regionId_ = value["RegionId"].asString();
  132. if(!value["Status"].isNull())
  133. status_ = value["Status"].asString();
  134. if(!value["MultiZoneCombination"].isNull())
  135. multiZoneCombination_ = value["MultiZoneCombination"].asString();
  136. if(!value["PrimaryZoneId"].isNull())
  137. primaryZoneId_ = value["PrimaryZoneId"].asString();
  138. if(!value["PrimaryVSwitchIds"].isNull())
  139. primaryVSwitchIds_ = value["PrimaryVSwitchIds"].asString();
  140. if(!value["StandbyZoneId"].isNull())
  141. standbyZoneId_ = value["StandbyZoneId"].asString();
  142. if(!value["StandbyVSwitchIds"].isNull())
  143. standbyVSwitchIds_ = value["StandbyVSwitchIds"].asString();
  144. if(!value["ArbiterZoneId"].isNull())
  145. arbiterZoneId_ = value["ArbiterZoneId"].asString();
  146. if(!value["ArbiterVSwitchIds"].isNull())
  147. arbiterVSwitchIds_ = value["ArbiterVSwitchIds"].asString();
  148. if(!value["VpcId"].isNull())
  149. vpcId_ = value["VpcId"].asString();
  150. }
  151. std::string DescribeMultiZoneClusterResult::getModuleStackVersion()const
  152. {
  153. return moduleStackVersion_;
  154. }
  155. std::string DescribeMultiZoneClusterResult::getStandbyZoneId()const
  156. {
  157. return standbyZoneId_;
  158. }
  159. std::string DescribeMultiZoneClusterResult::getCreatedTime()const
  160. {
  161. return createdTime_;
  162. }
  163. std::string DescribeMultiZoneClusterResult::getMasterInstanceType()const
  164. {
  165. return masterInstanceType_;
  166. }
  167. std::string DescribeMultiZoneClusterResult::getPrimaryVSwitchIds()const
  168. {
  169. return primaryVSwitchIds_;
  170. }
  171. bool DescribeMultiZoneClusterResult::getIsDeletionProtection()const
  172. {
  173. return isDeletionProtection_;
  174. }
  175. std::string DescribeMultiZoneClusterResult::getLogDiskCount()const
  176. {
  177. return logDiskCount_;
  178. }
  179. int DescribeMultiZoneClusterResult::getLogDiskSize()const
  180. {
  181. return logDiskSize_;
  182. }
  183. int DescribeMultiZoneClusterResult::getModuleId()const
  184. {
  185. return moduleId_;
  186. }
  187. std::string DescribeMultiZoneClusterResult::getArbiterVSwitchIds()const
  188. {
  189. return arbiterVSwitchIds_;
  190. }
  191. std::string DescribeMultiZoneClusterResult::getMaintainEndTime()const
  192. {
  193. return maintainEndTime_;
  194. }
  195. std::string DescribeMultiZoneClusterResult::getStandbyVSwitchIds()const
  196. {
  197. return standbyVSwitchIds_;
  198. }
  199. std::string DescribeMultiZoneClusterResult::getNetworkType()const
  200. {
  201. return networkType_;
  202. }
  203. std::string DescribeMultiZoneClusterResult::getCoreInstanceType()const
  204. {
  205. return coreInstanceType_;
  206. }
  207. std::string DescribeMultiZoneClusterResult::getClusterName()const
  208. {
  209. return clusterName_;
  210. }
  211. std::string DescribeMultiZoneClusterResult::getMasterDiskType()const
  212. {
  213. return masterDiskType_;
  214. }
  215. std::vector<DescribeMultiZoneClusterResult::Tag> DescribeMultiZoneClusterResult::getTags()const
  216. {
  217. return tags_;
  218. }
  219. std::string DescribeMultiZoneClusterResult::getEngine()const
  220. {
  221. return engine_;
  222. }
  223. std::string DescribeMultiZoneClusterResult::getMaintainStartTime()const
  224. {
  225. return maintainStartTime_;
  226. }
  227. std::string DescribeMultiZoneClusterResult::getArbiterZoneId()const
  228. {
  229. return arbiterZoneId_;
  230. }
  231. std::string DescribeMultiZoneClusterResult::getMajorVersion()const
  232. {
  233. return majorVersion_;
  234. }
  235. std::string DescribeMultiZoneClusterResult::getCoreDiskCount()const
  236. {
  237. return coreDiskCount_;
  238. }
  239. std::string DescribeMultiZoneClusterResult::getParentId()const
  240. {
  241. return parentId_;
  242. }
  243. std::string DescribeMultiZoneClusterResult::getStatus()const
  244. {
  245. return status_;
  246. }
  247. std::vector<DescribeMultiZoneClusterResult::MultiZoneInstanceModel> DescribeMultiZoneClusterResult::getMultiZoneInstanceModels()const
  248. {
  249. return multiZoneInstanceModels_;
  250. }
  251. std::string DescribeMultiZoneClusterResult::getExpireTimeUTC()const
  252. {
  253. return expireTimeUTC_;
  254. }
  255. int DescribeMultiZoneClusterResult::getMasterDiskSize()const
  256. {
  257. return masterDiskSize_;
  258. }
  259. std::string DescribeMultiZoneClusterResult::getPrimaryZoneId()const
  260. {
  261. return primaryZoneId_;
  262. }
  263. std::string DescribeMultiZoneClusterResult::getMultiZoneCombination()const
  264. {
  265. return multiZoneCombination_;
  266. }
  267. std::string DescribeMultiZoneClusterResult::getClusterId()const
  268. {
  269. return clusterId_;
  270. }
  271. std::string DescribeMultiZoneClusterResult::getInstanceId()const
  272. {
  273. return instanceId_;
  274. }
  275. int DescribeMultiZoneClusterResult::getCoreNodeCount()const
  276. {
  277. return coreNodeCount_;
  278. }
  279. std::string DescribeMultiZoneClusterResult::getCreatedTimeUTC()const
  280. {
  281. return createdTimeUTC_;
  282. }
  283. int DescribeMultiZoneClusterResult::getDuration()const
  284. {
  285. return duration_;
  286. }
  287. std::string DescribeMultiZoneClusterResult::getLogInstanceType()const
  288. {
  289. return logInstanceType_;
  290. }
  291. std::string DescribeMultiZoneClusterResult::getPayType()const
  292. {
  293. return payType_;
  294. }
  295. std::string DescribeMultiZoneClusterResult::getInstanceName()const
  296. {
  297. return instanceName_;
  298. }
  299. int DescribeMultiZoneClusterResult::getMasterNodeCount()const
  300. {
  301. return masterNodeCount_;
  302. }
  303. bool DescribeMultiZoneClusterResult::getAutoRenewal()const
  304. {
  305. return autoRenewal_;
  306. }
  307. std::string DescribeMultiZoneClusterResult::getVpcId()const
  308. {
  309. return vpcId_;
  310. }
  311. std::string DescribeMultiZoneClusterResult::getCoreDiskType()const
  312. {
  313. return coreDiskType_;
  314. }
  315. int DescribeMultiZoneClusterResult::getLogNodeCount()const
  316. {
  317. return logNodeCount_;
  318. }
  319. std::string DescribeMultiZoneClusterResult::getLogDiskType()const
  320. {
  321. return logDiskType_;
  322. }
  323. std::string DescribeMultiZoneClusterResult::getRegionId()const
  324. {
  325. return regionId_;
  326. }
  327. std::string DescribeMultiZoneClusterResult::getExpireTime()const
  328. {
  329. return expireTime_;
  330. }
  331. int DescribeMultiZoneClusterResult::getCoreDiskSize()const
  332. {
  333. return coreDiskSize_;
  334. }