DescribeLimitationResult.cc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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/ess/model/DescribeLimitationResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::Ess;
  19. using namespace AlibabaCloud::Ess::Model;
  20. DescribeLimitationResult::DescribeLimitationResult() :
  21. ServiceResult()
  22. {}
  23. DescribeLimitationResult::DescribeLimitationResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. DescribeLimitationResult::~DescribeLimitationResult()
  29. {}
  30. void DescribeLimitationResult::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. if(!value["MaxNumberOfScalingGroups"].isNull())
  37. maxNumberOfScalingGroups_ = std::stoi(value["MaxNumberOfScalingGroups"].asString());
  38. if(!value["MaxNumberOfScalingConfigurations"].isNull())
  39. maxNumberOfScalingConfigurations_ = std::stoi(value["MaxNumberOfScalingConfigurations"].asString());
  40. if(!value["MaxNumberOfScalingRules"].isNull())
  41. maxNumberOfScalingRules_ = std::stoi(value["MaxNumberOfScalingRules"].asString());
  42. if(!value["MaxNumberOfScheduledTasks"].isNull())
  43. maxNumberOfScheduledTasks_ = std::stoi(value["MaxNumberOfScheduledTasks"].asString());
  44. if(!value["MaxNumberOfScalingInstances"].isNull())
  45. maxNumberOfScalingInstances_ = std::stoi(value["MaxNumberOfScalingInstances"].asString());
  46. if(!value["MaxNumberOfDBInstances"].isNull())
  47. maxNumberOfDBInstances_ = std::stoi(value["MaxNumberOfDBInstances"].asString());
  48. if(!value["MaxNumberOfLoadBalancers"].isNull())
  49. maxNumberOfLoadBalancers_ = std::stoi(value["MaxNumberOfLoadBalancers"].asString());
  50. if(!value["MaxNumberOfMinSize"].isNull())
  51. maxNumberOfMinSize_ = std::stoi(value["MaxNumberOfMinSize"].asString());
  52. if(!value["MaxNumberOfMaxSize"].isNull())
  53. maxNumberOfMaxSize_ = std::stoi(value["MaxNumberOfMaxSize"].asString());
  54. if(!value["MaxNumberOfVServerGroups"].isNull())
  55. maxNumberOfVServerGroups_ = std::stoi(value["MaxNumberOfVServerGroups"].asString());
  56. if(!value["MaxNumberOfLifecycleHooks"].isNull())
  57. maxNumberOfLifecycleHooks_ = std::stoi(value["MaxNumberOfLifecycleHooks"].asString());
  58. if(!value["MaxNumberOfNotificationConfigurations"].isNull())
  59. maxNumberOfNotificationConfigurations_ = std::stoi(value["MaxNumberOfNotificationConfigurations"].asString());
  60. }
  61. int DescribeLimitationResult::getMaxNumberOfLifecycleHooks()const
  62. {
  63. return maxNumberOfLifecycleHooks_;
  64. }
  65. int DescribeLimitationResult::getMaxNumberOfScalingRules()const
  66. {
  67. return maxNumberOfScalingRules_;
  68. }
  69. int DescribeLimitationResult::getMaxNumberOfScalingInstances()const
  70. {
  71. return maxNumberOfScalingInstances_;
  72. }
  73. int DescribeLimitationResult::getMaxNumberOfScheduledTasks()const
  74. {
  75. return maxNumberOfScheduledTasks_;
  76. }
  77. int DescribeLimitationResult::getMaxNumberOfVServerGroups()const
  78. {
  79. return maxNumberOfVServerGroups_;
  80. }
  81. int DescribeLimitationResult::getMaxNumberOfLoadBalancers()const
  82. {
  83. return maxNumberOfLoadBalancers_;
  84. }
  85. int DescribeLimitationResult::getMaxNumberOfMinSize()const
  86. {
  87. return maxNumberOfMinSize_;
  88. }
  89. int DescribeLimitationResult::getMaxNumberOfScalingGroups()const
  90. {
  91. return maxNumberOfScalingGroups_;
  92. }
  93. int DescribeLimitationResult::getMaxNumberOfNotificationConfigurations()const
  94. {
  95. return maxNumberOfNotificationConfigurations_;
  96. }
  97. int DescribeLimitationResult::getMaxNumberOfScalingConfigurations()const
  98. {
  99. return maxNumberOfScalingConfigurations_;
  100. }
  101. int DescribeLimitationResult::getMaxNumberOfDBInstances()const
  102. {
  103. return maxNumberOfDBInstances_;
  104. }
  105. int DescribeLimitationResult::getMaxNumberOfMaxSize()const
  106. {
  107. return maxNumberOfMaxSize_;
  108. }