CreateRouteEntryRequest.cc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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/ecs/model/CreateRouteEntryRequest.h>
  17. using AlibabaCloud::Ecs::Model::CreateRouteEntryRequest;
  18. CreateRouteEntryRequest::CreateRouteEntryRequest() :
  19. RpcServiceRequest("ecs", "2014-05-26", "CreateRouteEntry")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateRouteEntryRequest::~CreateRouteEntryRequest()
  24. {}
  25. long CreateRouteEntryRequest::getResourceOwnerId()const
  26. {
  27. return resourceOwnerId_;
  28. }
  29. void CreateRouteEntryRequest::setResourceOwnerId(long resourceOwnerId)
  30. {
  31. resourceOwnerId_ = resourceOwnerId;
  32. setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  33. }
  34. std::string CreateRouteEntryRequest::getClientToken()const
  35. {
  36. return clientToken_;
  37. }
  38. void CreateRouteEntryRequest::setClientToken(const std::string& clientToken)
  39. {
  40. clientToken_ = clientToken;
  41. setParameter("ClientToken", clientToken);
  42. }
  43. std::string CreateRouteEntryRequest::getRegionId()const
  44. {
  45. return regionId_;
  46. }
  47. void CreateRouteEntryRequest::setRegionId(const std::string& regionId)
  48. {
  49. regionId_ = regionId;
  50. setParameter("RegionId", regionId);
  51. }
  52. std::string CreateRouteEntryRequest::getNextHopId()const
  53. {
  54. return nextHopId_;
  55. }
  56. void CreateRouteEntryRequest::setNextHopId(const std::string& nextHopId)
  57. {
  58. nextHopId_ = nextHopId;
  59. setParameter("NextHopId", nextHopId);
  60. }
  61. std::string CreateRouteEntryRequest::getNextHopType()const
  62. {
  63. return nextHopType_;
  64. }
  65. void CreateRouteEntryRequest::setNextHopType(const std::string& nextHopType)
  66. {
  67. nextHopType_ = nextHopType;
  68. setParameter("NextHopType", nextHopType);
  69. }
  70. std::string CreateRouteEntryRequest::getRouteTableId()const
  71. {
  72. return routeTableId_;
  73. }
  74. void CreateRouteEntryRequest::setRouteTableId(const std::string& routeTableId)
  75. {
  76. routeTableId_ = routeTableId;
  77. setParameter("RouteTableId", routeTableId);
  78. }
  79. std::string CreateRouteEntryRequest::getResourceOwnerAccount()const
  80. {
  81. return resourceOwnerAccount_;
  82. }
  83. void CreateRouteEntryRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
  84. {
  85. resourceOwnerAccount_ = resourceOwnerAccount;
  86. setParameter("ResourceOwnerAccount", resourceOwnerAccount);
  87. }
  88. std::string CreateRouteEntryRequest::getDestinationCidrBlock()const
  89. {
  90. return destinationCidrBlock_;
  91. }
  92. void CreateRouteEntryRequest::setDestinationCidrBlock(const std::string& destinationCidrBlock)
  93. {
  94. destinationCidrBlock_ = destinationCidrBlock;
  95. setParameter("DestinationCidrBlock", destinationCidrBlock);
  96. }
  97. std::string CreateRouteEntryRequest::getOwnerAccount()const
  98. {
  99. return ownerAccount_;
  100. }
  101. void CreateRouteEntryRequest::setOwnerAccount(const std::string& ownerAccount)
  102. {
  103. ownerAccount_ = ownerAccount;
  104. setParameter("OwnerAccount", ownerAccount);
  105. }
  106. long CreateRouteEntryRequest::getOwnerId()const
  107. {
  108. return ownerId_;
  109. }
  110. void CreateRouteEntryRequest::setOwnerId(long ownerId)
  111. {
  112. ownerId_ = ownerId;
  113. setParameter("OwnerId", std::to_string(ownerId));
  114. }
  115. std::vector<CreateRouteEntryRequest::NextHopList> CreateRouteEntryRequest::getNextHopList()const
  116. {
  117. return nextHopList_;
  118. }
  119. void CreateRouteEntryRequest::setNextHopList(const std::vector<NextHopList>& nextHopList)
  120. {
  121. nextHopList_ = nextHopList;
  122. for(int dep1 = 0; dep1!= nextHopList.size(); dep1++) {
  123. auto nextHopListObj = nextHopList.at(dep1);
  124. std::string nextHopListObjStr = "NextHopList." + std::to_string(dep1 + 1);
  125. setParameter(nextHopListObjStr + ".NextHopId", nextHopListObj.nextHopId);
  126. setParameter(nextHopListObjStr + ".NextHopType", nextHopListObj.nextHopType);
  127. }
  128. }