AddGtmAddressPoolRequest.cc 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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/alidns/model/AddGtmAddressPoolRequest.h>
  17. using AlibabaCloud::Alidns::Model::AddGtmAddressPoolRequest;
  18. AddGtmAddressPoolRequest::AddGtmAddressPoolRequest() :
  19. RpcServiceRequest("alidns", "2015-01-09", "AddGtmAddressPool")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. AddGtmAddressPoolRequest::~AddGtmAddressPoolRequest()
  24. {}
  25. std::string AddGtmAddressPoolRequest::getMonitorExtendInfo()const
  26. {
  27. return monitorExtendInfo_;
  28. }
  29. void AddGtmAddressPoolRequest::setMonitorExtendInfo(const std::string& monitorExtendInfo)
  30. {
  31. monitorExtendInfo_ = monitorExtendInfo;
  32. setParameter("MonitorExtendInfo", monitorExtendInfo);
  33. }
  34. std::string AddGtmAddressPoolRequest::getType()const
  35. {
  36. return type_;
  37. }
  38. void AddGtmAddressPoolRequest::setType(const std::string& type)
  39. {
  40. type_ = type;
  41. setParameter("Type", type);
  42. }
  43. int AddGtmAddressPoolRequest::getTimeout()const
  44. {
  45. return timeout_;
  46. }
  47. void AddGtmAddressPoolRequest::setTimeout(int timeout)
  48. {
  49. timeout_ = timeout;
  50. setParameter("Timeout", std::to_string(timeout));
  51. }
  52. int AddGtmAddressPoolRequest::getMinAvailableAddrNum()const
  53. {
  54. return minAvailableAddrNum_;
  55. }
  56. void AddGtmAddressPoolRequest::setMinAvailableAddrNum(int minAvailableAddrNum)
  57. {
  58. minAvailableAddrNum_ = minAvailableAddrNum;
  59. setParameter("MinAvailableAddrNum", std::to_string(minAvailableAddrNum));
  60. }
  61. int AddGtmAddressPoolRequest::getEvaluationCount()const
  62. {
  63. return evaluationCount_;
  64. }
  65. void AddGtmAddressPoolRequest::setEvaluationCount(int evaluationCount)
  66. {
  67. evaluationCount_ = evaluationCount;
  68. setParameter("EvaluationCount", std::to_string(evaluationCount));
  69. }
  70. std::string AddGtmAddressPoolRequest::getLang()const
  71. {
  72. return lang_;
  73. }
  74. void AddGtmAddressPoolRequest::setLang(const std::string& lang)
  75. {
  76. lang_ = lang;
  77. setParameter("Lang", lang);
  78. }
  79. std::vector<AddGtmAddressPoolRequest::Addr> AddGtmAddressPoolRequest::getAddr()const
  80. {
  81. return addr_;
  82. }
  83. void AddGtmAddressPoolRequest::setAddr(const std::vector<Addr>& addr)
  84. {
  85. addr_ = addr;
  86. for(int dep1 = 0; dep1!= addr.size(); dep1++) {
  87. auto addrObj = addr.at(dep1);
  88. std::string addrObjStr = "Addr." + std::to_string(dep1 + 1);
  89. setParameter(addrObjStr + ".Mode", addrObj.mode);
  90. setParameter(addrObjStr + ".LbaWeight", std::to_string(addrObj.lbaWeight));
  91. setParameter(addrObjStr + ".Value", addrObj.value);
  92. }
  93. }
  94. std::string AddGtmAddressPoolRequest::getMonitorStatus()const
  95. {
  96. return monitorStatus_;
  97. }
  98. void AddGtmAddressPoolRequest::setMonitorStatus(const std::string& monitorStatus)
  99. {
  100. monitorStatus_ = monitorStatus;
  101. setParameter("MonitorStatus", monitorStatus);
  102. }
  103. std::string AddGtmAddressPoolRequest::getInstanceId()const
  104. {
  105. return instanceId_;
  106. }
  107. void AddGtmAddressPoolRequest::setInstanceId(const std::string& instanceId)
  108. {
  109. instanceId_ = instanceId;
  110. setParameter("InstanceId", instanceId);
  111. }
  112. std::string AddGtmAddressPoolRequest::getUserClientIp()const
  113. {
  114. return userClientIp_;
  115. }
  116. void AddGtmAddressPoolRequest::setUserClientIp(const std::string& userClientIp)
  117. {
  118. userClientIp_ = userClientIp;
  119. setParameter("UserClientIp", userClientIp);
  120. }
  121. std::string AddGtmAddressPoolRequest::getName()const
  122. {
  123. return name_;
  124. }
  125. void AddGtmAddressPoolRequest::setName(const std::string& name)
  126. {
  127. name_ = name;
  128. setParameter("Name", name);
  129. }
  130. std::string AddGtmAddressPoolRequest::getProtocolType()const
  131. {
  132. return protocolType_;
  133. }
  134. void AddGtmAddressPoolRequest::setProtocolType(const std::string& protocolType)
  135. {
  136. protocolType_ = protocolType;
  137. setParameter("ProtocolType", protocolType);
  138. }
  139. int AddGtmAddressPoolRequest::getInterval()const
  140. {
  141. return interval_;
  142. }
  143. void AddGtmAddressPoolRequest::setInterval(int interval)
  144. {
  145. interval_ = interval;
  146. setParameter("Interval", std::to_string(interval));
  147. }
  148. std::vector<AddGtmAddressPoolRequest::IspCityNode> AddGtmAddressPoolRequest::getIspCityNode()const
  149. {
  150. return ispCityNode_;
  151. }
  152. void AddGtmAddressPoolRequest::setIspCityNode(const std::vector<IspCityNode>& ispCityNode)
  153. {
  154. ispCityNode_ = ispCityNode;
  155. for(int dep1 = 0; dep1!= ispCityNode.size(); dep1++) {
  156. auto ispCityNodeObj = ispCityNode.at(dep1);
  157. std::string ispCityNodeObjStr = "IspCityNode." + std::to_string(dep1 + 1);
  158. setParameter(ispCityNodeObjStr + ".CityCode", ispCityNodeObj.cityCode);
  159. setParameter(ispCityNodeObjStr + ".IspCode", ispCityNodeObj.ispCode);
  160. }
  161. }