AddCustomLineRequest.cc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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/AddCustomLineRequest.h>
  17. using AlibabaCloud::Alidns::Model::AddCustomLineRequest;
  18. AddCustomLineRequest::AddCustomLineRequest() :
  19. RpcServiceRequest("alidns", "2015-01-09", "AddCustomLine")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. AddCustomLineRequest::~AddCustomLineRequest()
  24. {}
  25. std::string AddCustomLineRequest::getDomainName()const
  26. {
  27. return domainName_;
  28. }
  29. void AddCustomLineRequest::setDomainName(const std::string& domainName)
  30. {
  31. domainName_ = domainName;
  32. setParameter("DomainName", domainName);
  33. }
  34. std::vector<AddCustomLineRequest::IpSegment> AddCustomLineRequest::getIpSegment()const
  35. {
  36. return ipSegment_;
  37. }
  38. void AddCustomLineRequest::setIpSegment(const std::vector<IpSegment>& ipSegment)
  39. {
  40. ipSegment_ = ipSegment;
  41. for(int dep1 = 0; dep1!= ipSegment.size(); dep1++) {
  42. auto ipSegmentObj = ipSegment.at(dep1);
  43. std::string ipSegmentObjStr = "IpSegment." + std::to_string(dep1 + 1);
  44. setParameter(ipSegmentObjStr + ".EndIp", ipSegmentObj.endIp);
  45. setParameter(ipSegmentObjStr + ".StartIp", ipSegmentObj.startIp);
  46. }
  47. }
  48. std::string AddCustomLineRequest::getUserClientIp()const
  49. {
  50. return userClientIp_;
  51. }
  52. void AddCustomLineRequest::setUserClientIp(const std::string& userClientIp)
  53. {
  54. userClientIp_ = userClientIp;
  55. setParameter("UserClientIp", userClientIp);
  56. }
  57. std::string AddCustomLineRequest::getLineName()const
  58. {
  59. return lineName_;
  60. }
  61. void AddCustomLineRequest::setLineName(const std::string& lineName)
  62. {
  63. lineName_ = lineName;
  64. setParameter("LineName", lineName);
  65. }
  66. std::string AddCustomLineRequest::getLang()const
  67. {
  68. return lang_;
  69. }
  70. void AddCustomLineRequest::setLang(const std::string& lang)
  71. {
  72. lang_ = lang;
  73. setParameter("Lang", lang);
  74. }