RunCommandRequest.cc 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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/RunCommandRequest.h>
  17. using AlibabaCloud::Ecs::Model::RunCommandRequest;
  18. RunCommandRequest::RunCommandRequest()
  19. : RpcServiceRequest("ecs", "2014-05-26", "RunCommand") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. RunCommandRequest::~RunCommandRequest() {}
  23. long RunCommandRequest::getResourceOwnerId() const {
  24. return resourceOwnerId_;
  25. }
  26. void RunCommandRequest::setResourceOwnerId(long resourceOwnerId) {
  27. resourceOwnerId_ = resourceOwnerId;
  28. setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
  29. }
  30. std::string RunCommandRequest::getWorkingDir() const {
  31. return workingDir_;
  32. }
  33. void RunCommandRequest::setWorkingDir(const std::string &workingDir) {
  34. workingDir_ = workingDir;
  35. setParameter(std::string("WorkingDir"), workingDir);
  36. }
  37. std::string RunCommandRequest::getDescription() const {
  38. return description_;
  39. }
  40. void RunCommandRequest::setDescription(const std::string &description) {
  41. description_ = description;
  42. setParameter(std::string("Description"), description);
  43. }
  44. std::string RunCommandRequest::getType() const {
  45. return type_;
  46. }
  47. void RunCommandRequest::setType(const std::string &type) {
  48. type_ = type;
  49. setParameter(std::string("Type"), type);
  50. }
  51. std::string RunCommandRequest::getCommandContent() const {
  52. return commandContent_;
  53. }
  54. void RunCommandRequest::setCommandContent(const std::string &commandContent) {
  55. commandContent_ = commandContent;
  56. setParameter(std::string("CommandContent"), commandContent);
  57. }
  58. long RunCommandRequest::getTimeout() const {
  59. return timeout_;
  60. }
  61. void RunCommandRequest::setTimeout(long timeout) {
  62. timeout_ = timeout;
  63. setParameter(std::string("Timeout"), std::to_string(timeout));
  64. }
  65. std::string RunCommandRequest::getFrequency() const {
  66. return frequency_;
  67. }
  68. void RunCommandRequest::setFrequency(const std::string &frequency) {
  69. frequency_ = frequency;
  70. setParameter(std::string("Frequency"), frequency);
  71. }
  72. std::string RunCommandRequest::getRegionId() const {
  73. return regionId_;
  74. }
  75. void RunCommandRequest::setRegionId(const std::string &regionId) {
  76. regionId_ = regionId;
  77. setParameter(std::string("RegionId"), regionId);
  78. }
  79. std::string RunCommandRequest::getContentEncoding() const {
  80. return contentEncoding_;
  81. }
  82. void RunCommandRequest::setContentEncoding(const std::string &contentEncoding) {
  83. contentEncoding_ = contentEncoding;
  84. setParameter(std::string("ContentEncoding"), contentEncoding);
  85. }
  86. std::string RunCommandRequest::getRepeatMode() const {
  87. return repeatMode_;
  88. }
  89. void RunCommandRequest::setRepeatMode(const std::string &repeatMode) {
  90. repeatMode_ = repeatMode;
  91. setParameter(std::string("RepeatMode"), repeatMode);
  92. }
  93. std::string RunCommandRequest::getWindowsPasswordName() const {
  94. return windowsPasswordName_;
  95. }
  96. void RunCommandRequest::setWindowsPasswordName(const std::string &windowsPasswordName) {
  97. windowsPasswordName_ = windowsPasswordName;
  98. setParameter(std::string("WindowsPasswordName"), windowsPasswordName);
  99. }
  100. bool RunCommandRequest::getKeepCommand() const {
  101. return keepCommand_;
  102. }
  103. void RunCommandRequest::setKeepCommand(bool keepCommand) {
  104. keepCommand_ = keepCommand;
  105. setParameter(std::string("KeepCommand"), keepCommand ? "true" : "false");
  106. }
  107. bool RunCommandRequest::getTimed() const {
  108. return timed_;
  109. }
  110. void RunCommandRequest::setTimed(bool timed) {
  111. timed_ = timed;
  112. setParameter(std::string("Timed"), timed ? "true" : "false");
  113. }
  114. bool RunCommandRequest::getDryRun() const {
  115. return dryRun_;
  116. }
  117. void RunCommandRequest::setDryRun(bool dryRun) {
  118. dryRun_ = dryRun;
  119. setParameter(std::string("DryRun"), dryRun ? "true" : "false");
  120. }
  121. std::string RunCommandRequest::getResourceOwnerAccount() const {
  122. return resourceOwnerAccount_;
  123. }
  124. void RunCommandRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
  125. resourceOwnerAccount_ = resourceOwnerAccount;
  126. setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
  127. }
  128. std::string RunCommandRequest::getOwnerAccount() const {
  129. return ownerAccount_;
  130. }
  131. void RunCommandRequest::setOwnerAccount(const std::string &ownerAccount) {
  132. ownerAccount_ = ownerAccount;
  133. setParameter(std::string("OwnerAccount"), ownerAccount);
  134. }
  135. long RunCommandRequest::getOwnerId() const {
  136. return ownerId_;
  137. }
  138. void RunCommandRequest::setOwnerId(long ownerId) {
  139. ownerId_ = ownerId;
  140. setParameter(std::string("OwnerId"), std::to_string(ownerId));
  141. }
  142. std::vector<std::string> RunCommandRequest::getInstanceId() const {
  143. return instanceId_;
  144. }
  145. void RunCommandRequest::setInstanceId(const std::vector<std::string> &instanceId) {
  146. instanceId_ = instanceId;
  147. }
  148. std::string RunCommandRequest::getName() const {
  149. return name_;
  150. }
  151. void RunCommandRequest::setName(const std::string &name) {
  152. name_ = name;
  153. setParameter(std::string("Name"), name);
  154. }
  155. std::map<std::string, std::string> RunCommandRequest::getParameters() const {
  156. return parameters_;
  157. }
  158. void RunCommandRequest::setParameters(std::map<std::string, std::string> parameters) {
  159. parameters_ = parameters;
  160. setParameter(std::string("Parameters"), parameters);
  161. }
  162. bool RunCommandRequest::getEnableParameter() const {
  163. return enableParameter_;
  164. }
  165. void RunCommandRequest::setEnableParameter(bool enableParameter) {
  166. enableParameter_ = enableParameter;
  167. setParameter(std::string("EnableParameter"), enableParameter ? "true" : "false");
  168. }
  169. std::string RunCommandRequest::getUsername() const {
  170. return username_;
  171. }
  172. void RunCommandRequest::setUsername(const std::string &username) {
  173. username_ = username;
  174. setParameter(std::string("Username"), username);
  175. }