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;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for Batch (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * An API to manage the running of Batch resources on Google Cloud Platform.</p>
|
---|
27 | *
|
---|
28 | * <p>
|
---|
29 | * For more information about this service, see the API
|
---|
30 | * <a href="https://cloud.google.com/batch/" target="_blank">Documentation</a>
|
---|
31 | * </p>
|
---|
32 | *
|
---|
33 | * @author Google, Inc.
|
---|
34 | */
|
---|
35 | class Batch extends \Google\Service
|
---|
36 | {
|
---|
37 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
38 | const CLOUD_PLATFORM =
|
---|
39 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
40 |
|
---|
41 | public $projects_locations;
|
---|
42 | public $projects_locations_jobs;
|
---|
43 | public $projects_locations_jobs_taskGroups_tasks;
|
---|
44 | public $projects_locations_operations;
|
---|
45 | public $projects_locations_state;
|
---|
46 | public $rootUrlTemplate;
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * Constructs the internal representation of the Batch service.
|
---|
50 | *
|
---|
51 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
52 | * config array to pass to a new Client instance.
|
---|
53 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
54 | */
|
---|
55 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
56 | {
|
---|
57 | parent::__construct($clientOrConfig);
|
---|
58 | $this->rootUrl = $rootUrl ?: 'https://batch.googleapis.com/';
|
---|
59 | $this->rootUrlTemplate = $rootUrl ?: 'https://batch.UNIVERSE_DOMAIN/';
|
---|
60 | $this->servicePath = '';
|
---|
61 | $this->batchPath = 'batch';
|
---|
62 | $this->version = 'v1';
|
---|
63 | $this->serviceName = 'batch';
|
---|
64 |
|
---|
65 | $this->projects_locations = new Batch\Resource\ProjectsLocations(
|
---|
66 | $this,
|
---|
67 | $this->serviceName,
|
---|
68 | 'locations',
|
---|
69 | [
|
---|
70 | 'methods' => [
|
---|
71 | 'get' => [
|
---|
72 | 'path' => 'v1/{+name}',
|
---|
73 | 'httpMethod' => 'GET',
|
---|
74 | 'parameters' => [
|
---|
75 | 'name' => [
|
---|
76 | 'location' => 'path',
|
---|
77 | 'type' => 'string',
|
---|
78 | 'required' => true,
|
---|
79 | ],
|
---|
80 | ],
|
---|
81 | ],'list' => [
|
---|
82 | 'path' => 'v1/{+name}/locations',
|
---|
83 | 'httpMethod' => 'GET',
|
---|
84 | 'parameters' => [
|
---|
85 | 'name' => [
|
---|
86 | 'location' => 'path',
|
---|
87 | 'type' => 'string',
|
---|
88 | 'required' => true,
|
---|
89 | ],
|
---|
90 | 'filter' => [
|
---|
91 | 'location' => 'query',
|
---|
92 | 'type' => 'string',
|
---|
93 | ],
|
---|
94 | 'pageSize' => [
|
---|
95 | 'location' => 'query',
|
---|
96 | 'type' => 'integer',
|
---|
97 | ],
|
---|
98 | 'pageToken' => [
|
---|
99 | 'location' => 'query',
|
---|
100 | 'type' => 'string',
|
---|
101 | ],
|
---|
102 | ],
|
---|
103 | ],
|
---|
104 | ]
|
---|
105 | ]
|
---|
106 | );
|
---|
107 | $this->projects_locations_jobs = new Batch\Resource\ProjectsLocationsJobs(
|
---|
108 | $this,
|
---|
109 | $this->serviceName,
|
---|
110 | 'jobs',
|
---|
111 | [
|
---|
112 | 'methods' => [
|
---|
113 | 'create' => [
|
---|
114 | 'path' => 'v1/{+parent}/jobs',
|
---|
115 | 'httpMethod' => 'POST',
|
---|
116 | 'parameters' => [
|
---|
117 | 'parent' => [
|
---|
118 | 'location' => 'path',
|
---|
119 | 'type' => 'string',
|
---|
120 | 'required' => true,
|
---|
121 | ],
|
---|
122 | 'jobId' => [
|
---|
123 | 'location' => 'query',
|
---|
124 | 'type' => 'string',
|
---|
125 | ],
|
---|
126 | 'requestId' => [
|
---|
127 | 'location' => 'query',
|
---|
128 | 'type' => 'string',
|
---|
129 | ],
|
---|
130 | ],
|
---|
131 | ],'delete' => [
|
---|
132 | 'path' => 'v1/{+name}',
|
---|
133 | 'httpMethod' => 'DELETE',
|
---|
134 | 'parameters' => [
|
---|
135 | 'name' => [
|
---|
136 | 'location' => 'path',
|
---|
137 | 'type' => 'string',
|
---|
138 | 'required' => true,
|
---|
139 | ],
|
---|
140 | 'reason' => [
|
---|
141 | 'location' => 'query',
|
---|
142 | 'type' => 'string',
|
---|
143 | ],
|
---|
144 | 'requestId' => [
|
---|
145 | 'location' => 'query',
|
---|
146 | 'type' => 'string',
|
---|
147 | ],
|
---|
148 | ],
|
---|
149 | ],'get' => [
|
---|
150 | 'path' => 'v1/{+name}',
|
---|
151 | 'httpMethod' => 'GET',
|
---|
152 | 'parameters' => [
|
---|
153 | 'name' => [
|
---|
154 | 'location' => 'path',
|
---|
155 | 'type' => 'string',
|
---|
156 | 'required' => true,
|
---|
157 | ],
|
---|
158 | ],
|
---|
159 | ],'list' => [
|
---|
160 | 'path' => 'v1/{+parent}/jobs',
|
---|
161 | 'httpMethod' => 'GET',
|
---|
162 | 'parameters' => [
|
---|
163 | 'parent' => [
|
---|
164 | 'location' => 'path',
|
---|
165 | 'type' => 'string',
|
---|
166 | 'required' => true,
|
---|
167 | ],
|
---|
168 | 'filter' => [
|
---|
169 | 'location' => 'query',
|
---|
170 | 'type' => 'string',
|
---|
171 | ],
|
---|
172 | 'orderBy' => [
|
---|
173 | 'location' => 'query',
|
---|
174 | 'type' => 'string',
|
---|
175 | ],
|
---|
176 | 'pageSize' => [
|
---|
177 | 'location' => 'query',
|
---|
178 | 'type' => 'integer',
|
---|
179 | ],
|
---|
180 | 'pageToken' => [
|
---|
181 | 'location' => 'query',
|
---|
182 | 'type' => 'string',
|
---|
183 | ],
|
---|
184 | ],
|
---|
185 | ],
|
---|
186 | ]
|
---|
187 | ]
|
---|
188 | );
|
---|
189 | $this->projects_locations_jobs_taskGroups_tasks = new Batch\Resource\ProjectsLocationsJobsTaskGroupsTasks(
|
---|
190 | $this,
|
---|
191 | $this->serviceName,
|
---|
192 | 'tasks',
|
---|
193 | [
|
---|
194 | 'methods' => [
|
---|
195 | 'get' => [
|
---|
196 | 'path' => 'v1/{+name}',
|
---|
197 | 'httpMethod' => 'GET',
|
---|
198 | 'parameters' => [
|
---|
199 | 'name' => [
|
---|
200 | 'location' => 'path',
|
---|
201 | 'type' => 'string',
|
---|
202 | 'required' => true,
|
---|
203 | ],
|
---|
204 | ],
|
---|
205 | ],'list' => [
|
---|
206 | 'path' => 'v1/{+parent}/tasks',
|
---|
207 | 'httpMethod' => 'GET',
|
---|
208 | 'parameters' => [
|
---|
209 | 'parent' => [
|
---|
210 | 'location' => 'path',
|
---|
211 | 'type' => 'string',
|
---|
212 | 'required' => true,
|
---|
213 | ],
|
---|
214 | 'filter' => [
|
---|
215 | 'location' => 'query',
|
---|
216 | 'type' => 'string',
|
---|
217 | ],
|
---|
218 | 'pageSize' => [
|
---|
219 | 'location' => 'query',
|
---|
220 | 'type' => 'integer',
|
---|
221 | ],
|
---|
222 | 'pageToken' => [
|
---|
223 | 'location' => 'query',
|
---|
224 | 'type' => 'string',
|
---|
225 | ],
|
---|
226 | ],
|
---|
227 | ],
|
---|
228 | ]
|
---|
229 | ]
|
---|
230 | );
|
---|
231 | $this->projects_locations_operations = new Batch\Resource\ProjectsLocationsOperations(
|
---|
232 | $this,
|
---|
233 | $this->serviceName,
|
---|
234 | 'operations',
|
---|
235 | [
|
---|
236 | 'methods' => [
|
---|
237 | 'cancel' => [
|
---|
238 | 'path' => 'v1/{+name}:cancel',
|
---|
239 | 'httpMethod' => 'POST',
|
---|
240 | 'parameters' => [
|
---|
241 | 'name' => [
|
---|
242 | 'location' => 'path',
|
---|
243 | 'type' => 'string',
|
---|
244 | 'required' => true,
|
---|
245 | ],
|
---|
246 | ],
|
---|
247 | ],'delete' => [
|
---|
248 | 'path' => 'v1/{+name}',
|
---|
249 | 'httpMethod' => 'DELETE',
|
---|
250 | 'parameters' => [
|
---|
251 | 'name' => [
|
---|
252 | 'location' => 'path',
|
---|
253 | 'type' => 'string',
|
---|
254 | 'required' => true,
|
---|
255 | ],
|
---|
256 | ],
|
---|
257 | ],'get' => [
|
---|
258 | 'path' => 'v1/{+name}',
|
---|
259 | 'httpMethod' => 'GET',
|
---|
260 | 'parameters' => [
|
---|
261 | 'name' => [
|
---|
262 | 'location' => 'path',
|
---|
263 | 'type' => 'string',
|
---|
264 | 'required' => true,
|
---|
265 | ],
|
---|
266 | ],
|
---|
267 | ],'list' => [
|
---|
268 | 'path' => 'v1/{+name}/operations',
|
---|
269 | 'httpMethod' => 'GET',
|
---|
270 | 'parameters' => [
|
---|
271 | 'name' => [
|
---|
272 | 'location' => 'path',
|
---|
273 | 'type' => 'string',
|
---|
274 | 'required' => true,
|
---|
275 | ],
|
---|
276 | 'filter' => [
|
---|
277 | 'location' => 'query',
|
---|
278 | 'type' => 'string',
|
---|
279 | ],
|
---|
280 | 'pageSize' => [
|
---|
281 | 'location' => 'query',
|
---|
282 | 'type' => 'integer',
|
---|
283 | ],
|
---|
284 | 'pageToken' => [
|
---|
285 | 'location' => 'query',
|
---|
286 | 'type' => 'string',
|
---|
287 | ],
|
---|
288 | ],
|
---|
289 | ],
|
---|
290 | ]
|
---|
291 | ]
|
---|
292 | );
|
---|
293 | $this->projects_locations_state = new Batch\Resource\ProjectsLocationsState(
|
---|
294 | $this,
|
---|
295 | $this->serviceName,
|
---|
296 | 'state',
|
---|
297 | [
|
---|
298 | 'methods' => [
|
---|
299 | 'report' => [
|
---|
300 | 'path' => 'v1/{+parent}/state:report',
|
---|
301 | 'httpMethod' => 'POST',
|
---|
302 | 'parameters' => [
|
---|
303 | 'parent' => [
|
---|
304 | 'location' => 'path',
|
---|
305 | 'type' => 'string',
|
---|
306 | 'required' => true,
|
---|
307 | ],
|
---|
308 | ],
|
---|
309 | ],
|
---|
310 | ]
|
---|
311 | ]
|
---|
312 | );
|
---|
313 | }
|
---|
314 | }
|
---|
315 |
|
---|
316 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
317 | class_alias(Batch::class, 'Google_Service_Batch');
|
---|