CreateClusterRequest.cc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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/ehpc/model/CreateClusterRequest.h>
  17. using AlibabaCloud::EHPC::Model::CreateClusterRequest;
  18. CreateClusterRequest::CreateClusterRequest() :
  19. RpcServiceRequest("ehpc", "2018-04-12", "CreateCluster")
  20. {}
  21. CreateClusterRequest::~CreateClusterRequest()
  22. {}
  23. std::string CreateClusterRequest::getSccClusterId()const
  24. {
  25. return sccClusterId_;
  26. }
  27. void CreateClusterRequest::setSccClusterId(const std::string& sccClusterId)
  28. {
  29. sccClusterId_ = sccClusterId;
  30. setParameter("SccClusterId", sccClusterId);
  31. }
  32. std::string CreateClusterRequest::getImageId()const
  33. {
  34. return imageId_;
  35. }
  36. void CreateClusterRequest::setImageId(const std::string& imageId)
  37. {
  38. imageId_ = imageId;
  39. setParameter("ImageId", imageId);
  40. }
  41. std::string CreateClusterRequest::getEcsOrderManagerInstanceType()const
  42. {
  43. return ecsOrderManagerInstanceType_;
  44. }
  45. void CreateClusterRequest::setEcsOrderManagerInstanceType(const std::string& ecsOrderManagerInstanceType)
  46. {
  47. ecsOrderManagerInstanceType_ = ecsOrderManagerInstanceType;
  48. setParameter("EcsOrderManagerInstanceType", ecsOrderManagerInstanceType);
  49. }
  50. std::string CreateClusterRequest::getEhpcVersion()const
  51. {
  52. return ehpcVersion_;
  53. }
  54. void CreateClusterRequest::setEhpcVersion(const std::string& ehpcVersion)
  55. {
  56. ehpcVersion_ = ehpcVersion;
  57. setParameter("EhpcVersion", ehpcVersion);
  58. }
  59. std::string CreateClusterRequest::getAccountType()const
  60. {
  61. return accountType_;
  62. }
  63. void CreateClusterRequest::setAccountType(const std::string& accountType)
  64. {
  65. accountType_ = accountType;
  66. setParameter("AccountType", accountType);
  67. }
  68. std::string CreateClusterRequest::getSecurityGroupId()const
  69. {
  70. return securityGroupId_;
  71. }
  72. void CreateClusterRequest::setSecurityGroupId(const std::string& securityGroupId)
  73. {
  74. securityGroupId_ = securityGroupId;
  75. setParameter("SecurityGroupId", securityGroupId);
  76. }
  77. std::string CreateClusterRequest::getDescription()const
  78. {
  79. return description_;
  80. }
  81. void CreateClusterRequest::setDescription(const std::string& description)
  82. {
  83. description_ = description;
  84. setParameter("Description", description);
  85. }
  86. std::string CreateClusterRequest::getKeyPairName()const
  87. {
  88. return keyPairName_;
  89. }
  90. void CreateClusterRequest::setKeyPairName(const std::string& keyPairName)
  91. {
  92. keyPairName_ = keyPairName;
  93. setParameter("KeyPairName", keyPairName);
  94. }
  95. std::string CreateClusterRequest::getSecurityGroupName()const
  96. {
  97. return securityGroupName_;
  98. }
  99. void CreateClusterRequest::setSecurityGroupName(const std::string& securityGroupName)
  100. {
  101. securityGroupName_ = securityGroupName;
  102. setParameter("SecurityGroupName", securityGroupName);
  103. }
  104. std::string CreateClusterRequest::getEcsOrderComputeInstanceType()const
  105. {
  106. return ecsOrderComputeInstanceType_;
  107. }
  108. void CreateClusterRequest::setEcsOrderComputeInstanceType(const std::string& ecsOrderComputeInstanceType)
  109. {
  110. ecsOrderComputeInstanceType_ = ecsOrderComputeInstanceType;
  111. setParameter("EcsOrderComputeInstanceType", ecsOrderComputeInstanceType);
  112. }
  113. std::string CreateClusterRequest::getJobQueue()const
  114. {
  115. return jobQueue_;
  116. }
  117. void CreateClusterRequest::setJobQueue(const std::string& jobQueue)
  118. {
  119. jobQueue_ = jobQueue;
  120. setParameter("JobQueue", jobQueue);
  121. }
  122. std::string CreateClusterRequest::getAccessKeyId()const
  123. {
  124. return accessKeyId_;
  125. }
  126. void CreateClusterRequest::setAccessKeyId(const std::string& accessKeyId)
  127. {
  128. accessKeyId_ = accessKeyId;
  129. setParameter("AccessKeyId", accessKeyId);
  130. }
  131. std::string CreateClusterRequest::getImageOwnerAlias()const
  132. {
  133. return imageOwnerAlias_;
  134. }
  135. void CreateClusterRequest::setImageOwnerAlias(const std::string& imageOwnerAlias)
  136. {
  137. imageOwnerAlias_ = imageOwnerAlias;
  138. setParameter("ImageOwnerAlias", imageOwnerAlias);
  139. }
  140. std::string CreateClusterRequest::getVolumeType()const
  141. {
  142. return volumeType_;
  143. }
  144. void CreateClusterRequest::setVolumeType(const std::string& volumeType)
  145. {
  146. volumeType_ = volumeType;
  147. setParameter("VolumeType", volumeType);
  148. }
  149. std::string CreateClusterRequest::getDeployMode()const
  150. {
  151. return deployMode_;
  152. }
  153. void CreateClusterRequest::setDeployMode(const std::string& deployMode)
  154. {
  155. deployMode_ = deployMode;
  156. setParameter("DeployMode", deployMode);
  157. }
  158. int CreateClusterRequest::getEcsOrderManagerCount()const
  159. {
  160. return ecsOrderManagerCount_;
  161. }
  162. void CreateClusterRequest::setEcsOrderManagerCount(int ecsOrderManagerCount)
  163. {
  164. ecsOrderManagerCount_ = ecsOrderManagerCount;
  165. setParameter("EcsOrderManagerCount", std::to_string(ecsOrderManagerCount));
  166. }
  167. std::string CreateClusterRequest::getPassword()const
  168. {
  169. return password_;
  170. }
  171. void CreateClusterRequest::setPassword(const std::string& password)
  172. {
  173. password_ = password;
  174. setParameter("Password", password);
  175. }
  176. int CreateClusterRequest::getEcsOrderLoginCount()const
  177. {
  178. return ecsOrderLoginCount_;
  179. }
  180. void CreateClusterRequest::setEcsOrderLoginCount(int ecsOrderLoginCount)
  181. {
  182. ecsOrderLoginCount_ = ecsOrderLoginCount;
  183. setParameter("EcsOrderLoginCount", std::to_string(ecsOrderLoginCount));
  184. }
  185. std::string CreateClusterRequest::getComputeSpotPriceLimit()const
  186. {
  187. return computeSpotPriceLimit_;
  188. }
  189. void CreateClusterRequest::setComputeSpotPriceLimit(const std::string& computeSpotPriceLimit)
  190. {
  191. computeSpotPriceLimit_ = computeSpotPriceLimit;
  192. setParameter("ComputeSpotPriceLimit", computeSpotPriceLimit);
  193. }
  194. int CreateClusterRequest::getAutoRenewPeriod()const
  195. {
  196. return autoRenewPeriod_;
  197. }
  198. void CreateClusterRequest::setAutoRenewPeriod(int autoRenewPeriod)
  199. {
  200. autoRenewPeriod_ = autoRenewPeriod;
  201. setParameter("AutoRenewPeriod", std::to_string(autoRenewPeriod));
  202. }
  203. int CreateClusterRequest::getPeriod()const
  204. {
  205. return period_;
  206. }
  207. void CreateClusterRequest::setPeriod(int period)
  208. {
  209. period_ = period;
  210. setParameter("Period", std::to_string(period));
  211. }
  212. std::string CreateClusterRequest::getVolumeProtocol()const
  213. {
  214. return volumeProtocol_;
  215. }
  216. void CreateClusterRequest::setVolumeProtocol(const std::string& volumeProtocol)
  217. {
  218. volumeProtocol_ = volumeProtocol;
  219. setParameter("VolumeProtocol", volumeProtocol);
  220. }
  221. std::string CreateClusterRequest::getClientVersion()const
  222. {
  223. return clientVersion_;
  224. }
  225. void CreateClusterRequest::setClientVersion(const std::string& clientVersion)
  226. {
  227. clientVersion_ = clientVersion;
  228. setParameter("ClientVersion", clientVersion);
  229. }
  230. std::string CreateClusterRequest::getOsTag()const
  231. {
  232. return osTag_;
  233. }
  234. void CreateClusterRequest::setOsTag(const std::string& osTag)
  235. {
  236. osTag_ = osTag;
  237. setParameter("OsTag", osTag);
  238. }
  239. std::string CreateClusterRequest::getRemoteDirectory()const
  240. {
  241. return remoteDirectory_;
  242. }
  243. void CreateClusterRequest::setRemoteDirectory(const std::string& remoteDirectory)
  244. {
  245. remoteDirectory_ = remoteDirectory;
  246. setParameter("RemoteDirectory", remoteDirectory);
  247. }
  248. int CreateClusterRequest::getEcsOrderComputeCount()const
  249. {
  250. return ecsOrderComputeCount_;
  251. }
  252. void CreateClusterRequest::setEcsOrderComputeCount(int ecsOrderComputeCount)
  253. {
  254. ecsOrderComputeCount_ = ecsOrderComputeCount;
  255. setParameter("EcsOrderComputeCount", std::to_string(ecsOrderComputeCount));
  256. }
  257. std::string CreateClusterRequest::getComputeSpotStrategy()const
  258. {
  259. return computeSpotStrategy_;
  260. }
  261. void CreateClusterRequest::setComputeSpotStrategy(const std::string& computeSpotStrategy)
  262. {
  263. computeSpotStrategy_ = computeSpotStrategy;
  264. setParameter("ComputeSpotStrategy", computeSpotStrategy);
  265. }
  266. std::vector<CreateClusterRequest::PostInstallScript> CreateClusterRequest::getPostInstallScript()const
  267. {
  268. return postInstallScript_;
  269. }
  270. void CreateClusterRequest::setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript)
  271. {
  272. postInstallScript_ = postInstallScript;
  273. int i = 0;
  274. for(int i = 0; i!= postInstallScript.size(); i++) {
  275. auto obj = postInstallScript.at(i);
  276. std::string str ="PostInstallScript."+ std::to_string(i);
  277. setParameter(str + ".Args", obj.args);
  278. setParameter(str + ".Url", obj.url);
  279. }
  280. }
  281. std::string CreateClusterRequest::getVSwitchId()const
  282. {
  283. return vSwitchId_;
  284. }
  285. void CreateClusterRequest::setVSwitchId(const std::string& vSwitchId)
  286. {
  287. vSwitchId_ = vSwitchId;
  288. setParameter("VSwitchId", vSwitchId);
  289. }
  290. std::string CreateClusterRequest::getPeriodUnit()const
  291. {
  292. return periodUnit_;
  293. }
  294. void CreateClusterRequest::setPeriodUnit(const std::string& periodUnit)
  295. {
  296. periodUnit_ = periodUnit;
  297. setParameter("PeriodUnit", periodUnit);
  298. }
  299. std::vector<CreateClusterRequest::Application> CreateClusterRequest::getApplication()const
  300. {
  301. return application_;
  302. }
  303. void CreateClusterRequest::setApplication(const std::vector<Application>& application)
  304. {
  305. application_ = application;
  306. int i = 0;
  307. for(int i = 0; i!= application.size(); i++) {
  308. auto obj = application.at(i);
  309. std::string str ="Application."+ std::to_string(i);
  310. setParameter(str + ".Tag", obj.tag);
  311. }
  312. }
  313. std::string CreateClusterRequest::getAutoRenew()const
  314. {
  315. return autoRenew_;
  316. }
  317. void CreateClusterRequest::setAutoRenew(const std::string& autoRenew)
  318. {
  319. autoRenew_ = autoRenew;
  320. setParameter("AutoRenew", autoRenew);
  321. }
  322. std::string CreateClusterRequest::getEcsChargeType()const
  323. {
  324. return ecsChargeType_;
  325. }
  326. void CreateClusterRequest::setEcsChargeType(const std::string& ecsChargeType)
  327. {
  328. ecsChargeType_ = ecsChargeType;
  329. setParameter("EcsChargeType", ecsChargeType);
  330. }
  331. std::string CreateClusterRequest::getInputFileUrl()const
  332. {
  333. return inputFileUrl_;
  334. }
  335. void CreateClusterRequest::setInputFileUrl(const std::string& inputFileUrl)
  336. {
  337. inputFileUrl_ = inputFileUrl;
  338. setParameter("InputFileUrl", inputFileUrl);
  339. }
  340. std::string CreateClusterRequest::getVpcId()const
  341. {
  342. return vpcId_;
  343. }
  344. void CreateClusterRequest::setVpcId(const std::string& vpcId)
  345. {
  346. vpcId_ = vpcId;
  347. setParameter("VpcId", vpcId);
  348. }
  349. bool CreateClusterRequest::getHaEnable()const
  350. {
  351. return haEnable_;
  352. }
  353. void CreateClusterRequest::setHaEnable(bool haEnable)
  354. {
  355. haEnable_ = haEnable;
  356. setParameter("HaEnable", std::to_string(haEnable));
  357. }
  358. std::string CreateClusterRequest::getName()const
  359. {
  360. return name_;
  361. }
  362. void CreateClusterRequest::setName(const std::string& name)
  363. {
  364. name_ = name;
  365. setParameter("Name", name);
  366. }
  367. std::string CreateClusterRequest::getSchedulerType()const
  368. {
  369. return schedulerType_;
  370. }
  371. void CreateClusterRequest::setSchedulerType(const std::string& schedulerType)
  372. {
  373. schedulerType_ = schedulerType;
  374. setParameter("SchedulerType", schedulerType);
  375. }
  376. std::string CreateClusterRequest::getVolumeId()const
  377. {
  378. return volumeId_;
  379. }
  380. void CreateClusterRequest::setVolumeId(const std::string& volumeId)
  381. {
  382. volumeId_ = volumeId;
  383. setParameter("VolumeId", volumeId);
  384. }
  385. std::string CreateClusterRequest::getVolumeMountpoint()const
  386. {
  387. return volumeMountpoint_;
  388. }
  389. void CreateClusterRequest::setVolumeMountpoint(const std::string& volumeMountpoint)
  390. {
  391. volumeMountpoint_ = volumeMountpoint;
  392. setParameter("VolumeMountpoint", volumeMountpoint);
  393. }
  394. std::string CreateClusterRequest::getEcsOrderLoginInstanceType()const
  395. {
  396. return ecsOrderLoginInstanceType_;
  397. }
  398. void CreateClusterRequest::setEcsOrderLoginInstanceType(const std::string& ecsOrderLoginInstanceType)
  399. {
  400. ecsOrderLoginInstanceType_ = ecsOrderLoginInstanceType;
  401. setParameter("EcsOrderLoginInstanceType", ecsOrderLoginInstanceType);
  402. }
  403. std::string CreateClusterRequest::getZoneId()const
  404. {
  405. return zoneId_;
  406. }
  407. void CreateClusterRequest::setZoneId(const std::string& zoneId)
  408. {
  409. zoneId_ = zoneId;
  410. setParameter("ZoneId", zoneId);
  411. }