source: vendor/google/apiclient-services/src/TPU.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload new project files

  • Property mode set to 100644
File size: 14.2 KB
Line 
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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for TPU (v2).
24 *
25 * <p>
26 * TPU API provides customers with access to Google TPU technology.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/tpu/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class TPU 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_acceleratorTypes;
43 public $projects_locations_nodes;
44 public $projects_locations_operations;
45 public $projects_locations_queuedResources;
46 public $projects_locations_runtimeVersions;
47 public $rootUrlTemplate;
48
49 /**
50 * Constructs the internal representation of the TPU service.
51 *
52 * @param Client|array $clientOrConfig The client used to deliver requests, or a
53 * config array to pass to a new Client instance.
54 * @param string $rootUrl The root URL used for requests to the service.
55 */
56 public function __construct($clientOrConfig = [], $rootUrl = null)
57 {
58 parent::__construct($clientOrConfig);
59 $this->rootUrl = $rootUrl ?: 'https://tpu.googleapis.com/';
60 $this->rootUrlTemplate = $rootUrl ?: 'https://tpu.UNIVERSE_DOMAIN/';
61 $this->servicePath = '';
62 $this->batchPath = 'batch';
63 $this->version = 'v2';
64 $this->serviceName = 'tpu';
65
66 $this->projects_locations = new TPU\Resource\ProjectsLocations(
67 $this,
68 $this->serviceName,
69 'locations',
70 [
71 'methods' => [
72 'generateServiceIdentity' => [
73 'path' => 'v2/{+parent}:generateServiceIdentity',
74 'httpMethod' => 'POST',
75 'parameters' => [
76 'parent' => [
77 'location' => 'path',
78 'type' => 'string',
79 'required' => true,
80 ],
81 ],
82 ],'get' => [
83 'path' => 'v2/{+name}',
84 'httpMethod' => 'GET',
85 'parameters' => [
86 'name' => [
87 'location' => 'path',
88 'type' => 'string',
89 'required' => true,
90 ],
91 ],
92 ],'list' => [
93 'path' => 'v2/{+name}/locations',
94 'httpMethod' => 'GET',
95 'parameters' => [
96 'name' => [
97 'location' => 'path',
98 'type' => 'string',
99 'required' => true,
100 ],
101 'filter' => [
102 'location' => 'query',
103 'type' => 'string',
104 ],
105 'pageSize' => [
106 'location' => 'query',
107 'type' => 'integer',
108 ],
109 'pageToken' => [
110 'location' => 'query',
111 'type' => 'string',
112 ],
113 ],
114 ],
115 ]
116 ]
117 );
118 $this->projects_locations_acceleratorTypes = new TPU\Resource\ProjectsLocationsAcceleratorTypes(
119 $this,
120 $this->serviceName,
121 'acceleratorTypes',
122 [
123 'methods' => [
124 'get' => [
125 'path' => 'v2/{+name}',
126 'httpMethod' => 'GET',
127 'parameters' => [
128 'name' => [
129 'location' => 'path',
130 'type' => 'string',
131 'required' => true,
132 ],
133 ],
134 ],'list' => [
135 'path' => 'v2/{+parent}/acceleratorTypes',
136 'httpMethod' => 'GET',
137 'parameters' => [
138 'parent' => [
139 'location' => 'path',
140 'type' => 'string',
141 'required' => true,
142 ],
143 'filter' => [
144 'location' => 'query',
145 'type' => 'string',
146 ],
147 'orderBy' => [
148 'location' => 'query',
149 'type' => 'string',
150 ],
151 'pageSize' => [
152 'location' => 'query',
153 'type' => 'integer',
154 ],
155 'pageToken' => [
156 'location' => 'query',
157 'type' => 'string',
158 ],
159 ],
160 ],
161 ]
162 ]
163 );
164 $this->projects_locations_nodes = new TPU\Resource\ProjectsLocationsNodes(
165 $this,
166 $this->serviceName,
167 'nodes',
168 [
169 'methods' => [
170 'create' => [
171 'path' => 'v2/{+parent}/nodes',
172 'httpMethod' => 'POST',
173 'parameters' => [
174 'parent' => [
175 'location' => 'path',
176 'type' => 'string',
177 'required' => true,
178 ],
179 'nodeId' => [
180 'location' => 'query',
181 'type' => 'string',
182 ],
183 ],
184 ],'delete' => [
185 'path' => 'v2/{+name}',
186 'httpMethod' => 'DELETE',
187 'parameters' => [
188 'name' => [
189 'location' => 'path',
190 'type' => 'string',
191 'required' => true,
192 ],
193 ],
194 ],'get' => [
195 'path' => 'v2/{+name}',
196 'httpMethod' => 'GET',
197 'parameters' => [
198 'name' => [
199 'location' => 'path',
200 'type' => 'string',
201 'required' => true,
202 ],
203 ],
204 ],'getGuestAttributes' => [
205 'path' => 'v2/{+name}:getGuestAttributes',
206 'httpMethod' => 'POST',
207 'parameters' => [
208 'name' => [
209 'location' => 'path',
210 'type' => 'string',
211 'required' => true,
212 ],
213 ],
214 ],'list' => [
215 'path' => 'v2/{+parent}/nodes',
216 'httpMethod' => 'GET',
217 'parameters' => [
218 'parent' => [
219 'location' => 'path',
220 'type' => 'string',
221 'required' => true,
222 ],
223 'pageSize' => [
224 'location' => 'query',
225 'type' => 'integer',
226 ],
227 'pageToken' => [
228 'location' => 'query',
229 'type' => 'string',
230 ],
231 ],
232 ],'patch' => [
233 'path' => 'v2/{+name}',
234 'httpMethod' => 'PATCH',
235 'parameters' => [
236 'name' => [
237 'location' => 'path',
238 'type' => 'string',
239 'required' => true,
240 ],
241 'updateMask' => [
242 'location' => 'query',
243 'type' => 'string',
244 ],
245 ],
246 ],'start' => [
247 'path' => 'v2/{+name}:start',
248 'httpMethod' => 'POST',
249 'parameters' => [
250 'name' => [
251 'location' => 'path',
252 'type' => 'string',
253 'required' => true,
254 ],
255 ],
256 ],'stop' => [
257 'path' => 'v2/{+name}:stop',
258 'httpMethod' => 'POST',
259 'parameters' => [
260 'name' => [
261 'location' => 'path',
262 'type' => 'string',
263 'required' => true,
264 ],
265 ],
266 ],
267 ]
268 ]
269 );
270 $this->projects_locations_operations = new TPU\Resource\ProjectsLocationsOperations(
271 $this,
272 $this->serviceName,
273 'operations',
274 [
275 'methods' => [
276 'cancel' => [
277 'path' => 'v2/{+name}:cancel',
278 'httpMethod' => 'POST',
279 'parameters' => [
280 'name' => [
281 'location' => 'path',
282 'type' => 'string',
283 'required' => true,
284 ],
285 ],
286 ],'delete' => [
287 'path' => 'v2/{+name}',
288 'httpMethod' => 'DELETE',
289 'parameters' => [
290 'name' => [
291 'location' => 'path',
292 'type' => 'string',
293 'required' => true,
294 ],
295 ],
296 ],'get' => [
297 'path' => 'v2/{+name}',
298 'httpMethod' => 'GET',
299 'parameters' => [
300 'name' => [
301 'location' => 'path',
302 'type' => 'string',
303 'required' => true,
304 ],
305 ],
306 ],'list' => [
307 'path' => 'v2/{+name}/operations',
308 'httpMethod' => 'GET',
309 'parameters' => [
310 'name' => [
311 'location' => 'path',
312 'type' => 'string',
313 'required' => true,
314 ],
315 'filter' => [
316 'location' => 'query',
317 'type' => 'string',
318 ],
319 'pageSize' => [
320 'location' => 'query',
321 'type' => 'integer',
322 ],
323 'pageToken' => [
324 'location' => 'query',
325 'type' => 'string',
326 ],
327 ],
328 ],
329 ]
330 ]
331 );
332 $this->projects_locations_queuedResources = new TPU\Resource\ProjectsLocationsQueuedResources(
333 $this,
334 $this->serviceName,
335 'queuedResources',
336 [
337 'methods' => [
338 'create' => [
339 'path' => 'v2/{+parent}/queuedResources',
340 'httpMethod' => 'POST',
341 'parameters' => [
342 'parent' => [
343 'location' => 'path',
344 'type' => 'string',
345 'required' => true,
346 ],
347 'queuedResourceId' => [
348 'location' => 'query',
349 'type' => 'string',
350 ],
351 'requestId' => [
352 'location' => 'query',
353 'type' => 'string',
354 ],
355 ],
356 ],'delete' => [
357 'path' => 'v2/{+name}',
358 'httpMethod' => 'DELETE',
359 'parameters' => [
360 'name' => [
361 'location' => 'path',
362 'type' => 'string',
363 'required' => true,
364 ],
365 'force' => [
366 'location' => 'query',
367 'type' => 'boolean',
368 ],
369 'requestId' => [
370 'location' => 'query',
371 'type' => 'string',
372 ],
373 ],
374 ],'get' => [
375 'path' => 'v2/{+name}',
376 'httpMethod' => 'GET',
377 'parameters' => [
378 'name' => [
379 'location' => 'path',
380 'type' => 'string',
381 'required' => true,
382 ],
383 ],
384 ],'list' => [
385 'path' => 'v2/{+parent}/queuedResources',
386 'httpMethod' => 'GET',
387 'parameters' => [
388 'parent' => [
389 'location' => 'path',
390 'type' => 'string',
391 'required' => true,
392 ],
393 'pageSize' => [
394 'location' => 'query',
395 'type' => 'integer',
396 ],
397 'pageToken' => [
398 'location' => 'query',
399 'type' => 'string',
400 ],
401 ],
402 ],'reset' => [
403 'path' => 'v2/{+name}:reset',
404 'httpMethod' => 'POST',
405 'parameters' => [
406 'name' => [
407 'location' => 'path',
408 'type' => 'string',
409 'required' => true,
410 ],
411 ],
412 ],
413 ]
414 ]
415 );
416 $this->projects_locations_runtimeVersions = new TPU\Resource\ProjectsLocationsRuntimeVersions(
417 $this,
418 $this->serviceName,
419 'runtimeVersions',
420 [
421 'methods' => [
422 'get' => [
423 'path' => 'v2/{+name}',
424 'httpMethod' => 'GET',
425 'parameters' => [
426 'name' => [
427 'location' => 'path',
428 'type' => 'string',
429 'required' => true,
430 ],
431 ],
432 ],'list' => [
433 'path' => 'v2/{+parent}/runtimeVersions',
434 'httpMethod' => 'GET',
435 'parameters' => [
436 'parent' => [
437 'location' => 'path',
438 'type' => 'string',
439 'required' => true,
440 ],
441 'filter' => [
442 'location' => 'query',
443 'type' => 'string',
444 ],
445 'orderBy' => [
446 'location' => 'query',
447 'type' => 'string',
448 ],
449 'pageSize' => [
450 'location' => 'query',
451 'type' => 'integer',
452 ],
453 'pageToken' => [
454 'location' => 'query',
455 'type' => 'string',
456 ],
457 ],
458 ],
459 ]
460 ]
461 );
462 }
463}
464
465// Adding a class alias for backwards compatibility with the previous class name.
466class_alias(TPU::class, 'Google_Service_TPU');
Note: See TracBrowser for help on using the repository browser.