CreateNetworkInterfaceRequest.cc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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/CreateNetworkInterfaceRequest.h>
  17. using AlibabaCloud::Ecs::Model::CreateNetworkInterfaceRequest;
  18. CreateNetworkInterfaceRequest::CreateNetworkInterfaceRequest()
  19. : RpcServiceRequest("ecs", "2014-05-26", "CreateNetworkInterface") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreateNetworkInterfaceRequest::~CreateNetworkInterfaceRequest() {}
  23. int CreateNetworkInterfaceRequest::getQueueNumber() const {
  24. return queueNumber_;
  25. }
  26. void CreateNetworkInterfaceRequest::setQueueNumber(int queueNumber) {
  27. queueNumber_ = queueNumber;
  28. setParameter(std::string("QueueNumber"), std::to_string(queueNumber));
  29. }
  30. long CreateNetworkInterfaceRequest::getResourceOwnerId() const {
  31. return resourceOwnerId_;
  32. }
  33. void CreateNetworkInterfaceRequest::setResourceOwnerId(long resourceOwnerId) {
  34. resourceOwnerId_ = resourceOwnerId;
  35. setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
  36. }
  37. std::vector<std::string> CreateNetworkInterfaceRequest::getIpv4Prefix() const {
  38. return ipv4Prefix_;
  39. }
  40. void CreateNetworkInterfaceRequest::setIpv4Prefix(const std::vector<std::string> &ipv4Prefix) {
  41. ipv4Prefix_ = ipv4Prefix;
  42. }
  43. int CreateNetworkInterfaceRequest::getSecondaryPrivateIpAddressCount() const {
  44. return secondaryPrivateIpAddressCount_;
  45. }
  46. void CreateNetworkInterfaceRequest::setSecondaryPrivateIpAddressCount(int secondaryPrivateIpAddressCount) {
  47. secondaryPrivateIpAddressCount_ = secondaryPrivateIpAddressCount;
  48. setParameter(std::string("SecondaryPrivateIpAddressCount"), std::to_string(secondaryPrivateIpAddressCount));
  49. }
  50. std::string CreateNetworkInterfaceRequest::getBusinessType() const {
  51. return businessType_;
  52. }
  53. void CreateNetworkInterfaceRequest::setBusinessType(const std::string &businessType) {
  54. businessType_ = businessType;
  55. setParameter(std::string("BusinessType"), businessType);
  56. }
  57. std::string CreateNetworkInterfaceRequest::getResourceGroupId() const {
  58. return resourceGroupId_;
  59. }
  60. void CreateNetworkInterfaceRequest::setResourceGroupId(const std::string &resourceGroupId) {
  61. resourceGroupId_ = resourceGroupId;
  62. setParameter(std::string("ResourceGroupId"), resourceGroupId);
  63. }
  64. std::vector<CreateNetworkInterfaceRequest::Tag> CreateNetworkInterfaceRequest::getTag() const {
  65. return tag_;
  66. }
  67. void CreateNetworkInterfaceRequest::setTag(const std::vector<CreateNetworkInterfaceRequest::Tag> &tag) {
  68. tag_ = tag;
  69. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  70. auto tagObj = tag.at(dep1);
  71. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  72. setParameter(tagObjStr + ".Key", tagObj.key);
  73. setParameter(tagObjStr + ".Value", tagObj.value);
  74. }
  75. }
  76. std::string CreateNetworkInterfaceRequest::getNetworkInterfaceName() const {
  77. return networkInterfaceName_;
  78. }
  79. void CreateNetworkInterfaceRequest::setNetworkInterfaceName(const std::string &networkInterfaceName) {
  80. networkInterfaceName_ = networkInterfaceName;
  81. setParameter(std::string("NetworkInterfaceName"), networkInterfaceName);
  82. }
  83. bool CreateNetworkInterfaceRequest::getVisible() const {
  84. return visible_;
  85. }
  86. void CreateNetworkInterfaceRequest::setVisible(bool visible) {
  87. visible_ = visible;
  88. setParameter(std::string("Visible"), visible ? "true" : "false");
  89. }
  90. int CreateNetworkInterfaceRequest::getIpv6AddressCount() const {
  91. return ipv6AddressCount_;
  92. }
  93. void CreateNetworkInterfaceRequest::setIpv6AddressCount(int ipv6AddressCount) {
  94. ipv6AddressCount_ = ipv6AddressCount;
  95. setParameter(std::string("Ipv6AddressCount"), std::to_string(ipv6AddressCount));
  96. }
  97. int CreateNetworkInterfaceRequest::getRxQueueSize() const {
  98. return rxQueueSize_;
  99. }
  100. void CreateNetworkInterfaceRequest::setRxQueueSize(int rxQueueSize) {
  101. rxQueueSize_ = rxQueueSize;
  102. setParameter(std::string("RxQueueSize"), std::to_string(rxQueueSize));
  103. }
  104. long CreateNetworkInterfaceRequest::getOwnerId() const {
  105. return ownerId_;
  106. }
  107. void CreateNetworkInterfaceRequest::setOwnerId(long ownerId) {
  108. ownerId_ = ownerId;
  109. setParameter(std::string("OwnerId"), std::to_string(ownerId));
  110. }
  111. std::string CreateNetworkInterfaceRequest::getVSwitchId() const {
  112. return vSwitchId_;
  113. }
  114. void CreateNetworkInterfaceRequest::setVSwitchId(const std::string &vSwitchId) {
  115. vSwitchId_ = vSwitchId;
  116. setParameter(std::string("VSwitchId"), vSwitchId);
  117. }
  118. std::vector<std::string> CreateNetworkInterfaceRequest::getPrivateIpAddress() const {
  119. return privateIpAddress_;
  120. }
  121. void CreateNetworkInterfaceRequest::setPrivateIpAddress(const std::vector<std::string> &privateIpAddress) {
  122. privateIpAddress_ = privateIpAddress;
  123. }
  124. std::vector<std::string> CreateNetworkInterfaceRequest::getIpv6Address() const {
  125. return ipv6Address_;
  126. }
  127. void CreateNetworkInterfaceRequest::setIpv6Address(const std::vector<std::string> &ipv6Address) {
  128. ipv6Address_ = ipv6Address;
  129. }
  130. std::string CreateNetworkInterfaceRequest::getClientToken() const {
  131. return clientToken_;
  132. }
  133. void CreateNetworkInterfaceRequest::setClientToken(const std::string &clientToken) {
  134. clientToken_ = clientToken;
  135. setParameter(std::string("ClientToken"), clientToken);
  136. }
  137. std::vector<std::string> CreateNetworkInterfaceRequest::getIpv6Prefix() const {
  138. return ipv6Prefix_;
  139. }
  140. void CreateNetworkInterfaceRequest::setIpv6Prefix(const std::vector<std::string> &ipv6Prefix) {
  141. ipv6Prefix_ = ipv6Prefix;
  142. }
  143. std::string CreateNetworkInterfaceRequest::getSecurityGroupId() const {
  144. return securityGroupId_;
  145. }
  146. void CreateNetworkInterfaceRequest::setSecurityGroupId(const std::string &securityGroupId) {
  147. securityGroupId_ = securityGroupId;
  148. setParameter(std::string("SecurityGroupId"), securityGroupId);
  149. }
  150. std::string CreateNetworkInterfaceRequest::getDescription() const {
  151. return description_;
  152. }
  153. void CreateNetworkInterfaceRequest::setDescription(const std::string &description) {
  154. description_ = description;
  155. setParameter(std::string("Description"), description);
  156. }
  157. int CreateNetworkInterfaceRequest::getIpv6PrefixCount() const {
  158. return ipv6PrefixCount_;
  159. }
  160. void CreateNetworkInterfaceRequest::setIpv6PrefixCount(int ipv6PrefixCount) {
  161. ipv6PrefixCount_ = ipv6PrefixCount;
  162. setParameter(std::string("Ipv6PrefixCount"), std::to_string(ipv6PrefixCount));
  163. }
  164. std::string CreateNetworkInterfaceRequest::getRegionId() const {
  165. return regionId_;
  166. }
  167. void CreateNetworkInterfaceRequest::setRegionId(const std::string &regionId) {
  168. regionId_ = regionId;
  169. setParameter(std::string("RegionId"), regionId);
  170. }
  171. std::string CreateNetworkInterfaceRequest::getInstanceType() const {
  172. return instanceType_;
  173. }
  174. void CreateNetworkInterfaceRequest::setInstanceType(const std::string &instanceType) {
  175. instanceType_ = instanceType;
  176. setParameter(std::string("InstanceType"), instanceType);
  177. }
  178. int CreateNetworkInterfaceRequest::getTxQueueSize() const {
  179. return txQueueSize_;
  180. }
  181. void CreateNetworkInterfaceRequest::setTxQueueSize(int txQueueSize) {
  182. txQueueSize_ = txQueueSize;
  183. setParameter(std::string("TxQueueSize"), std::to_string(txQueueSize));
  184. }
  185. bool CreateNetworkInterfaceRequest::getDeleteOnRelease() const {
  186. return deleteOnRelease_;
  187. }
  188. void CreateNetworkInterfaceRequest::setDeleteOnRelease(bool deleteOnRelease) {
  189. deleteOnRelease_ = deleteOnRelease;
  190. setParameter(std::string("DeleteOnRelease"), deleteOnRelease ? "true" : "false");
  191. }
  192. std::string CreateNetworkInterfaceRequest::getResourceOwnerAccount() const {
  193. return resourceOwnerAccount_;
  194. }
  195. void CreateNetworkInterfaceRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
  196. resourceOwnerAccount_ = resourceOwnerAccount;
  197. setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
  198. }
  199. std::string CreateNetworkInterfaceRequest::getOwnerAccount() const {
  200. return ownerAccount_;
  201. }
  202. void CreateNetworkInterfaceRequest::setOwnerAccount(const std::string &ownerAccount) {
  203. ownerAccount_ = ownerAccount;
  204. setParameter(std::string("OwnerAccount"), ownerAccount);
  205. }
  206. int CreateNetworkInterfaceRequest::getQueuePairNumber() const {
  207. return queuePairNumber_;
  208. }
  209. void CreateNetworkInterfaceRequest::setQueuePairNumber(int queuePairNumber) {
  210. queuePairNumber_ = queuePairNumber;
  211. setParameter(std::string("QueuePairNumber"), std::to_string(queuePairNumber));
  212. }
  213. std::vector<std::string> CreateNetworkInterfaceRequest::getSecurityGroupIds() const {
  214. return securityGroupIds_;
  215. }
  216. void CreateNetworkInterfaceRequest::setSecurityGroupIds(const std::vector<std::string> &securityGroupIds) {
  217. securityGroupIds_ = securityGroupIds;
  218. }
  219. std::string CreateNetworkInterfaceRequest::getNetworkInterfaceTrafficMode() const {
  220. return networkInterfaceTrafficMode_;
  221. }
  222. void CreateNetworkInterfaceRequest::setNetworkInterfaceTrafficMode(const std::string &networkInterfaceTrafficMode) {
  223. networkInterfaceTrafficMode_ = networkInterfaceTrafficMode;
  224. setParameter(std::string("NetworkInterfaceTrafficMode"), networkInterfaceTrafficMode);
  225. }
  226. int CreateNetworkInterfaceRequest::getIpv4PrefixCount() const {
  227. return ipv4PrefixCount_;
  228. }
  229. void CreateNetworkInterfaceRequest::setIpv4PrefixCount(int ipv4PrefixCount) {
  230. ipv4PrefixCount_ = ipv4PrefixCount;
  231. setParameter(std::string("Ipv4PrefixCount"), std::to_string(ipv4PrefixCount));
  232. }
  233. std::string CreateNetworkInterfaceRequest::getPrimaryIpAddress() const {
  234. return primaryIpAddress_;
  235. }
  236. void CreateNetworkInterfaceRequest::setPrimaryIpAddress(const std::string &primaryIpAddress) {
  237. primaryIpAddress_ = primaryIpAddress;
  238. setParameter(std::string("PrimaryIpAddress"), primaryIpAddress);
  239. }