OperateBatchDomainRequest.cc 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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/OperateBatchDomainRequest.h>
  17. using AlibabaCloud::Alidns::Model::OperateBatchDomainRequest;
  18. OperateBatchDomainRequest::OperateBatchDomainRequest() :
  19. RpcServiceRequest("alidns", "2015-01-09", "OperateBatchDomain")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. OperateBatchDomainRequest::~OperateBatchDomainRequest()
  24. {}
  25. std::vector<OperateBatchDomainRequest::DomainRecordInfo> OperateBatchDomainRequest::getDomainRecordInfo()const
  26. {
  27. return domainRecordInfo_;
  28. }
  29. void OperateBatchDomainRequest::setDomainRecordInfo(const std::vector<DomainRecordInfo>& domainRecordInfo)
  30. {
  31. domainRecordInfo_ = domainRecordInfo;
  32. for(int dep1 = 0; dep1!= domainRecordInfo.size(); dep1++) {
  33. auto domainRecordInfoObj = domainRecordInfo.at(dep1);
  34. std::string domainRecordInfoObjStr = "DomainRecordInfo." + std::to_string(dep1 + 1);
  35. setParameter(domainRecordInfoObjStr + ".Rr", domainRecordInfoObj.rr);
  36. setParameter(domainRecordInfoObjStr + ".NewType", domainRecordInfoObj.newType);
  37. setParameter(domainRecordInfoObjStr + ".NewValue", domainRecordInfoObj.newValue);
  38. setParameter(domainRecordInfoObjStr + ".Line", domainRecordInfoObj.line);
  39. setParameter(domainRecordInfoObjStr + ".Domain", domainRecordInfoObj.domain);
  40. setParameter(domainRecordInfoObjStr + ".Type", domainRecordInfoObj.type);
  41. setParameter(domainRecordInfoObjStr + ".Priority", std::to_string(domainRecordInfoObj.priority));
  42. setParameter(domainRecordInfoObjStr + ".Value", domainRecordInfoObj.value);
  43. setParameter(domainRecordInfoObjStr + ".Ttl", std::to_string(domainRecordInfoObj.ttl));
  44. setParameter(domainRecordInfoObjStr + ".NewRr", domainRecordInfoObj.newRr);
  45. }
  46. }
  47. std::string OperateBatchDomainRequest::getType()const
  48. {
  49. return type_;
  50. }
  51. void OperateBatchDomainRequest::setType(const std::string& type)
  52. {
  53. type_ = type;
  54. setParameter("Type", type);
  55. }
  56. std::string OperateBatchDomainRequest::getUserClientIp()const
  57. {
  58. return userClientIp_;
  59. }
  60. void OperateBatchDomainRequest::setUserClientIp(const std::string& userClientIp)
  61. {
  62. userClientIp_ = userClientIp;
  63. setParameter("UserClientIp", userClientIp);
  64. }
  65. std::string OperateBatchDomainRequest::getLang()const
  66. {
  67. return lang_;
  68. }
  69. void OperateBatchDomainRequest::setLang(const std::string& lang)
  70. {
  71. lang_ = lang;
  72. setParameter("Lang", lang);
  73. }