RunRCCommandRequest.cc 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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/rds/model/RunRCCommandRequest.h>
  17. using AlibabaCloud::Rds::Model::RunRCCommandRequest;
  18. RunRCCommandRequest::RunRCCommandRequest()
  19. : RpcServiceRequest("rds", "2014-08-15", "RunRCCommand") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. RunRCCommandRequest::~RunRCCommandRequest() {}
  23. std::vector<RunRCCommandRequest::ResourceTags> RunRCCommandRequest::getResourceTags() const {
  24. return resourceTags_;
  25. }
  26. void RunRCCommandRequest::setResourceTags(const std::vector<RunRCCommandRequest::ResourceTags> &resourceTags) {
  27. resourceTags_ = resourceTags;
  28. for(int dep1 = 0; dep1 != resourceTags.size(); dep1++) {
  29. setParameter(std::string("ResourceTags") + "." + std::to_string(dep1 + 1) + ".Value", resourceTags[dep1].value);
  30. setParameter(std::string("ResourceTags") + "." + std::to_string(dep1 + 1) + ".Key", resourceTags[dep1].key);
  31. }
  32. }
  33. std::string RunRCCommandRequest::getContainerName() const {
  34. return containerName_;
  35. }
  36. void RunRCCommandRequest::setContainerName(const std::string &containerName) {
  37. containerName_ = containerName;
  38. setParameter(std::string("ContainerName"), containerName);
  39. }
  40. std::string RunRCCommandRequest::getClientToken() const {
  41. return clientToken_;
  42. }
  43. void RunRCCommandRequest::setClientToken(const std::string &clientToken) {
  44. clientToken_ = clientToken;
  45. setParameter(std::string("ClientToken"), clientToken);
  46. }
  47. std::string RunRCCommandRequest::getWorkingDir() const {
  48. return workingDir_;
  49. }
  50. void RunRCCommandRequest::setWorkingDir(const std::string &workingDir) {
  51. workingDir_ = workingDir;
  52. setParameter(std::string("WorkingDir"), workingDir);
  53. }
  54. std::string RunRCCommandRequest::getDescription() const {
  55. return description_;
  56. }
  57. void RunRCCommandRequest::setDescription(const std::string &description) {
  58. description_ = description;
  59. setParameter(std::string("Description"), description);
  60. }
  61. std::string RunRCCommandRequest::getType() const {
  62. return type_;
  63. }
  64. void RunRCCommandRequest::setType(const std::string &type) {
  65. type_ = type;
  66. setParameter(std::string("Type"), type);
  67. }
  68. std::string RunRCCommandRequest::getCommandContent() const {
  69. return commandContent_;
  70. }
  71. void RunRCCommandRequest::setCommandContent(const std::string &commandContent) {
  72. commandContent_ = commandContent;
  73. setParameter(std::string("CommandContent"), commandContent);
  74. }
  75. long RunRCCommandRequest::getTimeout() const {
  76. return timeout_;
  77. }
  78. void RunRCCommandRequest::setTimeout(long timeout) {
  79. timeout_ = timeout;
  80. setParameter(std::string("Timeout"), std::to_string(timeout));
  81. }
  82. std::string RunRCCommandRequest::getFrequency() const {
  83. return frequency_;
  84. }
  85. void RunRCCommandRequest::setFrequency(const std::string &frequency) {
  86. frequency_ = frequency;
  87. setParameter(std::string("Frequency"), frequency);
  88. }
  89. std::string RunRCCommandRequest::getResourceGroupId() const {
  90. return resourceGroupId_;
  91. }
  92. void RunRCCommandRequest::setResourceGroupId(const std::string &resourceGroupId) {
  93. resourceGroupId_ = resourceGroupId;
  94. setParameter(std::string("ResourceGroupId"), resourceGroupId);
  95. }
  96. std::string RunRCCommandRequest::getRegionId() const {
  97. return regionId_;
  98. }
  99. void RunRCCommandRequest::setRegionId(const std::string &regionId) {
  100. regionId_ = regionId;
  101. setParameter(std::string("RegionId"), regionId);
  102. }
  103. std::string RunRCCommandRequest::getContentEncoding() const {
  104. return contentEncoding_;
  105. }
  106. void RunRCCommandRequest::setContentEncoding(const std::string &contentEncoding) {
  107. contentEncoding_ = contentEncoding;
  108. setParameter(std::string("ContentEncoding"), contentEncoding);
  109. }
  110. std::string RunRCCommandRequest::getRepeatMode() const {
  111. return repeatMode_;
  112. }
  113. void RunRCCommandRequest::setRepeatMode(const std::string &repeatMode) {
  114. repeatMode_ = repeatMode;
  115. setParameter(std::string("RepeatMode"), repeatMode);
  116. }
  117. std::string RunRCCommandRequest::getWindowsPasswordName() const {
  118. return windowsPasswordName_;
  119. }
  120. void RunRCCommandRequest::setWindowsPasswordName(const std::string &windowsPasswordName) {
  121. windowsPasswordName_ = windowsPasswordName;
  122. setParameter(std::string("WindowsPasswordName"), windowsPasswordName);
  123. }
  124. bool RunRCCommandRequest::getKeepCommand() const {
  125. return keepCommand_;
  126. }
  127. void RunRCCommandRequest::setKeepCommand(bool keepCommand) {
  128. keepCommand_ = keepCommand;
  129. setParameter(std::string("KeepCommand"), keepCommand ? "true" : "false");
  130. }
  131. std::vector<RunRCCommandRequest::Tags> RunRCCommandRequest::getTags() const {
  132. return tags_;
  133. }
  134. void RunRCCommandRequest::setTags(const std::vector<RunRCCommandRequest::Tags> &tags) {
  135. tags_ = tags;
  136. for(int dep1 = 0; dep1 != tags.size(); dep1++) {
  137. setParameter(std::string("Tags") + "." + std::to_string(dep1 + 1) + ".Value", tags[dep1].value);
  138. setParameter(std::string("Tags") + "." + std::to_string(dep1 + 1) + ".Key", tags[dep1].key);
  139. }
  140. }
  141. std::string RunRCCommandRequest::getTerminationMode() const {
  142. return terminationMode_;
  143. }
  144. void RunRCCommandRequest::setTerminationMode(const std::string &terminationMode) {
  145. terminationMode_ = terminationMode;
  146. setParameter(std::string("TerminationMode"), terminationMode);
  147. }
  148. std::vector<RunRCCommandRequest::std::string> RunRCCommandRequest::getInstanceIds() const {
  149. return instanceIds_;
  150. }
  151. void RunRCCommandRequest::setInstanceIds(const std::vector<RunRCCommandRequest::std::string> &instanceIds) {
  152. instanceIds_ = instanceIds;
  153. for(int dep1 = 0; dep1 != instanceIds.size(); dep1++) {
  154. setParameter(std::string("InstanceIds") + "." + std::to_string(dep1 + 1), instanceIds[dep1]);
  155. }
  156. }
  157. std::string RunRCCommandRequest::getName() const {
  158. return name_;
  159. }
  160. void RunRCCommandRequest::setName(const std::string &name) {
  161. name_ = name;
  162. setParameter(std::string("Name"), name);
  163. }
  164. std::string RunRCCommandRequest::getContainerId() const {
  165. return containerId_;
  166. }
  167. void RunRCCommandRequest::setContainerId(const std::string &containerId) {
  168. containerId_ = containerId;
  169. setParameter(std::string("ContainerId"), containerId);
  170. }
  171. std::map<std::string, std::string> RunRCCommandRequest::getParameters() const {
  172. return parameters_;
  173. }
  174. void RunRCCommandRequest::setParameters(const std::map<std::string, std::string> &parameters) {
  175. parameters_ = parameters;
  176. for(auto const &iter1 : parameters) {
  177. setParameter(std::string("Parameters") + "." + iter1.first, iter1.second);
  178. }
  179. }
  180. bool RunRCCommandRequest::getEnableParameter() const {
  181. return enableParameter_;
  182. }
  183. void RunRCCommandRequest::setEnableParameter(bool enableParameter) {
  184. enableParameter_ = enableParameter;
  185. setParameter(std::string("EnableParameter"), enableParameter ? "true" : "false");
  186. }
  187. std::string RunRCCommandRequest::getUsername() const {
  188. return username_;
  189. }
  190. void RunRCCommandRequest::setUsername(const std::string &username) {
  191. username_ = username;
  192. setParameter(std::string("Username"), username);
  193. }
  194. std::string RunRCCommandRequest::getLauncher() const {
  195. return launcher_;
  196. }
  197. void RunRCCommandRequest::setLauncher(const std::string &launcher) {
  198. launcher_ = launcher;
  199. setParameter(std::string("Launcher"), launcher);
  200. }