CreateFlowJobRequest.cc 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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/emr/model/CreateFlowJobRequest.h>
  17. using AlibabaCloud::Emr::Model::CreateFlowJobRequest;
  18. CreateFlowJobRequest::CreateFlowJobRequest() :
  19. RpcServiceRequest("emr", "2016-04-08", "CreateFlowJob")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateFlowJobRequest::~CreateFlowJobRequest()
  24. {}
  25. std::string CreateFlowJobRequest::getRetryPolicy()const
  26. {
  27. return retryPolicy_;
  28. }
  29. void CreateFlowJobRequest::setRetryPolicy(const std::string& retryPolicy)
  30. {
  31. retryPolicy_ = retryPolicy;
  32. setParameter("RetryPolicy", retryPolicy);
  33. }
  34. std::string CreateFlowJobRequest::getRunConf()const
  35. {
  36. return runConf_;
  37. }
  38. void CreateFlowJobRequest::setRunConf(const std::string& runConf)
  39. {
  40. runConf_ = runConf;
  41. setBodyParameter("RunConf", runConf);
  42. }
  43. std::string CreateFlowJobRequest::getDescription()const
  44. {
  45. return description_;
  46. }
  47. void CreateFlowJobRequest::setDescription(const std::string& description)
  48. {
  49. description_ = description;
  50. setBodyParameter("Description", description);
  51. }
  52. std::string CreateFlowJobRequest::getType()const
  53. {
  54. return type_;
  55. }
  56. void CreateFlowJobRequest::setType(const std::string& type)
  57. {
  58. type_ = type;
  59. setParameter("Type", type);
  60. }
  61. std::string CreateFlowJobRequest::getParamConf()const
  62. {
  63. return paramConf_;
  64. }
  65. void CreateFlowJobRequest::setParamConf(const std::string& paramConf)
  66. {
  67. paramConf_ = paramConf;
  68. setBodyParameter("ParamConf", paramConf);
  69. }
  70. std::vector<CreateFlowJobRequest::ResourceList> CreateFlowJobRequest::getResourceList()const
  71. {
  72. return resourceList_;
  73. }
  74. void CreateFlowJobRequest::setResourceList(const std::vector<ResourceList>& resourceList)
  75. {
  76. resourceList_ = resourceList;
  77. for(int dep1 = 0; dep1!= resourceList.size(); dep1++) {
  78. auto resourceListObj = resourceList.at(dep1);
  79. std::string resourceListObjStr = "ResourceList." + std::to_string(dep1 + 1);
  80. setParameter(resourceListObjStr + ".Path", resourceListObj.path);
  81. setParameter(resourceListObjStr + ".Alias", resourceListObj.alias);
  82. }
  83. }
  84. std::string CreateFlowJobRequest::getFailAct()const
  85. {
  86. return failAct_;
  87. }
  88. void CreateFlowJobRequest::setFailAct(const std::string& failAct)
  89. {
  90. failAct_ = failAct;
  91. setParameter("FailAct", failAct);
  92. }
  93. std::string CreateFlowJobRequest::getMode()const
  94. {
  95. return mode_;
  96. }
  97. void CreateFlowJobRequest::setMode(const std::string& mode)
  98. {
  99. mode_ = mode;
  100. setParameter("Mode", mode);
  101. }
  102. std::string CreateFlowJobRequest::getMonitorConf()const
  103. {
  104. return monitorConf_;
  105. }
  106. void CreateFlowJobRequest::setMonitorConf(const std::string& monitorConf)
  107. {
  108. monitorConf_ = monitorConf;
  109. setBodyParameter("MonitorConf", monitorConf);
  110. }
  111. std::string CreateFlowJobRequest::getRegionId()const
  112. {
  113. return regionId_;
  114. }
  115. void CreateFlowJobRequest::setRegionId(const std::string& regionId)
  116. {
  117. regionId_ = regionId;
  118. setParameter("RegionId", regionId);
  119. }
  120. int CreateFlowJobRequest::getMaxRetry()const
  121. {
  122. return maxRetry_;
  123. }
  124. void CreateFlowJobRequest::setMaxRetry(int maxRetry)
  125. {
  126. maxRetry_ = maxRetry;
  127. setParameter("MaxRetry", std::to_string(maxRetry));
  128. }
  129. std::string CreateFlowJobRequest::getAlertConf()const
  130. {
  131. return alertConf_;
  132. }
  133. void CreateFlowJobRequest::setAlertConf(const std::string& alertConf)
  134. {
  135. alertConf_ = alertConf;
  136. setParameter("AlertConf", alertConf);
  137. }
  138. std::string CreateFlowJobRequest::getProjectId()const
  139. {
  140. return projectId_;
  141. }
  142. void CreateFlowJobRequest::setProjectId(const std::string& projectId)
  143. {
  144. projectId_ = projectId;
  145. setParameter("ProjectId", projectId);
  146. }
  147. std::string CreateFlowJobRequest::getEnvConf()const
  148. {
  149. return envConf_;
  150. }
  151. void CreateFlowJobRequest::setEnvConf(const std::string& envConf)
  152. {
  153. envConf_ = envConf;
  154. setBodyParameter("EnvConf", envConf);
  155. }
  156. long CreateFlowJobRequest::getMaxRunningTimeSec()const
  157. {
  158. return maxRunningTimeSec_;
  159. }
  160. void CreateFlowJobRequest::setMaxRunningTimeSec(long maxRunningTimeSec)
  161. {
  162. maxRunningTimeSec_ = maxRunningTimeSec;
  163. setParameter("MaxRunningTimeSec", std::to_string(maxRunningTimeSec));
  164. }
  165. std::string CreateFlowJobRequest::getClusterId()const
  166. {
  167. return clusterId_;
  168. }
  169. void CreateFlowJobRequest::setClusterId(const std::string& clusterId)
  170. {
  171. clusterId_ = clusterId;
  172. setParameter("ClusterId", clusterId);
  173. }
  174. std::string CreateFlowJobRequest::getParams()const
  175. {
  176. return params_;
  177. }
  178. void CreateFlowJobRequest::setParams(const std::string& params)
  179. {
  180. params_ = params;
  181. setBodyParameter("Params", params);
  182. }
  183. std::string CreateFlowJobRequest::getCustomVariables()const
  184. {
  185. return customVariables_;
  186. }
  187. void CreateFlowJobRequest::setCustomVariables(const std::string& customVariables)
  188. {
  189. customVariables_ = customVariables;
  190. setBodyParameter("CustomVariables", customVariables);
  191. }
  192. long CreateFlowJobRequest::getRetryInterval()const
  193. {
  194. return retryInterval_;
  195. }
  196. void CreateFlowJobRequest::setRetryInterval(long retryInterval)
  197. {
  198. retryInterval_ = retryInterval;
  199. setParameter("RetryInterval", std::to_string(retryInterval));
  200. }
  201. std::string CreateFlowJobRequest::getName()const
  202. {
  203. return name_;
  204. }
  205. void CreateFlowJobRequest::setName(const std::string& name)
  206. {
  207. name_ = name;
  208. setParameter("Name", name);
  209. }
  210. bool CreateFlowJobRequest::getAdhoc()const
  211. {
  212. return adhoc_;
  213. }
  214. void CreateFlowJobRequest::setAdhoc(bool adhoc)
  215. {
  216. adhoc_ = adhoc;
  217. setParameter("Adhoc", adhoc ? "true" : "false");
  218. }
  219. std::string CreateFlowJobRequest::getParentCategory()const
  220. {
  221. return parentCategory_;
  222. }
  223. void CreateFlowJobRequest::setParentCategory(const std::string& parentCategory)
  224. {
  225. parentCategory_ = parentCategory;
  226. setParameter("ParentCategory", parentCategory);
  227. }