Skip to content

Commit 41f403c

Browse files
1 parent 860728d commit 41f403c

File tree

2 files changed

+183
-0
lines changed

2 files changed

+183
-0
lines changed

src/Dataproc/Batch.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class Batch extends \Google\Collection
8787
public $operation;
8888
protected $pysparkBatchType = PySparkBatch::class;
8989
protected $pysparkBatchDataType = '';
90+
protected $pysparkNotebookBatchType = PySparkNotebookBatch::class;
91+
protected $pysparkNotebookBatchDataType = '';
9092
protected $runtimeConfigType = RuntimeConfig::class;
9193
protected $runtimeConfigDataType = '';
9294
protected $runtimeInfoType = RuntimeInfo::class;
@@ -243,6 +245,22 @@ public function getPysparkBatch()
243245
{
244246
return $this->pysparkBatch;
245247
}
248+
/**
249+
* Optional. PySpark notebook batch config.
250+
*
251+
* @param PySparkNotebookBatch $pysparkNotebookBatch
252+
*/
253+
public function setPysparkNotebookBatch(PySparkNotebookBatch $pysparkNotebookBatch)
254+
{
255+
$this->pysparkNotebookBatch = $pysparkNotebookBatch;
256+
}
257+
/**
258+
* @return PySparkNotebookBatch
259+
*/
260+
public function getPysparkNotebookBatch()
261+
{
262+
return $this->pysparkNotebookBatch;
263+
}
246264
/**
247265
* Optional. Runtime configuration for the batch execution.
248266
*
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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+
18+
namespace Google\Service\Dataproc;
19+
20+
class PySparkNotebookBatch extends \Google\Collection
21+
{
22+
protected $collection_key = 'pythonFileUris';
23+
/**
24+
* Optional. HCFS URIs of archives to be extracted into the working directory
25+
* of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
26+
* .zip.
27+
*
28+
* @var string[]
29+
*/
30+
public $archiveUris;
31+
/**
32+
* Optional. HCFS URIs of files to be placed in the working directory of each
33+
* executor
34+
*
35+
* @var string[]
36+
*/
37+
public $fileUris;
38+
/**
39+
* Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
40+
*
41+
* @var string[]
42+
*/
43+
public $jarFileUris;
44+
/**
45+
* Required. The HCFS URI of the notebook file to execute.
46+
*
47+
* @var string
48+
*/
49+
public $notebookFileUri;
50+
/**
51+
* Optional. The parameters to pass to the notebook.
52+
*
53+
* @var string[]
54+
*/
55+
public $params;
56+
/**
57+
* Optional. HCFS URIs of Python files to pass to the PySpark framework.
58+
*
59+
* @var string[]
60+
*/
61+
public $pythonFileUris;
62+
63+
/**
64+
* Optional. HCFS URIs of archives to be extracted into the working directory
65+
* of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
66+
* .zip.
67+
*
68+
* @param string[] $archiveUris
69+
*/
70+
public function setArchiveUris($archiveUris)
71+
{
72+
$this->archiveUris = $archiveUris;
73+
}
74+
/**
75+
* @return string[]
76+
*/
77+
public function getArchiveUris()
78+
{
79+
return $this->archiveUris;
80+
}
81+
/**
82+
* Optional. HCFS URIs of files to be placed in the working directory of each
83+
* executor
84+
*
85+
* @param string[] $fileUris
86+
*/
87+
public function setFileUris($fileUris)
88+
{
89+
$this->fileUris = $fileUris;
90+
}
91+
/**
92+
* @return string[]
93+
*/
94+
public function getFileUris()
95+
{
96+
return $this->fileUris;
97+
}
98+
/**
99+
* Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
100+
*
101+
* @param string[] $jarFileUris
102+
*/
103+
public function setJarFileUris($jarFileUris)
104+
{
105+
$this->jarFileUris = $jarFileUris;
106+
}
107+
/**
108+
* @return string[]
109+
*/
110+
public function getJarFileUris()
111+
{
112+
return $this->jarFileUris;
113+
}
114+
/**
115+
* Required. The HCFS URI of the notebook file to execute.
116+
*
117+
* @param string $notebookFileUri
118+
*/
119+
public function setNotebookFileUri($notebookFileUri)
120+
{
121+
$this->notebookFileUri = $notebookFileUri;
122+
}
123+
/**
124+
* @return string
125+
*/
126+
public function getNotebookFileUri()
127+
{
128+
return $this->notebookFileUri;
129+
}
130+
/**
131+
* Optional. The parameters to pass to the notebook.
132+
*
133+
* @param string[] $params
134+
*/
135+
public function setParams($params)
136+
{
137+
$this->params = $params;
138+
}
139+
/**
140+
* @return string[]
141+
*/
142+
public function getParams()
143+
{
144+
return $this->params;
145+
}
146+
/**
147+
* Optional. HCFS URIs of Python files to pass to the PySpark framework.
148+
*
149+
* @param string[] $pythonFileUris
150+
*/
151+
public function setPythonFileUris($pythonFileUris)
152+
{
153+
$this->pythonFileUris = $pythonFileUris;
154+
}
155+
/**
156+
* @return string[]
157+
*/
158+
public function getPythonFileUris()
159+
{
160+
return $this->pythonFileUris;
161+
}
162+
}
163+
164+
// Adding a class alias for backwards compatibility with the previous class name.
165+
class_alias(PySparkNotebookBatch::class, 'Google_Service_Dataproc_PySparkNotebookBatch');

0 commit comments

Comments
 (0)