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 DataprocMetastore (v1beta).
24 *
25 * <p>
26 * The Dataproc Metastore API is used to manage the lifecycle and configuration
27 * of metastore services.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/dataproc-metastore/docs" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class DataprocMetastore extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  public $projects_locations;
43  public $projects_locations_operations;
44  public $projects_locations_services;
45  public $projects_locations_services_backups;
46  public $projects_locations_services_databases;
47  public $projects_locations_services_databases_tables;
48  public $projects_locations_services_metadataImports;
49
50  /**
51   * Constructs the internal representation of the DataprocMetastore service.
52   *
53   * @param Client|array $clientOrConfig The client used to deliver requests, or a
54   *                                     config array to pass to a new Client instance.
55   * @param string $rootUrl The root URL used for requests to the service.
56   */
57  public function __construct($clientOrConfig = [], $rootUrl = null)
58  {
59    parent::__construct($clientOrConfig);
60    $this->rootUrl = $rootUrl ?: 'https://metastore.googleapis.com/';
61    $this->servicePath = '';
62    $this->batchPath = 'batch';
63    $this->version = 'v1beta';
64    $this->serviceName = 'metastore';
65
66    $this->projects_locations = new DataprocMetastore\Resource\ProjectsLocations(
67        $this,
68        $this->serviceName,
69        'locations',
70        [
71          'methods' => [
72            'get' => [
73              'path' => 'v1beta/{+name}',
74              'httpMethod' => 'GET',
75              'parameters' => [
76                'name' => [
77                  'location' => 'path',
78                  'type' => 'string',
79                  'required' => true,
80                ],
81              ],
82            ],'list' => [
83              'path' => 'v1beta/{+name}/locations',
84              'httpMethod' => 'GET',
85              'parameters' => [
86                'name' => [
87                  'location' => 'path',
88                  'type' => 'string',
89                  'required' => true,
90                ],
91                'filter' => [
92                  'location' => 'query',
93                  'type' => 'string',
94                ],
95                'pageSize' => [
96                  'location' => 'query',
97                  'type' => 'integer',
98                ],
99                'pageToken' => [
100                  'location' => 'query',
101                  'type' => 'string',
102                ],
103              ],
104            ],
105          ]
106        ]
107    );
108    $this->projects_locations_operations = new DataprocMetastore\Resource\ProjectsLocationsOperations(
109        $this,
110        $this->serviceName,
111        'operations',
112        [
113          'methods' => [
114            'delete' => [
115              'path' => 'v1beta/{+name}',
116              'httpMethod' => 'DELETE',
117              'parameters' => [
118                'name' => [
119                  'location' => 'path',
120                  'type' => 'string',
121                  'required' => true,
122                ],
123              ],
124            ],'get' => [
125              'path' => 'v1beta/{+name}',
126              'httpMethod' => 'GET',
127              'parameters' => [
128                'name' => [
129                  'location' => 'path',
130                  'type' => 'string',
131                  'required' => true,
132                ],
133              ],
134            ],'list' => [
135              'path' => 'v1beta/{+name}/operations',
136              'httpMethod' => 'GET',
137              'parameters' => [
138                'name' => [
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ],
143                'filter' => [
144                  'location' => 'query',
145                  'type' => 'string',
146                ],
147                'pageSize' => [
148                  'location' => 'query',
149                  'type' => 'integer',
150                ],
151                'pageToken' => [
152                  'location' => 'query',
153                  'type' => 'string',
154                ],
155              ],
156            ],
157          ]
158        ]
159    );
160    $this->projects_locations_services = new DataprocMetastore\Resource\ProjectsLocationsServices(
161        $this,
162        $this->serviceName,
163        'services',
164        [
165          'methods' => [
166            'create' => [
167              'path' => 'v1beta/{+parent}/services',
168              'httpMethod' => 'POST',
169              'parameters' => [
170                'parent' => [
171                  'location' => 'path',
172                  'type' => 'string',
173                  'required' => true,
174                ],
175                'requestId' => [
176                  'location' => 'query',
177                  'type' => 'string',
178                ],
179                'serviceId' => [
180                  'location' => 'query',
181                  'type' => 'string',
182                ],
183              ],
184            ],'delete' => [
185              'path' => 'v1beta/{+name}',
186              'httpMethod' => 'DELETE',
187              'parameters' => [
188                'name' => [
189                  'location' => 'path',
190                  'type' => 'string',
191                  'required' => true,
192                ],
193                'requestId' => [
194                  'location' => 'query',
195                  'type' => 'string',
196                ],
197              ],
198            ],'exportMetadata' => [
199              'path' => 'v1beta/{+service}:exportMetadata',
200              'httpMethod' => 'POST',
201              'parameters' => [
202                'service' => [
203                  'location' => 'path',
204                  'type' => 'string',
205                  'required' => true,
206                ],
207              ],
208            ],'get' => [
209              'path' => 'v1beta/{+name}',
210              'httpMethod' => 'GET',
211              'parameters' => [
212                'name' => [
213                  'location' => 'path',
214                  'type' => 'string',
215                  'required' => true,
216                ],
217              ],
218            ],'getIamPolicy' => [
219              'path' => 'v1beta/{+resource}:getIamPolicy',
220              'httpMethod' => 'GET',
221              'parameters' => [
222                'resource' => [
223                  'location' => 'path',
224                  'type' => 'string',
225                  'required' => true,
226                ],
227                'options.requestedPolicyVersion' => [
228                  'location' => 'query',
229                  'type' => 'integer',
230                ],
231              ],
232            ],'list' => [
233              'path' => 'v1beta/{+parent}/services',
234              'httpMethod' => 'GET',
235              'parameters' => [
236                'parent' => [
237                  'location' => 'path',
238                  'type' => 'string',
239                  'required' => true,
240                ],
241                'filter' => [
242                  'location' => 'query',
243                  'type' => 'string',
244                ],
245                'orderBy' => [
246                  'location' => 'query',
247                  'type' => 'string',
248                ],
249                'pageSize' => [
250                  'location' => 'query',
251                  'type' => 'integer',
252                ],
253                'pageToken' => [
254                  'location' => 'query',
255                  'type' => 'string',
256                ],
257              ],
258            ],'patch' => [
259              'path' => 'v1beta/{+name}',
260              'httpMethod' => 'PATCH',
261              'parameters' => [
262                'name' => [
263                  'location' => 'path',
264                  'type' => 'string',
265                  'required' => true,
266                ],
267                'requestId' => [
268                  'location' => 'query',
269                  'type' => 'string',
270                ],
271                'updateMask' => [
272                  'location' => 'query',
273                  'type' => 'string',
274                ],
275              ],
276            ],'removeIamPolicy' => [
277              'path' => 'v1beta/{+resource}:removeIamPolicy',
278              'httpMethod' => 'POST',
279              'parameters' => [
280                'resource' => [
281                  'location' => 'path',
282                  'type' => 'string',
283                  'required' => true,
284                ],
285              ],
286            ],'restore' => [
287              'path' => 'v1beta/{+service}:restore',
288              'httpMethod' => 'POST',
289              'parameters' => [
290                'service' => [
291                  'location' => 'path',
292                  'type' => 'string',
293                  'required' => true,
294                ],
295              ],
296            ],'setIamPolicy' => [
297              'path' => 'v1beta/{+resource}:setIamPolicy',
298              'httpMethod' => 'POST',
299              'parameters' => [
300                'resource' => [
301                  'location' => 'path',
302                  'type' => 'string',
303                  'required' => true,
304                ],
305              ],
306            ],'testIamPermissions' => [
307              'path' => 'v1beta/{+resource}:testIamPermissions',
308              'httpMethod' => 'POST',
309              'parameters' => [
310                'resource' => [
311                  'location' => 'path',
312                  'type' => 'string',
313                  'required' => true,
314                ],
315              ],
316            ],
317          ]
318        ]
319    );
320    $this->projects_locations_services_backups = new DataprocMetastore\Resource\ProjectsLocationsServicesBackups(
321        $this,
322        $this->serviceName,
323        'backups',
324        [
325          'methods' => [
326            'create' => [
327              'path' => 'v1beta/{+parent}/backups',
328              'httpMethod' => 'POST',
329              'parameters' => [
330                'parent' => [
331                  'location' => 'path',
332                  'type' => 'string',
333                  'required' => true,
334                ],
335                'backupId' => [
336                  'location' => 'query',
337                  'type' => 'string',
338                ],
339                'requestId' => [
340                  'location' => 'query',
341                  'type' => 'string',
342                ],
343              ],
344            ],'delete' => [
345              'path' => 'v1beta/{+name}',
346              'httpMethod' => 'DELETE',
347              'parameters' => [
348                'name' => [
349                  'location' => 'path',
350                  'type' => 'string',
351                  'required' => true,
352                ],
353                'requestId' => [
354                  'location' => 'query',
355                  'type' => 'string',
356                ],
357              ],
358            ],'get' => [
359              'path' => 'v1beta/{+name}',
360              'httpMethod' => 'GET',
361              'parameters' => [
362                'name' => [
363                  'location' => 'path',
364                  'type' => 'string',
365                  'required' => true,
366                ],
367              ],
368            ],'getIamPolicy' => [
369              'path' => 'v1beta/{+resource}:getIamPolicy',
370              'httpMethod' => 'GET',
371              'parameters' => [
372                'resource' => [
373                  'location' => 'path',
374                  'type' => 'string',
375                  'required' => true,
376                ],
377                'options.requestedPolicyVersion' => [
378                  'location' => 'query',
379                  'type' => 'integer',
380                ],
381              ],
382            ],'list' => [
383              'path' => 'v1beta/{+parent}/backups',
384              'httpMethod' => 'GET',
385              'parameters' => [
386                'parent' => [
387                  'location' => 'path',
388                  'type' => 'string',
389                  'required' => true,
390                ],
391                'filter' => [
392                  'location' => 'query',
393                  'type' => 'string',
394                ],
395                'orderBy' => [
396                  'location' => 'query',
397                  'type' => 'string',
398                ],
399                'pageSize' => [
400                  'location' => 'query',
401                  'type' => 'integer',
402                ],
403                'pageToken' => [
404                  'location' => 'query',
405                  'type' => 'string',
406                ],
407              ],
408            ],'setIamPolicy' => [
409              'path' => 'v1beta/{+resource}:setIamPolicy',
410              'httpMethod' => 'POST',
411              'parameters' => [
412                'resource' => [
413                  'location' => 'path',
414                  'type' => 'string',
415                  'required' => true,
416                ],
417              ],
418            ],'testIamPermissions' => [
419              'path' => 'v1beta/{+resource}:testIamPermissions',
420              'httpMethod' => 'POST',
421              'parameters' => [
422                'resource' => [
423                  'location' => 'path',
424                  'type' => 'string',
425                  'required' => true,
426                ],
427              ],
428            ],
429          ]
430        ]
431    );
432    $this->projects_locations_services_databases = new DataprocMetastore\Resource\ProjectsLocationsServicesDatabases(
433        $this,
434        $this->serviceName,
435        'databases',
436        [
437          'methods' => [
438            'getIamPolicy' => [
439              'path' => 'v1beta/{+resource}:getIamPolicy',
440              'httpMethod' => 'GET',
441              'parameters' => [
442                'resource' => [
443                  'location' => 'path',
444                  'type' => 'string',
445                  'required' => true,
446                ],
447                'options.requestedPolicyVersion' => [
448                  'location' => 'query',
449                  'type' => 'integer',
450                ],
451              ],
452            ],'setIamPolicy' => [
453              'path' => 'v1beta/{+resource}:setIamPolicy',
454              'httpMethod' => 'POST',
455              'parameters' => [
456                'resource' => [
457                  'location' => 'path',
458                  'type' => 'string',
459                  'required' => true,
460                ],
461              ],
462            ],'testIamPermissions' => [
463              'path' => 'v1beta/{+resource}:testIamPermissions',
464              'httpMethod' => 'POST',
465              'parameters' => [
466                'resource' => [
467                  'location' => 'path',
468                  'type' => 'string',
469                  'required' => true,
470                ],
471              ],
472            ],
473          ]
474        ]
475    );
476    $this->projects_locations_services_databases_tables = new DataprocMetastore\Resource\ProjectsLocationsServicesDatabasesTables(
477        $this,
478        $this->serviceName,
479        'tables',
480        [
481          'methods' => [
482            'getIamPolicy' => [
483              'path' => 'v1beta/{+resource}:getIamPolicy',
484              'httpMethod' => 'GET',
485              'parameters' => [
486                'resource' => [
487                  'location' => 'path',
488                  'type' => 'string',
489                  'required' => true,
490                ],
491                'options.requestedPolicyVersion' => [
492                  'location' => 'query',
493                  'type' => 'integer',
494                ],
495              ],
496            ],'setIamPolicy' => [
497              'path' => 'v1beta/{+resource}:setIamPolicy',
498              'httpMethod' => 'POST',
499              'parameters' => [
500                'resource' => [
501                  'location' => 'path',
502                  'type' => 'string',
503                  'required' => true,
504                ],
505              ],
506            ],'testIamPermissions' => [
507              'path' => 'v1beta/{+resource}:testIamPermissions',
508              'httpMethod' => 'POST',
509              'parameters' => [
510                'resource' => [
511                  'location' => 'path',
512                  'type' => 'string',
513                  'required' => true,
514                ],
515              ],
516            ],
517          ]
518        ]
519    );
520    $this->projects_locations_services_metadataImports = new DataprocMetastore\Resource\ProjectsLocationsServicesMetadataImports(
521        $this,
522        $this->serviceName,
523        'metadataImports',
524        [
525          'methods' => [
526            'create' => [
527              'path' => 'v1beta/{+parent}/metadataImports',
528              'httpMethod' => 'POST',
529              'parameters' => [
530                'parent' => [
531                  'location' => 'path',
532                  'type' => 'string',
533                  'required' => true,
534                ],
535                'metadataImportId' => [
536                  'location' => 'query',
537                  'type' => 'string',
538                ],
539                'requestId' => [
540                  'location' => 'query',
541                  'type' => 'string',
542                ],
543              ],
544            ],'get' => [
545              'path' => 'v1beta/{+name}',
546              'httpMethod' => 'GET',
547              'parameters' => [
548                'name' => [
549                  'location' => 'path',
550                  'type' => 'string',
551                  'required' => true,
552                ],
553              ],
554            ],'list' => [
555              'path' => 'v1beta/{+parent}/metadataImports',
556              'httpMethod' => 'GET',
557              'parameters' => [
558                'parent' => [
559                  'location' => 'path',
560                  'type' => 'string',
561                  'required' => true,
562                ],
563                'filter' => [
564                  'location' => 'query',
565                  'type' => 'string',
566                ],
567                'orderBy' => [
568                  'location' => 'query',
569                  'type' => 'string',
570                ],
571                'pageSize' => [
572                  'location' => 'query',
573                  'type' => 'integer',
574                ],
575                'pageToken' => [
576                  'location' => 'query',
577                  'type' => 'string',
578                ],
579              ],
580            ],'patch' => [
581              'path' => 'v1beta/{+name}',
582              'httpMethod' => 'PATCH',
583              'parameters' => [
584                'name' => [
585                  'location' => 'path',
586                  'type' => 'string',
587                  'required' => true,
588                ],
589                'requestId' => [
590                  'location' => 'query',
591                  'type' => 'string',
592                ],
593                'updateMask' => [
594                  'location' => 'query',
595                  'type' => 'string',
596                ],
597              ],
598            ],
599          ]
600        ]
601    );
602  }
603}
604
605// Adding a class alias for backwards compatibility with the previous class name.
606class_alias(DataprocMetastore::class, 'Google_Service_DataprocMetastore');
607