SetAutoScaleConfigRequest.cc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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/ehpc/model/SetAutoScaleConfigRequest.h>
  17. using AlibabaCloud::EHPC::Model::SetAutoScaleConfigRequest;
  18. SetAutoScaleConfigRequest::SetAutoScaleConfigRequest()
  19. : RpcServiceRequest("ehpc", "2017-07-14", "SetAutoScaleConfig") {
  20. setMethod(HttpRequest::Method::Get);
  21. }
  22. SetAutoScaleConfigRequest::~SetAutoScaleConfigRequest() {}
  23. std::string SetAutoScaleConfigRequest::getAccessKeyId() const {
  24. return accessKeyId_;
  25. }
  26. void SetAutoScaleConfigRequest::setAccessKeyId(const std::string &accessKeyId) {
  27. accessKeyId_ = accessKeyId;
  28. setParameter(std::string("AccessKeyId"), accessKeyId);
  29. }
  30. std::string SetAutoScaleConfigRequest::getExcludeNodes() const {
  31. return excludeNodes_;
  32. }
  33. void SetAutoScaleConfigRequest::setExcludeNodes(const std::string &excludeNodes) {
  34. excludeNodes_ = excludeNodes;
  35. setParameter(std::string("ExcludeNodes"), excludeNodes);
  36. }
  37. int SetAutoScaleConfigRequest::getExtraNodesGrowRatio() const {
  38. return extraNodesGrowRatio_;
  39. }
  40. void SetAutoScaleConfigRequest::setExtraNodesGrowRatio(int extraNodesGrowRatio) {
  41. extraNodesGrowRatio_ = extraNodesGrowRatio;
  42. setParameter(std::string("ExtraNodesGrowRatio"), std::to_string(extraNodesGrowRatio));
  43. }
  44. int SetAutoScaleConfigRequest::getShrinkIdleTimes() const {
  45. return shrinkIdleTimes_;
  46. }
  47. void SetAutoScaleConfigRequest::setShrinkIdleTimes(int shrinkIdleTimes) {
  48. shrinkIdleTimes_ = shrinkIdleTimes;
  49. setParameter(std::string("ShrinkIdleTimes"), std::to_string(shrinkIdleTimes));
  50. }
  51. int SetAutoScaleConfigRequest::getGrowTimeoutInMinutes() const {
  52. return growTimeoutInMinutes_;
  53. }
  54. void SetAutoScaleConfigRequest::setGrowTimeoutInMinutes(int growTimeoutInMinutes) {
  55. growTimeoutInMinutes_ = growTimeoutInMinutes;
  56. setParameter(std::string("GrowTimeoutInMinutes"), std::to_string(growTimeoutInMinutes));
  57. }
  58. std::string SetAutoScaleConfigRequest::getClusterId() const {
  59. return clusterId_;
  60. }
  61. void SetAutoScaleConfigRequest::setClusterId(const std::string &clusterId) {
  62. clusterId_ = clusterId;
  63. setParameter(std::string("ClusterId"), clusterId);
  64. }
  65. bool SetAutoScaleConfigRequest::getEnableAutoGrow() const {
  66. return enableAutoGrow_;
  67. }
  68. void SetAutoScaleConfigRequest::setEnableAutoGrow(bool enableAutoGrow) {
  69. enableAutoGrow_ = enableAutoGrow;
  70. setParameter(std::string("EnableAutoGrow"), enableAutoGrow ? "true" : "false");
  71. }
  72. bool SetAutoScaleConfigRequest::getEnableAutoShrink() const {
  73. return enableAutoShrink_;
  74. }
  75. void SetAutoScaleConfigRequest::setEnableAutoShrink(bool enableAutoShrink) {
  76. enableAutoShrink_ = enableAutoShrink;
  77. setParameter(std::string("EnableAutoShrink"), enableAutoShrink ? "true" : "false");
  78. }
  79. int SetAutoScaleConfigRequest::getMaxNodesInCluster() const {
  80. return maxNodesInCluster_;
  81. }
  82. void SetAutoScaleConfigRequest::setMaxNodesInCluster(int maxNodesInCluster) {
  83. maxNodesInCluster_ = maxNodesInCluster;
  84. setParameter(std::string("MaxNodesInCluster"), std::to_string(maxNodesInCluster));
  85. }
  86. int SetAutoScaleConfigRequest::getShrinkIntervalInMinutes() const {
  87. return shrinkIntervalInMinutes_;
  88. }
  89. void SetAutoScaleConfigRequest::setShrinkIntervalInMinutes(int shrinkIntervalInMinutes) {
  90. shrinkIntervalInMinutes_ = shrinkIntervalInMinutes;
  91. setParameter(std::string("ShrinkIntervalInMinutes"), std::to_string(shrinkIntervalInMinutes));
  92. }
  93. int SetAutoScaleConfigRequest::getGrowIntervalInMinutes() const {
  94. return growIntervalInMinutes_;
  95. }
  96. void SetAutoScaleConfigRequest::setGrowIntervalInMinutes(int growIntervalInMinutes) {
  97. growIntervalInMinutes_ = growIntervalInMinutes;
  98. setParameter(std::string("GrowIntervalInMinutes"), std::to_string(growIntervalInMinutes));
  99. }
  100. int SetAutoScaleConfigRequest::getGrowRatio() const {
  101. return growRatio_;
  102. }
  103. void SetAutoScaleConfigRequest::setGrowRatio(int growRatio) {
  104. growRatio_ = growRatio;
  105. setParameter(std::string("GrowRatio"), std::to_string(growRatio));
  106. }