DescribeCommandsRequest.cc 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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/DescribeCommandsRequest.h>
  17. using AlibabaCloud::Ecs::Model::DescribeCommandsRequest;
  18. DescribeCommandsRequest::DescribeCommandsRequest()
  19. : RpcServiceRequest("ecs", "2014-05-26", "DescribeCommands") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. DescribeCommandsRequest::~DescribeCommandsRequest() {}
  23. long DescribeCommandsRequest::getResourceOwnerId() const {
  24. return resourceOwnerId_;
  25. }
  26. void DescribeCommandsRequest::setResourceOwnerId(long resourceOwnerId) {
  27. resourceOwnerId_ = resourceOwnerId;
  28. setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
  29. }
  30. std::string DescribeCommandsRequest::getDescription() const {
  31. return description_;
  32. }
  33. void DescribeCommandsRequest::setDescription(const std::string &description) {
  34. description_ = description;
  35. setParameter(std::string("Description"), description);
  36. }
  37. std::string DescribeCommandsRequest::getType() const {
  38. return type_;
  39. }
  40. void DescribeCommandsRequest::setType(const std::string &type) {
  41. type_ = type;
  42. setParameter(std::string("Type"), type);
  43. }
  44. std::string DescribeCommandsRequest::getCommandId() const {
  45. return commandId_;
  46. }
  47. void DescribeCommandsRequest::setCommandId(const std::string &commandId) {
  48. commandId_ = commandId;
  49. setParameter(std::string("CommandId"), commandId);
  50. }
  51. long DescribeCommandsRequest::getPageNumber() const {
  52. return pageNumber_;
  53. }
  54. void DescribeCommandsRequest::setPageNumber(long pageNumber) {
  55. pageNumber_ = pageNumber;
  56. setParameter(std::string("PageNumber"), std::to_string(pageNumber));
  57. }
  58. std::string DescribeCommandsRequest::getResourceGroupId() const {
  59. return resourceGroupId_;
  60. }
  61. void DescribeCommandsRequest::setResourceGroupId(const std::string &resourceGroupId) {
  62. resourceGroupId_ = resourceGroupId;
  63. setParameter(std::string("ResourceGroupId"), resourceGroupId);
  64. }
  65. std::string DescribeCommandsRequest::getRegionId() const {
  66. return regionId_;
  67. }
  68. void DescribeCommandsRequest::setRegionId(const std::string &regionId) {
  69. regionId_ = regionId;
  70. setParameter(std::string("RegionId"), regionId);
  71. }
  72. std::string DescribeCommandsRequest::getProvider() const {
  73. return provider_;
  74. }
  75. void DescribeCommandsRequest::setProvider(const std::string &provider) {
  76. provider_ = provider;
  77. setParameter(std::string("Provider"), provider);
  78. }
  79. std::string DescribeCommandsRequest::getNextToken() const {
  80. return nextToken_;
  81. }
  82. void DescribeCommandsRequest::setNextToken(const std::string &nextToken) {
  83. nextToken_ = nextToken;
  84. setParameter(std::string("NextToken"), nextToken);
  85. }
  86. std::string DescribeCommandsRequest::getContentEncoding() const {
  87. return contentEncoding_;
  88. }
  89. void DescribeCommandsRequest::setContentEncoding(const std::string &contentEncoding) {
  90. contentEncoding_ = contentEncoding;
  91. setParameter(std::string("ContentEncoding"), contentEncoding);
  92. }
  93. long DescribeCommandsRequest::getPageSize() const {
  94. return pageSize_;
  95. }
  96. void DescribeCommandsRequest::setPageSize(long pageSize) {
  97. pageSize_ = pageSize;
  98. setParameter(std::string("PageSize"), std::to_string(pageSize));
  99. }
  100. std::vector<DescribeCommandsRequest::Tag> DescribeCommandsRequest::getTag() const {
  101. return tag_;
  102. }
  103. void DescribeCommandsRequest::setTag(const std::vector<DescribeCommandsRequest::Tag> &tag) {
  104. tag_ = tag;
  105. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  106. auto tagObj = tag.at(dep1);
  107. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  108. setParameter(tagObjStr + ".Key", tagObj.key);
  109. setParameter(tagObjStr + ".Value", tagObj.value);
  110. }
  111. }
  112. bool DescribeCommandsRequest::getLatest() const {
  113. return latest_;
  114. }
  115. void DescribeCommandsRequest::setLatest(bool latest) {
  116. latest_ = latest;
  117. setParameter(std::string("Latest"), latest ? "true" : "false");
  118. }
  119. std::string DescribeCommandsRequest::getResourceOwnerAccount() const {
  120. return resourceOwnerAccount_;
  121. }
  122. void DescribeCommandsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
  123. resourceOwnerAccount_ = resourceOwnerAccount;
  124. setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
  125. }
  126. std::string DescribeCommandsRequest::getOwnerAccount() const {
  127. return ownerAccount_;
  128. }
  129. void DescribeCommandsRequest::setOwnerAccount(const std::string &ownerAccount) {
  130. ownerAccount_ = ownerAccount;
  131. setParameter(std::string("OwnerAccount"), ownerAccount);
  132. }
  133. long DescribeCommandsRequest::getOwnerId() const {
  134. return ownerId_;
  135. }
  136. void DescribeCommandsRequest::setOwnerId(long ownerId) {
  137. ownerId_ = ownerId;
  138. setParameter(std::string("OwnerId"), std::to_string(ownerId));
  139. }
  140. std::string DescribeCommandsRequest::getName() const {
  141. return name_;
  142. }
  143. void DescribeCommandsRequest::setName(const std::string &name) {
  144. name_ = name;
  145. setParameter(std::string("Name"), name);
  146. }
  147. int DescribeCommandsRequest::getMaxResults() const {
  148. return maxResults_;
  149. }
  150. void DescribeCommandsRequest::setMaxResults(int maxResults) {
  151. maxResults_ = maxResults;
  152. setParameter(std::string("MaxResults"), std::to_string(maxResults));
  153. }