/Dataproc/src/V1beta2/PySparkJob.php

https://github.com/GoogleCloudPlatform/google-cloud-php · PHP · 358 lines · 108 code · 32 blank · 218 comment · 0 complexity · 0605c161f8a85319ab9308484e45c824 MD5 · raw file

  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/cloud/dataproc/v1beta2/jobs.proto
  4. namespace Google\Cloud\Dataproc\V1beta2;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * A Dataproc job for running
  10. * [Apache
  11. * PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
  12. * applications on YARN.
  13. *
  14. * Generated from protobuf message <code>google.cloud.dataproc.v1beta2.PySparkJob</code>
  15. */
  16. class PySparkJob extends \Google\Protobuf\Internal\Message
  17. {
  18. /**
  19. * Required. The HCFS URI of the main Python file to use as the driver. Must
  20. * be a .py file.
  21. *
  22. * Generated from protobuf field <code>string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
  23. */
  24. private $main_python_file_uri = '';
  25. /**
  26. * Optional. The arguments to pass to the driver. Do not include arguments,
  27. * such as `--conf`, that can be set as job properties, since a collision may
  28. * occur that causes an incorrect job submission.
  29. *
  30. * Generated from protobuf field <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
  31. */
  32. private $args;
  33. /**
  34. * Optional. HCFS file URIs of Python files to pass to the PySpark
  35. * framework. Supported file types: .py, .egg, and .zip.
  36. *
  37. * Generated from protobuf field <code>repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
  38. */
  39. private $python_file_uris;
  40. /**
  41. * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
  42. * Python driver and tasks.
  43. *
  44. * Generated from protobuf field <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
  45. */
  46. private $jar_file_uris;
  47. /**
  48. * Optional. HCFS URIs of files to be copied to the working directory of
  49. * Python drivers and distributed tasks. Useful for naively parallel tasks.
  50. *
  51. * Generated from protobuf field <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
  52. */
  53. private $file_uris;
  54. /**
  55. * Optional. HCFS URIs of archives to be extracted in the working directory of
  56. * .jar, .tar, .tar.gz, .tgz, and .zip.
  57. *
  58. * Generated from protobuf field <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
  59. */
  60. private $archive_uris;
  61. /**
  62. * Optional. A mapping of property names to values, used to configure PySpark.
  63. * Properties that conflict with values set by the Dataproc API may be
  64. * overwritten. Can include properties set in
  65. * /etc/spark/conf/spark-defaults.conf and classes in user code.
  66. *
  67. * Generated from protobuf field <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
  68. */
  69. private $properties;
  70. /**
  71. * Optional. The runtime log config for job execution.
  72. *
  73. * Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
  74. */
  75. private $logging_config = null;
  76. /**
  77. * Constructor.
  78. *
  79. * @param array $data {
  80. * Optional. Data for populating the Message object.
  81. *
  82. * @type string $main_python_file_uri
  83. * Required. The HCFS URI of the main Python file to use as the driver. Must
  84. * be a .py file.
  85. * @type string[]|\Google\Protobuf\Internal\RepeatedField $args
  86. * Optional. The arguments to pass to the driver. Do not include arguments,
  87. * such as `--conf`, that can be set as job properties, since a collision may
  88. * occur that causes an incorrect job submission.
  89. * @type string[]|\Google\Protobuf\Internal\RepeatedField $python_file_uris
  90. * Optional. HCFS file URIs of Python files to pass to the PySpark
  91. * framework. Supported file types: .py, .egg, and .zip.
  92. * @type string[]|\Google\Protobuf\Internal\RepeatedField $jar_file_uris
  93. * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
  94. * Python driver and tasks.
  95. * @type string[]|\Google\Protobuf\Internal\RepeatedField $file_uris
  96. * Optional. HCFS URIs of files to be copied to the working directory of
  97. * Python drivers and distributed tasks. Useful for naively parallel tasks.
  98. * @type string[]|\Google\Protobuf\Internal\RepeatedField $archive_uris
  99. * Optional. HCFS URIs of archives to be extracted in the working directory of
  100. * .jar, .tar, .tar.gz, .tgz, and .zip.
  101. * @type array|\Google\Protobuf\Internal\MapField $properties
  102. * Optional. A mapping of property names to values, used to configure PySpark.
  103. * Properties that conflict with values set by the Dataproc API may be
  104. * overwritten. Can include properties set in
  105. * /etc/spark/conf/spark-defaults.conf and classes in user code.
  106. * @type \Google\Cloud\Dataproc\V1beta2\LoggingConfig $logging_config
  107. * Optional. The runtime log config for job execution.
  108. * }
  109. */
  110. public function __construct($data = NULL) {
  111. \GPBMetadata\Google\Cloud\Dataproc\V1Beta2\Jobs::initOnce();
  112. parent::__construct($data);
  113. }
  114. /**
  115. * Required. The HCFS URI of the main Python file to use as the driver. Must
  116. * be a .py file.
  117. *
  118. * Generated from protobuf field <code>string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
  119. * @return string
  120. */
  121. public function getMainPythonFileUri()
  122. {
  123. return $this->main_python_file_uri;
  124. }
  125. /**
  126. * Required. The HCFS URI of the main Python file to use as the driver. Must
  127. * be a .py file.
  128. *
  129. * Generated from protobuf field <code>string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
  130. * @param string $var
  131. * @return $this
  132. */
  133. public function setMainPythonFileUri($var)
  134. {
  135. GPBUtil::checkString($var, True);
  136. $this->main_python_file_uri = $var;
  137. return $this;
  138. }
  139. /**
  140. * Optional. The arguments to pass to the driver. Do not include arguments,
  141. * such as `--conf`, that can be set as job properties, since a collision may
  142. * occur that causes an incorrect job submission.
  143. *
  144. * Generated from protobuf field <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
  145. * @return \Google\Protobuf\Internal\RepeatedField
  146. */
  147. public function getArgs()
  148. {
  149. return $this->args;
  150. }
  151. /**
  152. * Optional. The arguments to pass to the driver. Do not include arguments,
  153. * such as `--conf`, that can be set as job properties, since a collision may
  154. * occur that causes an incorrect job submission.
  155. *
  156. * Generated from protobuf field <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
  157. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  158. * @return $this
  159. */
  160. public function setArgs($var)
  161. {
  162. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  163. $this->args = $arr;
  164. return $this;
  165. }
  166. /**
  167. * Optional. HCFS file URIs of Python files to pass to the PySpark
  168. * framework. Supported file types: .py, .egg, and .zip.
  169. *
  170. * Generated from protobuf field <code>repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
  171. * @return \Google\Protobuf\Internal\RepeatedField
  172. */
  173. public function getPythonFileUris()
  174. {
  175. return $this->python_file_uris;
  176. }
  177. /**
  178. * Optional. HCFS file URIs of Python files to pass to the PySpark
  179. * framework. Supported file types: .py, .egg, and .zip.
  180. *
  181. * Generated from protobuf field <code>repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
  182. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  183. * @return $this
  184. */
  185. public function setPythonFileUris($var)
  186. {
  187. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  188. $this->python_file_uris = $arr;
  189. return $this;
  190. }
  191. /**
  192. * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
  193. * Python driver and tasks.
  194. *
  195. * Generated from protobuf field <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
  196. * @return \Google\Protobuf\Internal\RepeatedField
  197. */
  198. public function getJarFileUris()
  199. {
  200. return $this->jar_file_uris;
  201. }
  202. /**
  203. * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
  204. * Python driver and tasks.
  205. *
  206. * Generated from protobuf field <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
  207. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  208. * @return $this
  209. */
  210. public function setJarFileUris($var)
  211. {
  212. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  213. $this->jar_file_uris = $arr;
  214. return $this;
  215. }
  216. /**
  217. * Optional. HCFS URIs of files to be copied to the working directory of
  218. * Python drivers and distributed tasks. Useful for naively parallel tasks.
  219. *
  220. * Generated from protobuf field <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
  221. * @return \Google\Protobuf\Internal\RepeatedField
  222. */
  223. public function getFileUris()
  224. {
  225. return $this->file_uris;
  226. }
  227. /**
  228. * Optional. HCFS URIs of files to be copied to the working directory of
  229. * Python drivers and distributed tasks. Useful for naively parallel tasks.
  230. *
  231. * Generated from protobuf field <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
  232. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  233. * @return $this
  234. */
  235. public function setFileUris($var)
  236. {
  237. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  238. $this->file_uris = $arr;
  239. return $this;
  240. }
  241. /**
  242. * Optional. HCFS URIs of archives to be extracted in the working directory of
  243. * .jar, .tar, .tar.gz, .tgz, and .zip.
  244. *
  245. * Generated from protobuf field <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
  246. * @return \Google\Protobuf\Internal\RepeatedField
  247. */
  248. public function getArchiveUris()
  249. {
  250. return $this->archive_uris;
  251. }
  252. /**
  253. * Optional. HCFS URIs of archives to be extracted in the working directory of
  254. * .jar, .tar, .tar.gz, .tgz, and .zip.
  255. *
  256. * Generated from protobuf field <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
  257. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  258. * @return $this
  259. */
  260. public function setArchiveUris($var)
  261. {
  262. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  263. $this->archive_uris = $arr;
  264. return $this;
  265. }
  266. /**
  267. * Optional. A mapping of property names to values, used to configure PySpark.
  268. * Properties that conflict with values set by the Dataproc API may be
  269. * overwritten. Can include properties set in
  270. * /etc/spark/conf/spark-defaults.conf and classes in user code.
  271. *
  272. * Generated from protobuf field <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
  273. * @return \Google\Protobuf\Internal\MapField
  274. */
  275. public function getProperties()
  276. {
  277. return $this->properties;
  278. }
  279. /**
  280. * Optional. A mapping of property names to values, used to configure PySpark.
  281. * Properties that conflict with values set by the Dataproc API may be
  282. * overwritten. Can include properties set in
  283. * /etc/spark/conf/spark-defaults.conf and classes in user code.
  284. *
  285. * Generated from protobuf field <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
  286. * @param array|\Google\Protobuf\Internal\MapField $var
  287. * @return $this
  288. */
  289. public function setProperties($var)
  290. {
  291. $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
  292. $this->properties = $arr;
  293. return $this;
  294. }
  295. /**
  296. * Optional. The runtime log config for job execution.
  297. *
  298. * Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
  299. * @return \Google\Cloud\Dataproc\V1beta2\LoggingConfig
  300. */
  301. public function getLoggingConfig()
  302. {
  303. return isset($this->logging_config) ? $this->logging_config : null;
  304. }
  305. public function hasLoggingConfig()
  306. {
  307. return isset($this->logging_config);
  308. }
  309. public function clearLoggingConfig()
  310. {
  311. unset($this->logging_config);
  312. }
  313. /**
  314. * Optional. The runtime log config for job execution.
  315. *
  316. * Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
  317. * @param \Google\Cloud\Dataproc\V1beta2\LoggingConfig $var
  318. * @return $this
  319. */
  320. public function setLoggingConfig($var)
  321. {
  322. GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\LoggingConfig::class);
  323. $this->logging_config = $var;
  324. return $this;
  325. }
  326. }