CreateIpControlRequest.cc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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/cloudapi/model/CreateIpControlRequest.h>
  17. using AlibabaCloud::CloudAPI::Model::CreateIpControlRequest;
  18. CreateIpControlRequest::CreateIpControlRequest() :
  19. RpcServiceRequest("cloudapi", "2016-07-14", "CreateIpControl")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateIpControlRequest::~CreateIpControlRequest()
  24. {}
  25. std::string CreateIpControlRequest::getIpControlName()const
  26. {
  27. return ipControlName_;
  28. }
  29. void CreateIpControlRequest::setIpControlName(const std::string& ipControlName)
  30. {
  31. ipControlName_ = ipControlName;
  32. setParameter("IpControlName", ipControlName);
  33. }
  34. std::vector<CreateIpControlRequest::IpControlPolicys> CreateIpControlRequest::getIpControlPolicys()const
  35. {
  36. return ipControlPolicys_;
  37. }
  38. void CreateIpControlRequest::setIpControlPolicys(const std::vector<IpControlPolicys>& ipControlPolicys)
  39. {
  40. ipControlPolicys_ = ipControlPolicys;
  41. for(int dep1 = 0; dep1!= ipControlPolicys.size(); dep1++) {
  42. auto ipControlPolicysObj = ipControlPolicys.at(dep1);
  43. std::string ipControlPolicysObjStr = "IpControlPolicys." + std::to_string(dep1 + 1);
  44. setParameter(ipControlPolicysObjStr + ".AppId", ipControlPolicysObj.appId);
  45. setParameter(ipControlPolicysObjStr + ".CidrIp", ipControlPolicysObj.cidrIp);
  46. }
  47. }
  48. std::string CreateIpControlRequest::getDescription()const
  49. {
  50. return description_;
  51. }
  52. void CreateIpControlRequest::setDescription(const std::string& description)
  53. {
  54. description_ = description;
  55. setParameter("Description", description);
  56. }
  57. std::string CreateIpControlRequest::getAccessKeyId()const
  58. {
  59. return accessKeyId_;
  60. }
  61. void CreateIpControlRequest::setAccessKeyId(const std::string& accessKeyId)
  62. {
  63. accessKeyId_ = accessKeyId;
  64. setParameter("AccessKeyId", accessKeyId);
  65. }
  66. std::string CreateIpControlRequest::getSecurityToken()const
  67. {
  68. return securityToken_;
  69. }
  70. void CreateIpControlRequest::setSecurityToken(const std::string& securityToken)
  71. {
  72. securityToken_ = securityToken;
  73. setParameter("SecurityToken", securityToken);
  74. }
  75. std::string CreateIpControlRequest::getIpControlType()const
  76. {
  77. return ipControlType_;
  78. }
  79. void CreateIpControlRequest::setIpControlType(const std::string& ipControlType)
  80. {
  81. ipControlType_ = ipControlType;
  82. setParameter("IpControlType", ipControlType);
  83. }