DescribeNetworkInterfacesRequest.cc 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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/DescribeNetworkInterfacesRequest.h>
  17. using AlibabaCloud::Ecs::Model::DescribeNetworkInterfacesRequest;
  18. DescribeNetworkInterfacesRequest::DescribeNetworkInterfacesRequest() :
  19. RpcServiceRequest("ecs", "2014-05-26", "DescribeNetworkInterfaces")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. DescribeNetworkInterfacesRequest::~DescribeNetworkInterfacesRequest()
  24. {}
  25. long DescribeNetworkInterfacesRequest::getResourceOwnerId()const
  26. {
  27. return resourceOwnerId_;
  28. }
  29. void DescribeNetworkInterfacesRequest::setResourceOwnerId(long resourceOwnerId)
  30. {
  31. resourceOwnerId_ = resourceOwnerId;
  32. setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  33. }
  34. bool DescribeNetworkInterfacesRequest::getServiceManaged()const
  35. {
  36. return serviceManaged_;
  37. }
  38. void DescribeNetworkInterfacesRequest::setServiceManaged(bool serviceManaged)
  39. {
  40. serviceManaged_ = serviceManaged;
  41. setParameter("ServiceManaged", serviceManaged ? "true" : "false");
  42. }
  43. std::string DescribeNetworkInterfacesRequest::getSecurityGroupId()const
  44. {
  45. return securityGroupId_;
  46. }
  47. void DescribeNetworkInterfacesRequest::setSecurityGroupId(const std::string& securityGroupId)
  48. {
  49. securityGroupId_ = securityGroupId;
  50. setParameter("SecurityGroupId", securityGroupId);
  51. }
  52. std::string DescribeNetworkInterfacesRequest::getType()const
  53. {
  54. return type_;
  55. }
  56. void DescribeNetworkInterfacesRequest::setType(const std::string& type)
  57. {
  58. type_ = type;
  59. setParameter("Type", type);
  60. }
  61. int DescribeNetworkInterfacesRequest::getPageNumber()const
  62. {
  63. return pageNumber_;
  64. }
  65. void DescribeNetworkInterfacesRequest::setPageNumber(int pageNumber)
  66. {
  67. pageNumber_ = pageNumber;
  68. setParameter("PageNumber", std::to_string(pageNumber));
  69. }
  70. std::string DescribeNetworkInterfacesRequest::getResourceGroupId()const
  71. {
  72. return resourceGroupId_;
  73. }
  74. void DescribeNetworkInterfacesRequest::setResourceGroupId(const std::string& resourceGroupId)
  75. {
  76. resourceGroupId_ = resourceGroupId;
  77. setParameter("ResourceGroupId", resourceGroupId);
  78. }
  79. std::string DescribeNetworkInterfacesRequest::getRegionId()const
  80. {
  81. return regionId_;
  82. }
  83. void DescribeNetworkInterfacesRequest::setRegionId(const std::string& regionId)
  84. {
  85. regionId_ = regionId;
  86. setParameter("RegionId", regionId);
  87. }
  88. std::string DescribeNetworkInterfacesRequest::getNextToken()const
  89. {
  90. return nextToken_;
  91. }
  92. void DescribeNetworkInterfacesRequest::setNextToken(const std::string& nextToken)
  93. {
  94. nextToken_ = nextToken;
  95. setParameter("NextToken", nextToken);
  96. }
  97. int DescribeNetworkInterfacesRequest::getPageSize()const
  98. {
  99. return pageSize_;
  100. }
  101. void DescribeNetworkInterfacesRequest::setPageSize(int pageSize)
  102. {
  103. pageSize_ = pageSize;
  104. setParameter("PageSize", std::to_string(pageSize));
  105. }
  106. std::vector<DescribeNetworkInterfacesRequest::Tag> DescribeNetworkInterfacesRequest::getTag()const
  107. {
  108. return tag_;
  109. }
  110. void DescribeNetworkInterfacesRequest::setTag(const std::vector<Tag>& tag)
  111. {
  112. tag_ = tag;
  113. for(int dep1 = 0; dep1!= tag.size(); dep1++) {
  114. auto tagObj = tag.at(dep1);
  115. std::string tagObjStr = "Tag." + std::to_string(dep1 + 1);
  116. setParameter(tagObjStr + ".Key", tagObj.key);
  117. setParameter(tagObjStr + ".Value", tagObj.value);
  118. }
  119. }
  120. std::string DescribeNetworkInterfacesRequest::getNetworkInterfaceName()const
  121. {
  122. return networkInterfaceName_;
  123. }
  124. void DescribeNetworkInterfacesRequest::setNetworkInterfaceName(const std::string& networkInterfaceName)
  125. {
  126. networkInterfaceName_ = networkInterfaceName;
  127. setParameter("NetworkInterfaceName", networkInterfaceName);
  128. }
  129. std::string DescribeNetworkInterfacesRequest::getResourceOwnerAccount()const
  130. {
  131. return resourceOwnerAccount_;
  132. }
  133. void DescribeNetworkInterfacesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
  134. {
  135. resourceOwnerAccount_ = resourceOwnerAccount;
  136. setParameter("ResourceOwnerAccount", resourceOwnerAccount);
  137. }
  138. std::string DescribeNetworkInterfacesRequest::getOwnerAccount()const
  139. {
  140. return ownerAccount_;
  141. }
  142. void DescribeNetworkInterfacesRequest::setOwnerAccount(const std::string& ownerAccount)
  143. {
  144. ownerAccount_ = ownerAccount;
  145. setParameter("OwnerAccount", ownerAccount);
  146. }
  147. long DescribeNetworkInterfacesRequest::getOwnerId()const
  148. {
  149. return ownerId_;
  150. }
  151. void DescribeNetworkInterfacesRequest::setOwnerId(long ownerId)
  152. {
  153. ownerId_ = ownerId;
  154. setParameter("OwnerId", std::to_string(ownerId));
  155. }
  156. std::string DescribeNetworkInterfacesRequest::getVSwitchId()const
  157. {
  158. return vSwitchId_;
  159. }
  160. void DescribeNetworkInterfacesRequest::setVSwitchId(const std::string& vSwitchId)
  161. {
  162. vSwitchId_ = vSwitchId;
  163. setParameter("VSwitchId", vSwitchId);
  164. }
  165. std::vector<std::string> DescribeNetworkInterfacesRequest::getPrivateIpAddress()const
  166. {
  167. return privateIpAddress_;
  168. }
  169. void DescribeNetworkInterfacesRequest::setPrivateIpAddress(const std::vector<std::string>& privateIpAddress)
  170. {
  171. privateIpAddress_ = privateIpAddress;
  172. for(int dep1 = 0; dep1!= privateIpAddress.size(); dep1++) {
  173. setParameter("PrivateIpAddress."+ std::to_string(dep1), privateIpAddress.at(dep1));
  174. }
  175. }
  176. std::string DescribeNetworkInterfacesRequest::getInstanceId()const
  177. {
  178. return instanceId_;
  179. }
  180. void DescribeNetworkInterfacesRequest::setInstanceId(const std::string& instanceId)
  181. {
  182. instanceId_ = instanceId;
  183. setParameter("InstanceId", instanceId);
  184. }
  185. std::string DescribeNetworkInterfacesRequest::getVpcId()const
  186. {
  187. return vpcId_;
  188. }
  189. void DescribeNetworkInterfacesRequest::setVpcId(const std::string& vpcId)
  190. {
  191. vpcId_ = vpcId;
  192. setParameter("VpcId", vpcId);
  193. }
  194. std::string DescribeNetworkInterfacesRequest::getPrimaryIpAddress()const
  195. {
  196. return primaryIpAddress_;
  197. }
  198. void DescribeNetworkInterfacesRequest::setPrimaryIpAddress(const std::string& primaryIpAddress)
  199. {
  200. primaryIpAddress_ = primaryIpAddress;
  201. setParameter("PrimaryIpAddress", primaryIpAddress);
  202. }
  203. int DescribeNetworkInterfacesRequest::getMaxResults()const
  204. {
  205. return maxResults_;
  206. }
  207. void DescribeNetworkInterfacesRequest::setMaxResults(int maxResults)
  208. {
  209. maxResults_ = maxResults;
  210. setParameter("MaxResults", std::to_string(maxResults));
  211. }
  212. std::vector<std::string> DescribeNetworkInterfacesRequest::getNetworkInterfaceId()const
  213. {
  214. return networkInterfaceId_;
  215. }
  216. void DescribeNetworkInterfacesRequest::setNetworkInterfaceId(const std::vector<std::string>& networkInterfaceId)
  217. {
  218. networkInterfaceId_ = networkInterfaceId;
  219. for(int dep1 = 0; dep1!= networkInterfaceId.size(); dep1++) {
  220. setParameter("NetworkInterfaceId."+ std::to_string(dep1), networkInterfaceId.at(dep1));
  221. }
  222. }
  223. std::string DescribeNetworkInterfacesRequest::getStatus()const
  224. {
  225. return status_;
  226. }
  227. void DescribeNetworkInterfacesRequest::setStatus(const std::string& status)
  228. {
  229. status_ = status;
  230. setParameter("Status", status);
  231. }