DescribeScdnServiceResult.cc 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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/scdn/model/DescribeScdnServiceResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::Scdn;
  19. using namespace AlibabaCloud::Scdn::Model;
  20. DescribeScdnServiceResult::DescribeScdnServiceResult() :
  21. ServiceResult()
  22. {}
  23. DescribeScdnServiceResult::DescribeScdnServiceResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. DescribeScdnServiceResult::~DescribeScdnServiceResult()
  29. {}
  30. void DescribeScdnServiceResult::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 allOperationLocksNode = value["OperationLocks"]["LockReason"];
  37. for (auto valueOperationLocksLockReason : allOperationLocksNode)
  38. {
  39. LockReason operationLocksObject;
  40. if(!valueOperationLocksLockReason["LockReason"].isNull())
  41. operationLocksObject.lockReason = valueOperationLocksLockReason["LockReason"].asString();
  42. operationLocks_.push_back(operationLocksObject);
  43. }
  44. if(!value["ChangingAffectTime"].isNull())
  45. changingAffectTime_ = value["ChangingAffectTime"].asString();
  46. if(!value["InternetChargeType"].isNull())
  47. internetChargeType_ = value["InternetChargeType"].asString();
  48. if(!value["ChangingChargeType"].isNull())
  49. changingChargeType_ = value["ChangingChargeType"].asString();
  50. if(!value["InstanceId"].isNull())
  51. instanceId_ = value["InstanceId"].asString();
  52. if(!value["OpenTime"].isNull())
  53. openTime_ = value["OpenTime"].asString();
  54. if(!value["EndTime"].isNull())
  55. endTime_ = value["EndTime"].asString();
  56. if(!value["ProtectType"].isNull())
  57. protectType_ = value["ProtectType"].asString();
  58. if(!value["ProtectTypeValue"].isNull())
  59. protectTypeValue_ = value["ProtectTypeValue"].asString();
  60. if(!value["Bandwidth"].isNull())
  61. bandwidth_ = value["Bandwidth"].asString();
  62. if(!value["CcProtection"].isNull())
  63. ccProtection_ = value["CcProtection"].asString();
  64. if(!value["DDoSBasic"].isNull())
  65. dDoSBasic_ = value["DDoSBasic"].asString();
  66. if(!value["DomainCount"].isNull())
  67. domainCount_ = value["DomainCount"].asString();
  68. if(!value["ElasticProtection"].isNull())
  69. elasticProtection_ = value["ElasticProtection"].asString();
  70. if(!value["BandwidthValue"].isNull())
  71. bandwidthValue_ = value["BandwidthValue"].asString();
  72. if(!value["CcProtectionValue"].isNull())
  73. ccProtectionValue_ = value["CcProtectionValue"].asString();
  74. if(!value["DDoSBasicValue"].isNull())
  75. dDoSBasicValue_ = value["DDoSBasicValue"].asString();
  76. if(!value["DomainCountValue"].isNull())
  77. domainCountValue_ = value["DomainCountValue"].asString();
  78. if(!value["ElasticProtectionValue"].isNull())
  79. elasticProtectionValue_ = value["ElasticProtectionValue"].asString();
  80. if(!value["CurrentProtectType"].isNull())
  81. currentProtectType_ = value["CurrentProtectType"].asString();
  82. if(!value["CurrentProtectTypeValue"].isNull())
  83. currentProtectTypeValue_ = value["CurrentProtectTypeValue"].asString();
  84. if(!value["CurrentBandwidth"].isNull())
  85. currentBandwidth_ = value["CurrentBandwidth"].asString();
  86. if(!value["CurrentCcProtection"].isNull())
  87. currentCcProtection_ = value["CurrentCcProtection"].asString();
  88. if(!value["CurrentDDoSBasic"].isNull())
  89. currentDDoSBasic_ = value["CurrentDDoSBasic"].asString();
  90. if(!value["CurrentDomainCount"].isNull())
  91. currentDomainCount_ = value["CurrentDomainCount"].asString();
  92. if(!value["CurrentElasticProtection"].isNull())
  93. currentElasticProtection_ = value["CurrentElasticProtection"].asString();
  94. if(!value["CurrentBandwidthValue"].isNull())
  95. currentBandwidthValue_ = value["CurrentBandwidthValue"].asString();
  96. if(!value["CurrentCcProtectionValue"].isNull())
  97. currentCcProtectionValue_ = value["CurrentCcProtectionValue"].asString();
  98. if(!value["CurrentDDoSBasicValue"].isNull())
  99. currentDDoSBasicValue_ = value["CurrentDDoSBasicValue"].asString();
  100. if(!value["CurrentDomainCountValue"].isNull())
  101. currentDomainCountValue_ = value["CurrentDomainCountValue"].asString();
  102. if(!value["CurrentElasticProtectionValue"].isNull())
  103. currentElasticProtectionValue_ = value["CurrentElasticProtectionValue"].asString();
  104. if(!value["PriceType"].isNull())
  105. priceType_ = value["PriceType"].asString();
  106. if(!value["PricingCycle"].isNull())
  107. pricingCycle_ = value["PricingCycle"].asString();
  108. }
  109. std::string DescribeScdnServiceResult::getCurrentDDoSBasicValue()const
  110. {
  111. return currentDDoSBasicValue_;
  112. }
  113. std::string DescribeScdnServiceResult::getEndTime()const
  114. {
  115. return endTime_;
  116. }
  117. std::string DescribeScdnServiceResult::getCurrentElasticProtectionValue()const
  118. {
  119. return currentElasticProtectionValue_;
  120. }
  121. std::string DescribeScdnServiceResult::getPricingCycle()const
  122. {
  123. return pricingCycle_;
  124. }
  125. std::string DescribeScdnServiceResult::getElasticProtection()const
  126. {
  127. return elasticProtection_;
  128. }
  129. std::string DescribeScdnServiceResult::getDDoSBasic()const
  130. {
  131. return dDoSBasic_;
  132. }
  133. std::string DescribeScdnServiceResult::getDomainCountValue()const
  134. {
  135. return domainCountValue_;
  136. }
  137. std::string DescribeScdnServiceResult::getCurrentDomainCount()const
  138. {
  139. return currentDomainCount_;
  140. }
  141. std::string DescribeScdnServiceResult::getCcProtectionValue()const
  142. {
  143. return ccProtectionValue_;
  144. }
  145. std::string DescribeScdnServiceResult::getElasticProtectionValue()const
  146. {
  147. return elasticProtectionValue_;
  148. }
  149. std::string DescribeScdnServiceResult::getOpenTime()const
  150. {
  151. return openTime_;
  152. }
  153. std::string DescribeScdnServiceResult::getChangingChargeType()const
  154. {
  155. return changingChargeType_;
  156. }
  157. std::string DescribeScdnServiceResult::getBandwidth()const
  158. {
  159. return bandwidth_;
  160. }
  161. std::string DescribeScdnServiceResult::getDomainCount()const
  162. {
  163. return domainCount_;
  164. }
  165. std::string DescribeScdnServiceResult::getCurrentBandwidth()const
  166. {
  167. return currentBandwidth_;
  168. }
  169. std::string DescribeScdnServiceResult::getCurrentElasticProtection()const
  170. {
  171. return currentElasticProtection_;
  172. }
  173. std::string DescribeScdnServiceResult::getInstanceId()const
  174. {
  175. return instanceId_;
  176. }
  177. std::string DescribeScdnServiceResult::getCurrentCcProtectionValue()const
  178. {
  179. return currentCcProtectionValue_;
  180. }
  181. std::string DescribeScdnServiceResult::getCurrentProtectType()const
  182. {
  183. return currentProtectType_;
  184. }
  185. std::string DescribeScdnServiceResult::getCurrentDDoSBasic()const
  186. {
  187. return currentDDoSBasic_;
  188. }
  189. std::string DescribeScdnServiceResult::getCurrentDomainCountValue()const
  190. {
  191. return currentDomainCountValue_;
  192. }
  193. std::string DescribeScdnServiceResult::getCurrentBandwidthValue()const
  194. {
  195. return currentBandwidthValue_;
  196. }
  197. std::string DescribeScdnServiceResult::getProtectTypeValue()const
  198. {
  199. return protectTypeValue_;
  200. }
  201. std::string DescribeScdnServiceResult::getCurrentProtectTypeValue()const
  202. {
  203. return currentProtectTypeValue_;
  204. }
  205. std::string DescribeScdnServiceResult::getCcProtection()const
  206. {
  207. return ccProtection_;
  208. }
  209. std::vector<DescribeScdnServiceResult::LockReason> DescribeScdnServiceResult::getOperationLocks()const
  210. {
  211. return operationLocks_;
  212. }
  213. std::string DescribeScdnServiceResult::getChangingAffectTime()const
  214. {
  215. return changingAffectTime_;
  216. }
  217. std::string DescribeScdnServiceResult::getInternetChargeType()const
  218. {
  219. return internetChargeType_;
  220. }
  221. std::string DescribeScdnServiceResult::getDDoSBasicValue()const
  222. {
  223. return dDoSBasicValue_;
  224. }
  225. std::string DescribeScdnServiceResult::getProtectType()const
  226. {
  227. return protectType_;
  228. }
  229. std::string DescribeScdnServiceResult::getCurrentCcProtection()const
  230. {
  231. return currentCcProtection_;
  232. }
  233. std::string DescribeScdnServiceResult::getBandwidthValue()const
  234. {
  235. return bandwidthValue_;
  236. }
  237. std::string DescribeScdnServiceResult::getPriceType()const
  238. {
  239. return priceType_;
  240. }