OrderedJob.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Dataproc;
  18. class OrderedJob extends \Google\Collection
  19. {
  20. protected $collection_key = 'prerequisiteStepIds';
  21. protected $flinkJobType = FlinkJob::class;
  22. protected $flinkJobDataType = '';
  23. protected $hadoopJobType = HadoopJob::class;
  24. protected $hadoopJobDataType = '';
  25. protected $hiveJobType = HiveJob::class;
  26. protected $hiveJobDataType = '';
  27. /**
  28. * Optional. The labels to associate with this job.Label keys must be between
  29. * 1 and 63 characters long, and must conform to the following regular
  30. * expression: \p{Ll}\p{Lo}{0,62}Label values must be between 1 and 63
  31. * characters long, and must conform to the following regular expression:
  32. * \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels can be associated with a
  33. * given job.
  34. *
  35. * @var string[]
  36. */
  37. public $labels;
  38. protected $pigJobType = PigJob::class;
  39. protected $pigJobDataType = '';
  40. /**
  41. * Optional. The optional list of prerequisite job step_ids. If not specified,
  42. * the job will start at the beginning of workflow.
  43. *
  44. * @var string[]
  45. */
  46. public $prerequisiteStepIds;
  47. protected $prestoJobType = PrestoJob::class;
  48. protected $prestoJobDataType = '';
  49. protected $pysparkJobType = PySparkJob::class;
  50. protected $pysparkJobDataType = '';
  51. protected $schedulingType = JobScheduling::class;
  52. protected $schedulingDataType = '';
  53. protected $sparkJobType = SparkJob::class;
  54. protected $sparkJobDataType = '';
  55. protected $sparkRJobType = SparkRJob::class;
  56. protected $sparkRJobDataType = '';
  57. protected $sparkSqlJobType = SparkSqlJob::class;
  58. protected $sparkSqlJobDataType = '';
  59. /**
  60. * Required. The step id. The id must be unique among all jobs within the
  61. * template.The step id is used as prefix for job id, as job goog-dataproc-
  62. * workflow-step-id label, and in prerequisiteStepIds field from other
  63. * steps.The id must contain only letters (a-z, A-Z), numbers (0-9),
  64. * underscores (_), and hyphens (-). Cannot begin or end with underscore or
  65. * hyphen. Must consist of between 3 and 50 characters.
  66. *
  67. * @var string
  68. */
  69. public $stepId;
  70. protected $trinoJobType = TrinoJob::class;
  71. protected $trinoJobDataType = '';
  72. /**
  73. * Optional. Job is a Flink job.
  74. *
  75. * @param FlinkJob $flinkJob
  76. */
  77. public function setFlinkJob(FlinkJob $flinkJob)
  78. {
  79. $this->flinkJob = $flinkJob;
  80. }
  81. /**
  82. * @return FlinkJob
  83. */
  84. public function getFlinkJob()
  85. {
  86. return $this->flinkJob;
  87. }
  88. /**
  89. * Optional. Job is a Hadoop job.
  90. *
  91. * @param HadoopJob $hadoopJob
  92. */
  93. public function setHadoopJob(HadoopJob $hadoopJob)
  94. {
  95. $this->hadoopJob = $hadoopJob;
  96. }
  97. /**
  98. * @return HadoopJob
  99. */
  100. public function getHadoopJob()
  101. {
  102. return $this->hadoopJob;
  103. }
  104. /**
  105. * Optional. Job is a Hive job.
  106. *
  107. * @param HiveJob $hiveJob
  108. */
  109. public function setHiveJob(HiveJob $hiveJob)
  110. {
  111. $this->hiveJob = $hiveJob;
  112. }
  113. /**
  114. * @return HiveJob
  115. */
  116. public function getHiveJob()
  117. {
  118. return $this->hiveJob;
  119. }
  120. /**
  121. * Optional. The labels to associate with this job.Label keys must be between
  122. * 1 and 63 characters long, and must conform to the following regular
  123. * expression: \p{Ll}\p{Lo}{0,62}Label values must be between 1 and 63
  124. * characters long, and must conform to the following regular expression:
  125. * \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels can be associated with a
  126. * given job.
  127. *
  128. * @param string[] $labels
  129. */
  130. public function setLabels($labels)
  131. {
  132. $this->labels = $labels;
  133. }
  134. /**
  135. * @return string[]
  136. */
  137. public function getLabels()
  138. {
  139. return $this->labels;
  140. }
  141. /**
  142. * Optional. Job is a Pig job.
  143. *
  144. * @param PigJob $pigJob
  145. */
  146. public function setPigJob(PigJob $pigJob)
  147. {
  148. $this->pigJob = $pigJob;
  149. }
  150. /**
  151. * @return PigJob
  152. */
  153. public function getPigJob()
  154. {
  155. return $this->pigJob;
  156. }
  157. /**
  158. * Optional. The optional list of prerequisite job step_ids. If not specified,
  159. * the job will start at the beginning of workflow.
  160. *
  161. * @param string[] $prerequisiteStepIds
  162. */
  163. public function setPrerequisiteStepIds($prerequisiteStepIds)
  164. {
  165. $this->prerequisiteStepIds = $prerequisiteStepIds;
  166. }
  167. /**
  168. * @return string[]
  169. */
  170. public function getPrerequisiteStepIds()
  171. {
  172. return $this->prerequisiteStepIds;
  173. }
  174. /**
  175. * Optional. Job is a Presto job.
  176. *
  177. * @param PrestoJob $prestoJob
  178. */
  179. public function setPrestoJob(PrestoJob $prestoJob)
  180. {
  181. $this->prestoJob = $prestoJob;
  182. }
  183. /**
  184. * @return PrestoJob
  185. */
  186. public function getPrestoJob()
  187. {
  188. return $this->prestoJob;
  189. }
  190. /**
  191. * Optional. Job is a PySpark job.
  192. *
  193. * @param PySparkJob $pysparkJob
  194. */
  195. public function setPysparkJob(PySparkJob $pysparkJob)
  196. {
  197. $this->pysparkJob = $pysparkJob;
  198. }
  199. /**
  200. * @return PySparkJob
  201. */
  202. public function getPysparkJob()
  203. {
  204. return $this->pysparkJob;
  205. }
  206. /**
  207. * Optional. Job scheduling configuration.
  208. *
  209. * @param JobScheduling $scheduling
  210. */
  211. public function setScheduling(JobScheduling $scheduling)
  212. {
  213. $this->scheduling = $scheduling;
  214. }
  215. /**
  216. * @return JobScheduling
  217. */
  218. public function getScheduling()
  219. {
  220. return $this->scheduling;
  221. }
  222. /**
  223. * Optional. Job is a Spark job.
  224. *
  225. * @param SparkJob $sparkJob
  226. */
  227. public function setSparkJob(SparkJob $sparkJob)
  228. {
  229. $this->sparkJob = $sparkJob;
  230. }
  231. /**
  232. * @return SparkJob
  233. */
  234. public function getSparkJob()
  235. {
  236. return $this->sparkJob;
  237. }
  238. /**
  239. * Optional. Job is a SparkR job.
  240. *
  241. * @param SparkRJob $sparkRJob
  242. */
  243. public function setSparkRJob(SparkRJob $sparkRJob)
  244. {
  245. $this->sparkRJob = $sparkRJob;
  246. }
  247. /**
  248. * @return SparkRJob
  249. */
  250. public function getSparkRJob()
  251. {
  252. return $this->sparkRJob;
  253. }
  254. /**
  255. * Optional. Job is a SparkSql job.
  256. *
  257. * @param SparkSqlJob $sparkSqlJob
  258. */
  259. public function setSparkSqlJob(SparkSqlJob $sparkSqlJob)
  260. {
  261. $this->sparkSqlJob = $sparkSqlJob;
  262. }
  263. /**
  264. * @return SparkSqlJob
  265. */
  266. public function getSparkSqlJob()
  267. {
  268. return $this->sparkSqlJob;
  269. }
  270. /**
  271. * Required. The step id. The id must be unique among all jobs within the
  272. * template.The step id is used as prefix for job id, as job goog-dataproc-
  273. * workflow-step-id label, and in prerequisiteStepIds field from other
  274. * steps.The id must contain only letters (a-z, A-Z), numbers (0-9),
  275. * underscores (_), and hyphens (-). Cannot begin or end with underscore or
  276. * hyphen. Must consist of between 3 and 50 characters.
  277. *
  278. * @param string $stepId
  279. */
  280. public function setStepId($stepId)
  281. {
  282. $this->stepId = $stepId;
  283. }
  284. /**
  285. * @return string
  286. */
  287. public function getStepId()
  288. {
  289. return $this->stepId;
  290. }
  291. /**
  292. * Optional. Job is a Trino job.
  293. *
  294. * @param TrinoJob $trinoJob
  295. */
  296. public function setTrinoJob(TrinoJob $trinoJob)
  297. {
  298. $this->trinoJob = $trinoJob;
  299. }
  300. /**
  301. * @return TrinoJob
  302. */
  303. public function getTrinoJob()
  304. {
  305. return $this->trinoJob;
  306. }
  307. }
  308. // Adding a class alias for backwards compatibility with the previous class name.
  309. class_alias(OrderedJob::class, 'Google_Service_Dataproc_OrderedJob');